flutter: theme: Add AppTheme.sizedBox
This commit is contained in:
parent
6f5f0da57e
commit
7bdcd2bf85
|
@ -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);
|
||||
|
|
|
@ -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<AboutPage> {
|
|||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
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)),
|
||||
],
|
||||
|
|
|
@ -542,7 +542,6 @@ class _GameSettingsPageState extends State<GameSettingsPage> {
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
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<GameSettingsPage> {
|
|||
],
|
||||
),
|
||||
),
|
||||
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<GameSettingsPage> {
|
|||
],
|
||||
),
|
||||
),
|
||||
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<GameSettingsPage> {
|
|||
],
|
||||
),
|
||||
),
|
||||
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<GameSettingsPage> {
|
|||
],
|
||||
),
|
||||
),
|
||||
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<GameSettingsPage> {
|
|||
],
|
||||
),
|
||||
),
|
||||
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<GameSettingsPage> {
|
|||
],
|
||||
),
|
||||
),
|
||||
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<GameSettingsPage> {
|
|||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
AppTheme.sizedBox,
|
||||
Text(S.of(context).restore, style: headerStyle),
|
||||
Card(
|
||||
color: AppTheme.cardColor,
|
||||
|
|
|
@ -25,7 +25,7 @@ class _HelpScreenState extends State<HelpScreen> {
|
|||
backgroundColor: Color(Config.darkBackgroundColor),
|
||||
body: ListView(
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 16),
|
||||
AppTheme.sizedBox,
|
||||
Container(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 48, left: 16, right: 16, bottom: 16),
|
||||
|
|
|
@ -55,7 +55,6 @@ class _RuleSettingsPageState extends State<RuleSettingsPage> {
|
|||
builder: (BuildContext context) => Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
SizedBox(height: 10),
|
||||
RadioListTile(
|
||||
activeColor: UIColors.primaryColor,
|
||||
title: Text('6'),
|
||||
|
@ -80,7 +79,6 @@ class _RuleSettingsPageState extends State<RuleSettingsPage> {
|
|||
onChanged: callback,
|
||||
),
|
||||
ListItemDivider(),
|
||||
SizedBox(height: 56),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -249,7 +247,7 @@ class _RuleSettingsPageState extends State<RuleSettingsPage> {
|
|||
],
|
||||
),
|
||||
),
|
||||
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<RuleSettingsPage> {
|
|||
),
|
||||
]),
|
||||
),
|
||||
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<RuleSettingsPage> {
|
|||
),
|
||||
]),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
AppTheme.sizedBox,
|
||||
Text(S.of(context).removing, style: headerStyle),
|
||||
Card(
|
||||
color: AppTheme.cardColor,
|
||||
|
|
Loading…
Reference in New Issue