Theme
는 앱 전체에서 특정한 색상이나 글꼴을 통일시켜주기 위해 사용
return MaterialApp(
theme: ThemeData(//Theme 선언
textTheme: const TextTheme(
bodyLarge: TextStyle(
color: Colors.amber,
fontSize: 30,
),
bodyMedium: TextStyle(
color: Colors.blue,
fontSize: 10,
),
)),
home: Scaffold(
return Column(
children: [
Center(
child: Text(
"First Page",
style: Theme.of(context).textTheme.bodyLarge,//Theme 적용
)),
],
);
참조
다쥬니의 코딩이야기