use theme for everything for easy porting

pull/2/head
fuwa 5 years ago
parent 0343c6c04b
commit 5946ae5e2c

@ -35,31 +35,34 @@ final _theme = ThemeData
scaffoldBackgroundColor: Colors.black, scaffoldBackgroundColor: Colors.black,
fontFamily: 'RobotoMono',
textTheme: TextTheme textTheme: TextTheme
( (
display1: TextStyle display1: TextStyle
( (
fontFamily: 'RobotoMono',
fontSize: 35, fontSize: 35,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
title: TextStyle title: TextStyle
( (
fontFamily: 'VT323',
fontSize: 22, fontSize: 22,
), ),
subhead: TextStyle subhead: TextStyle
( (
fontFamily: 'RobotoMono',
fontSize: 17, fontSize: 17,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
body1: TextStyle body1: TextStyle
( (
fontFamily: 'VT323',
fontSize: 16, fontSize: 16,
height: 1, height: 1,
), ),
body2: TextStyle body2: TextStyle
( (
fontFamily: 'RobotoMono',
fontSize: 11, fontSize: 11,
), ),
).apply ).apply

@ -53,10 +53,7 @@ Widget buildExiting(BuildContext context, ExitingState state) {
child: Text child: Text
( (
state.stdout.join(), state.stdout.join(),
style: Theme.of(context).textTheme.body1.apply style: Theme.of(context).textTheme.body1,
(
fontFamily: 'VT323',
),
) )
) )
) )

@ -49,10 +49,7 @@ Widget buildLoading(BuildContext context, LoadingState state) {
child: Text child: Text
( (
state.status, state.status,
style: Theme.of(context).textTheme.title.apply style: Theme.of(context).textTheme.title,
(
fontFamily: 'VT323',
),
) )
) )
) )

@ -53,10 +53,7 @@ Widget buildReSyncing(BuildContext context, ReSyncingState state) {
child: Text child: Text
( (
state.stdout.join(), state.stdout.join(),
style: Theme.of(context).textTheme.body1.apply style: Theme.of(context).textTheme.body1,
(
fontFamily: 'VT323',
),
) )
) )
) )

@ -53,10 +53,7 @@ Widget buildSyncing(BuildContext context, SyncingState state) {
child: Text child: Text
( (
state.stdout.join(), state.stdout.join(),
style: Theme.of(context).textTheme.body1.apply style: Theme.of(context).textTheme.body1,
(
fontFamily: 'VT323',
),
) )
) )
) )