main.dart
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Codey',
home: Grade(),
);
}
}
class Grade extends StatelessWidget {
const Grade({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.amber[800],
appBar: AppBar(
title: Text('Codey'),
backgroundColor: Colors.amber[700],
centerTitle: true,
),
// 패딩 위젯을 불러옴
body: Padding(
// 패딩 알그먼트를 불러옴, 왼쪽 30, 위쪽 40, 오른쪽 0, 아래쪽 0
padding: EdgeInsets.fromLTRB(30.0, 40.0, 0.0, 0.0),
child: Column(
// 가로축을 따라 텍스트 시작점(왼쪽)에 정렬
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text('NAME',
style: TextStyle(
color: Colors.white,
// 철자간의 간격
letterSpacing: 2.0,
),
),
// 첫번째 텍스트 위젯과 두번째 텍스트 위젯 글자 간격을 조절하기 위한 상자 모양 위젯
SizedBox(
height: 10.0,
),
Text('Codey',
style: TextStyle(
color: Colors.white,
letterSpacing: 2.0,
fontSize: 28.0,
fontWeight: FontWeight.bold
),
),
],
),
),
);
}
}