flutter: Do not show navigation menu item if isHistoryNavigationToolbarShown is true

This commit is contained in:
Calcitem 2021-06-09 00:42:43 +08:00
parent 175be010b2
commit a5fbf030b8
1 changed files with 52 additions and 36 deletions

View File

@ -757,42 +757,58 @@ class _GamePageState extends State<GamePage>
return SimpleDialog(
backgroundColor: Colors.transparent,
children: <Widget>[
SimpleDialogOption(
child: Text(
S.of(context).takeBack,
style: AppTheme.simpleDialogOptionTextStyle,
textAlign: TextAlign.center,
),
onPressed: onTakeBackButtonPressed,
),
SizedBox(height: AppTheme.sizedBoxHeight),
SimpleDialogOption(
child: Text(
S.of(context).stepForward,
style: AppTheme.simpleDialogOptionTextStyle,
textAlign: TextAlign.center,
),
onPressed: onStepForwardButtonPressed,
),
SizedBox(height: AppTheme.sizedBoxHeight),
SimpleDialogOption(
child: Text(
S.of(context).takeBackAll,
style: AppTheme.simpleDialogOptionTextStyle,
textAlign: TextAlign.center,
),
onPressed: onTakeBackAllButtonPressed,
),
SizedBox(height: AppTheme.sizedBoxHeight),
SimpleDialogOption(
child: Text(
S.of(context).stepForwardAll,
style: AppTheme.simpleDialogOptionTextStyle,
textAlign: TextAlign.center,
),
onPressed: onStepForwardAllButtonPressed,
),
SizedBox(height: AppTheme.sizedBoxHeight),
Config.isHistoryNavigationToolbarShown
? SizedBox(height: 1)
: SimpleDialogOption(
child: Text(
S.of(context).takeBack,
style: AppTheme.simpleDialogOptionTextStyle,
textAlign: TextAlign.center,
),
onPressed: onTakeBackButtonPressed,
),
Config.isHistoryNavigationToolbarShown
? SizedBox(height: 1)
: SizedBox(height: AppTheme.sizedBoxHeight),
Config.isHistoryNavigationToolbarShown
? SizedBox(height: 1)
: SimpleDialogOption(
child: Text(
S.of(context).stepForward,
style: AppTheme.simpleDialogOptionTextStyle,
textAlign: TextAlign.center,
),
onPressed: onStepForwardButtonPressed,
),
Config.isHistoryNavigationToolbarShown
? SizedBox(height: 1)
: SizedBox(height: AppTheme.sizedBoxHeight),
Config.isHistoryNavigationToolbarShown
? SizedBox(height: 1)
: SimpleDialogOption(
child: Text(
S.of(context).takeBackAll,
style: AppTheme.simpleDialogOptionTextStyle,
textAlign: TextAlign.center,
),
onPressed: onTakeBackAllButtonPressed,
),
Config.isHistoryNavigationToolbarShown
? SizedBox(height: 1)
: SizedBox(height: AppTheme.sizedBoxHeight),
Config.isHistoryNavigationToolbarShown
? SizedBox(height: 1)
: SimpleDialogOption(
child: Text(
S.of(context).stepForwardAll,
style: AppTheme.simpleDialogOptionTextStyle,
textAlign: TextAlign.center,
),
onPressed: onStepForwardAllButtonPressed,
),
Config.isHistoryNavigationToolbarShown
? SizedBox(height: 1)
: SizedBox(height: AppTheme.sizedBoxHeight),
SimpleDialogOption(
child: Text(
S.of(context).showMoveList,