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( return SimpleDialog(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
children: <Widget>[ children: <Widget>[
SimpleDialogOption( Config.isHistoryNavigationToolbarShown
child: Text( ? SizedBox(height: 1)
S.of(context).takeBack, : SimpleDialogOption(
style: AppTheme.simpleDialogOptionTextStyle, child: Text(
textAlign: TextAlign.center, S.of(context).takeBack,
), style: AppTheme.simpleDialogOptionTextStyle,
onPressed: onTakeBackButtonPressed, textAlign: TextAlign.center,
), ),
SizedBox(height: AppTheme.sizedBoxHeight), onPressed: onTakeBackButtonPressed,
SimpleDialogOption( ),
child: Text( Config.isHistoryNavigationToolbarShown
S.of(context).stepForward, ? SizedBox(height: 1)
style: AppTheme.simpleDialogOptionTextStyle, : SizedBox(height: AppTheme.sizedBoxHeight),
textAlign: TextAlign.center, Config.isHistoryNavigationToolbarShown
), ? SizedBox(height: 1)
onPressed: onStepForwardButtonPressed, : SimpleDialogOption(
), child: Text(
SizedBox(height: AppTheme.sizedBoxHeight), S.of(context).stepForward,
SimpleDialogOption( style: AppTheme.simpleDialogOptionTextStyle,
child: Text( textAlign: TextAlign.center,
S.of(context).takeBackAll, ),
style: AppTheme.simpleDialogOptionTextStyle, onPressed: onStepForwardButtonPressed,
textAlign: TextAlign.center, ),
), Config.isHistoryNavigationToolbarShown
onPressed: onTakeBackAllButtonPressed, ? SizedBox(height: 1)
), : SizedBox(height: AppTheme.sizedBoxHeight),
SizedBox(height: AppTheme.sizedBoxHeight), Config.isHistoryNavigationToolbarShown
SimpleDialogOption( ? SizedBox(height: 1)
child: Text( : SimpleDialogOption(
S.of(context).stepForwardAll, child: Text(
style: AppTheme.simpleDialogOptionTextStyle, S.of(context).takeBackAll,
textAlign: TextAlign.center, style: AppTheme.simpleDialogOptionTextStyle,
), textAlign: TextAlign.center,
onPressed: onStepForwardAllButtonPressed, ),
), onPressed: onTakeBackAllButtonPressed,
SizedBox(height: AppTheme.sizedBoxHeight), ),
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( SimpleDialogOption(
child: Text( child: Text(
S.of(context).showMoveList, S.of(context).showMoveList,