diff --git a/src/ui/flutter_app/lib/style/app_theme.dart b/src/ui/flutter_app/lib/style/app_theme.dart index 7da43e29..e0772070 100644 --- a/src/ui/flutter_app/lib/style/app_theme.dart +++ b/src/ui/flutter_app/lib/style/app_theme.dart @@ -94,6 +94,8 @@ class AppTheme { color: lightText, // was lightText ); + static const SizedBox sizedBox = SizedBox(height: 16); + static const cardColor = UIColors.floralWhiteColor; static const cardMargin = const EdgeInsets.symmetric(vertical: 4.0, horizontal: 0); diff --git a/src/ui/flutter_app/lib/widgets/about_page.dart b/src/ui/flutter_app/lib/widgets/about_page.dart index 7632928d..01958f44 100644 --- a/src/ui/flutter_app/lib/widgets/about_page.dart +++ b/src/ui/flutter_app/lib/widgets/about_page.dart @@ -22,6 +22,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:package_info/package_info.dart'; import 'package:sanmill/generated/l10n.dart'; +import 'package:sanmill/style/app_theme.dart'; import 'package:sanmill/style/colors.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -157,10 +158,10 @@ class _AboutPageState extends State { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox(height: 5), Text(S.of(context).version + ": $_version", style: TextStyle(fontFamily: '')), - SizedBox(height: 15), + AppTheme.sizedBox, + AppTheme.sizedBox, Text(S.of(context).copyright, style: TextStyle(fontFamily: '', fontSize: 12)), ], diff --git a/src/ui/flutter_app/lib/widgets/game_settings_page.dart b/src/ui/flutter_app/lib/widgets/game_settings_page.dart index eb5a5b5f..75b4bc17 100644 --- a/src/ui/flutter_app/lib/widgets/game_settings_page.dart +++ b/src/ui/flutter_app/lib/widgets/game_settings_page.dart @@ -542,7 +542,6 @@ class _GameSettingsPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text(S.of(context).difficulty, style: headerStyle), - const SizedBox(height: 10.0), Card( color: AppTheme.cardColor, elevation: 0.5, @@ -562,7 +561,7 @@ class _GameSettingsPageState extends State { ], ), ), - const SizedBox(height: 16), + AppTheme.sizedBox, Text(S.of(context).aisPlayStyle, style: headerStyle), Card( color: AppTheme.cardColor, @@ -586,7 +585,7 @@ class _GameSettingsPageState extends State { ], ), ), - const SizedBox(height: 16), + AppTheme.sizedBox, Text(S.of(context).playSounds, style: headerStyle), Card( color: AppTheme.cardColor, @@ -603,7 +602,7 @@ class _GameSettingsPageState extends State { ], ), ), - const SizedBox(height: 16), + AppTheme.sizedBox, Text(S.of(context).whoMovesFirst, style: headerStyle), Card( color: AppTheme.cardColor, @@ -623,7 +622,7 @@ class _GameSettingsPageState extends State { ], ), ), - const SizedBox(height: 16), + AppTheme.sizedBox, Text(S.of(context).automaticBehavior, style: headerStyle), Card( color: AppTheme.cardColor, @@ -639,7 +638,7 @@ class _GameSettingsPageState extends State { ], ), ), - const SizedBox(height: 16), + AppTheme.sizedBox, Text(S.of(context).display, style: headerStyle), Card( color: AppTheme.cardColor, @@ -680,7 +679,7 @@ class _GameSettingsPageState extends State { ], ), ), - const SizedBox(height: 16), + AppTheme.sizedBox, Text(S.of(context).color, style: headerStyle), Card( color: AppTheme.cardColor, @@ -758,7 +757,7 @@ class _GameSettingsPageState extends State { ], ), ), - const SizedBox(height: 16), + AppTheme.sizedBox, Text(S.of(context).restore, style: headerStyle), Card( color: AppTheme.cardColor, diff --git a/src/ui/flutter_app/lib/widgets/help_screen.dart b/src/ui/flutter_app/lib/widgets/help_screen.dart index 628f5ea8..0fafd315 100644 --- a/src/ui/flutter_app/lib/widgets/help_screen.dart +++ b/src/ui/flutter_app/lib/widgets/help_screen.dart @@ -25,7 +25,7 @@ class _HelpScreenState extends State { backgroundColor: Color(Config.darkBackgroundColor), body: ListView( children: [ - const SizedBox(height: 16), + AppTheme.sizedBox, Container( padding: const EdgeInsets.only( top: 48, left: 16, right: 16, bottom: 16), diff --git a/src/ui/flutter_app/lib/widgets/rule_settings_page.dart b/src/ui/flutter_app/lib/widgets/rule_settings_page.dart index 4d21895a..18657e68 100644 --- a/src/ui/flutter_app/lib/widgets/rule_settings_page.dart +++ b/src/ui/flutter_app/lib/widgets/rule_settings_page.dart @@ -55,7 +55,6 @@ class _RuleSettingsPageState extends State { builder: (BuildContext context) => Column( mainAxisSize: MainAxisSize.min, children: [ - SizedBox(height: 10), RadioListTile( activeColor: UIColors.primaryColor, title: Text('6'), @@ -80,7 +79,6 @@ class _RuleSettingsPageState extends State { onChanged: callback, ), ListItemDivider(), - SizedBox(height: 56), ], ), ); @@ -249,7 +247,7 @@ class _RuleSettingsPageState extends State { ], ), ), - const SizedBox(height: 16), + AppTheme.sizedBox, Text(S.of(context).placing, style: headerStyle), Card( color: AppTheme.cardColor, @@ -277,7 +275,7 @@ class _RuleSettingsPageState extends State { ), ]), ), - const SizedBox(height: 16), + AppTheme.sizedBox, Text(S.of(context).moving, style: headerStyle), Card( color: AppTheme.cardColor, @@ -305,7 +303,7 @@ class _RuleSettingsPageState extends State { ), ]), ), - const SizedBox(height: 16), + AppTheme.sizedBox, Text(S.of(context).removing, style: headerStyle), Card( color: AppTheme.cardColor,