|
|
@ -25,7 +25,7 @@ import 'package:neon/src/widgets/exception.dart'; |
|
|
|
import 'package:package_info_plus/package_info_plus.dart'; |
|
|
|
import 'package:package_info_plus/package_info_plus.dart'; |
|
|
|
import 'package:provider/provider.dart'; |
|
|
|
import 'package:provider/provider.dart'; |
|
|
|
|
|
|
|
|
|
|
|
enum SettingsCageories { |
|
|
|
enum SettingsCategories { |
|
|
|
apps, |
|
|
|
apps, |
|
|
|
theme, |
|
|
|
theme, |
|
|
|
navigation, |
|
|
|
navigation, |
|
|
@ -42,7 +42,7 @@ class SettingsPage extends StatefulWidget { |
|
|
|
super.key, |
|
|
|
super.key, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
final SettingsCageories? initialCategory; |
|
|
|
final SettingsCategories? initialCategory; |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
State<SettingsPage> createState() => _SettingsPageState(); |
|
|
|
State<SettingsPage> createState() => _SettingsPageState(); |
|
|
@ -96,7 +96,7 @@ class _SettingsPageState extends State<SettingsPage> { |
|
|
|
categories: [ |
|
|
|
categories: [ |
|
|
|
SettingsCategory( |
|
|
|
SettingsCategory( |
|
|
|
title: Text(AppLocalizations.of(context).settingsApps), |
|
|
|
title: Text(AppLocalizations.of(context).settingsApps), |
|
|
|
key: ValueKey(SettingsCageories.apps.name), |
|
|
|
key: ValueKey(SettingsCategories.apps.name), |
|
|
|
tiles: <SettingsTile>[ |
|
|
|
tiles: <SettingsTile>[ |
|
|
|
for (final appImplementation in appImplementations) ...[ |
|
|
|
for (final appImplementation in appImplementations) ...[ |
|
|
|
if (appImplementation.options.options.isNotEmpty) ...[ |
|
|
|
if (appImplementation.options.options.isNotEmpty) ...[ |
|
|
@ -113,7 +113,7 @@ class _SettingsPageState extends State<SettingsPage> { |
|
|
|
), |
|
|
|
), |
|
|
|
SettingsCategory( |
|
|
|
SettingsCategory( |
|
|
|
title: Text(AppLocalizations.of(context).optionsCategoryTheme), |
|
|
|
title: Text(AppLocalizations.of(context).optionsCategoryTheme), |
|
|
|
key: ValueKey(SettingsCageories.theme.name), |
|
|
|
key: ValueKey(SettingsCategories.theme.name), |
|
|
|
tiles: [ |
|
|
|
tiles: [ |
|
|
|
DropdownButtonSettingsTile( |
|
|
|
DropdownButtonSettingsTile( |
|
|
|
option: globalOptions.themeMode, |
|
|
|
option: globalOptions.themeMode, |
|
|
@ -128,7 +128,7 @@ class _SettingsPageState extends State<SettingsPage> { |
|
|
|
), |
|
|
|
), |
|
|
|
SettingsCategory( |
|
|
|
SettingsCategory( |
|
|
|
title: Text(AppLocalizations.of(context).optionsCategoryNavigation), |
|
|
|
title: Text(AppLocalizations.of(context).optionsCategoryNavigation), |
|
|
|
key: ValueKey(SettingsCageories.navigation.name), |
|
|
|
key: ValueKey(SettingsCategories.navigation.name), |
|
|
|
tiles: [ |
|
|
|
tiles: [ |
|
|
|
DropdownButtonSettingsTile( |
|
|
|
DropdownButtonSettingsTile( |
|
|
|
option: globalOptions.navigationMode, |
|
|
|
option: globalOptions.navigationMode, |
|
|
@ -138,7 +138,7 @@ class _SettingsPageState extends State<SettingsPage> { |
|
|
|
if (NeonPlatform.instance.canUsePushNotifications) ...[ |
|
|
|
if (NeonPlatform.instance.canUsePushNotifications) ...[ |
|
|
|
SettingsCategory( |
|
|
|
SettingsCategory( |
|
|
|
title: Text(AppLocalizations.of(context).optionsCategoryPushNotifications), |
|
|
|
title: Text(AppLocalizations.of(context).optionsCategoryPushNotifications), |
|
|
|
key: ValueKey(SettingsCageories.pushNotifications.name), |
|
|
|
key: ValueKey(SettingsCategories.pushNotifications.name), |
|
|
|
tiles: [ |
|
|
|
tiles: [ |
|
|
|
if (!globalOptions.pushNotificationsEnabled.enabled) ...[ |
|
|
|
if (!globalOptions.pushNotificationsEnabled.enabled) ...[ |
|
|
|
TextSettingsTile( |
|
|
|
TextSettingsTile( |
|
|
@ -162,7 +162,7 @@ class _SettingsPageState extends State<SettingsPage> { |
|
|
|
if (NeonPlatform.instance.canUseWindowManager) ...[ |
|
|
|
if (NeonPlatform.instance.canUseWindowManager) ...[ |
|
|
|
SettingsCategory( |
|
|
|
SettingsCategory( |
|
|
|
title: Text(AppLocalizations.of(context).optionsCategoryStartup), |
|
|
|
title: Text(AppLocalizations.of(context).optionsCategoryStartup), |
|
|
|
key: ValueKey(SettingsCageories.startup.name), |
|
|
|
key: ValueKey(SettingsCategories.startup.name), |
|
|
|
tiles: [ |
|
|
|
tiles: [ |
|
|
|
CheckBoxSettingsTile( |
|
|
|
CheckBoxSettingsTile( |
|
|
|
option: globalOptions.startupMinimized, |
|
|
|
option: globalOptions.startupMinimized, |
|
|
@ -176,7 +176,7 @@ class _SettingsPageState extends State<SettingsPage> { |
|
|
|
if (NeonPlatform.instance.canUseWindowManager && NeonPlatform.instance.canUseSystemTray) ...[ |
|
|
|
if (NeonPlatform.instance.canUseWindowManager && NeonPlatform.instance.canUseSystemTray) ...[ |
|
|
|
SettingsCategory( |
|
|
|
SettingsCategory( |
|
|
|
title: Text(AppLocalizations.of(context).optionsCategorySystemTray), |
|
|
|
title: Text(AppLocalizations.of(context).optionsCategorySystemTray), |
|
|
|
key: ValueKey(SettingsCageories.systemTray.name), |
|
|
|
key: ValueKey(SettingsCategories.systemTray.name), |
|
|
|
tiles: [ |
|
|
|
tiles: [ |
|
|
|
CheckBoxSettingsTile( |
|
|
|
CheckBoxSettingsTile( |
|
|
|
option: globalOptions.systemTrayEnabled, |
|
|
|
option: globalOptions.systemTrayEnabled, |
|
|
@ -189,7 +189,7 @@ class _SettingsPageState extends State<SettingsPage> { |
|
|
|
], |
|
|
|
], |
|
|
|
SettingsCategory( |
|
|
|
SettingsCategory( |
|
|
|
title: Text(AppLocalizations.of(context).optionsCategoryAccounts), |
|
|
|
title: Text(AppLocalizations.of(context).optionsCategoryAccounts), |
|
|
|
key: ValueKey(SettingsCageories.accounts.name), |
|
|
|
key: ValueKey(SettingsCategories.accounts.name), |
|
|
|
tiles: [ |
|
|
|
tiles: [ |
|
|
|
if (accountsSnapshot.requireData.length > 1) ...[ |
|
|
|
if (accountsSnapshot.requireData.length > 1) ...[ |
|
|
|
CheckBoxSettingsTile( |
|
|
|
CheckBoxSettingsTile( |
|
|
@ -218,7 +218,7 @@ class _SettingsPageState extends State<SettingsPage> { |
|
|
|
), |
|
|
|
), |
|
|
|
SettingsCategory( |
|
|
|
SettingsCategory( |
|
|
|
title: Text(AppLocalizations.of(context).optionsCategoryOther), |
|
|
|
title: Text(AppLocalizations.of(context).optionsCategoryOther), |
|
|
|
key: ValueKey(SettingsCageories.other.name), |
|
|
|
key: ValueKey(SettingsCategories.other.name), |
|
|
|
tiles: <SettingsTile>[ |
|
|
|
tiles: <SettingsTile>[ |
|
|
|
CustomSettingsTile( |
|
|
|
CustomSettingsTile( |
|
|
|
leading: Icon( |
|
|
|
leading: Icon( |
|
|
|