From 1a253b89aaf27b3c33deb9a26667440a0eff92d8 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Sun, 9 May 2021 23:01:29 +0800 Subject: [PATCH] flutter: windows: Do not show play sounds settings --- .../flutter_app/lib/widgets/game_settings_page.dart | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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 3a4f42de..eef19988 100644 --- a/src/ui/flutter_app/lib/widgets/game_settings_page.dart +++ b/src/ui/flutter_app/lib/widgets/game_settings_page.dart @@ -17,6 +17,7 @@ */ import 'dart:async'; +import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -251,9 +252,13 @@ class _GameSettingsPageState extends State { ), ], ), - SizedBox(height: AppTheme.sizedBoxHeight), - Text(S.of(context).playSounds, style: AppTheme.settingsHeaderStyle), - SettingsCard( + !Platform.isWindows + ? SizedBox(height: AppTheme.sizedBoxHeight) + : Container(height: 0.0, width: 0.0), + !Platform.isWindows + ? Text(S.of(context).playSounds, style: AppTheme.settingsHeaderStyle) + : Container(height: 0.0, width: 0.0), + !Platform.isWindows? SettingsCard( context: context, children: [ SettingsSwitchListTile( @@ -263,7 +268,7 @@ class _GameSettingsPageState extends State { titleString: S.of(context).playSoundsInTheGame, ), ], - ), + ): Container(height: 0.0, width: 0.0), SizedBox(height: AppTheme.sizedBoxHeight), Text(S.of(context).whoMovesFirst, style: AppTheme.settingsHeaderStyle), SettingsCard(