Skip to content

Commit

Permalink
[Presentation] Hide the "Press back again to close" option on platfor…
Browse files Browse the repository at this point in the history
…ms != Android
  • Loading branch information
Wolfteam committed Sep 29, 2022
1 parent b59383e commit c67b0c0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions lib/presentation/settings/widgets/other_settings.dart
@@ -1,3 +1,5 @@
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:shiori/application/bloc.dart';
Expand Down Expand Up @@ -54,12 +56,13 @@ class OtherSettings extends StatelessWidget {
value: settingsState.showWeaponDetails,
onChanged: (newVal) => context.read<SettingsBloc>().add(SettingsEvent.showWeaponDetailsChanged(newValue: newVal)),
),
SwitchListTile(
activeColor: theme.colorScheme.secondary,
title: Text(s.pressOnceAgainToExit),
value: settingsState.doubleBackToClose,
onChanged: (newVal) => context.read<SettingsBloc>().add(SettingsEvent.doubleBackToCloseChanged(newValue: newVal)),
),
if (Platform.isAndroid)
SwitchListTile(
activeColor: theme.colorScheme.secondary,
title: Text(s.pressOnceAgainToExit),
value: settingsState.doubleBackToClose,
onChanged: (newVal) => context.read<SettingsBloc>().add(SettingsEvent.doubleBackToCloseChanged(newValue: newVal)),
),
SwitchListTile(
activeColor: theme.colorScheme.secondary,
title: Text(s.useOfficialMap),
Expand Down

0 comments on commit c67b0c0

Please sign in to comment.