이번에는 텍스트의 크기를 지정해볼게요.
컬러를 지정한 방법과 같습니다.
fontSize를 사용하고 크기는 숫자를 입력합니다.
Text(
'everdevel',
style: TextStyle(fontSize: 20, color:Colors.white),
),
그럼 적용해보면
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context){
return MaterialApp(
title: 'hello',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Container(
color: Colors.red,
child: Text(
'everdevel',
style: TextStyle(fontSize: 20, color:Colors.white),
),
),
);
}
}
실행해 봅시다.
그런데 글씨가 잘 안보이네요.
아무래도 위치를 조정해야 할 것 같아요.
다음시간에는 위치를 조정해 봅시다.
봐주셔서 감사합니다. 문의 또는 잘못된 설명은 아래의 댓글에 부탁드립니다.
당신의 작은 누름이 저에게는 큰 희망이 됩니다.
댓글 0개
정렬기준