| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -11,11 +11,14 @@ import 'package:neon/src/settings/models/storage.dart'; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import 'package:package_info_plus/package_info_plus.dart'; | 
					 | 
					 | 
					 | 
					import 'package:package_info_plus/package_info_plus.dart'; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import 'package:permission_handler/permission_handler.dart'; | 
					 | 
					 | 
					 | 
					import 'package:permission_handler/permission_handler.dart'; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					/// The id of the NextPush unified push distributor. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					const unifiedPushNextPushID = 'org.unifiedpush.distributor.nextpush'; | 
					 | 
					 | 
					 | 
					const unifiedPushNextPushID = 'org.unifiedpush.distributor.nextpush'; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					/// Global options for the Neon framework. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@internal | 
					 | 
					 | 
					 | 
					@internal | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@immutable | 
					 | 
					 | 
					 | 
					@immutable | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					class GlobalOptions extends OptionsCollection { | 
					 | 
					 | 
					 | 
					class GlobalOptions extends OptionsCollection { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Creates a new global options collection. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  GlobalOptions( | 
					 | 
					 | 
					 | 
					  GlobalOptions( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    this._packageInfo, | 
					 | 
					 | 
					 | 
					    this._packageInfo, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  ) : super(const AppStorage(StorageKeys.global)) { | 
					 | 
					 | 
					 | 
					  ) : super(const AppStorage(StorageKeys.global)) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -90,6 +93,9 @@ class GlobalOptions extends OptionsCollection { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    rememberLastUsedAccount.removeListener(_rememberLastUsedAccountListener); | 
					 | 
					 | 
					 | 
					    rememberLastUsedAccount.removeListener(_rememberLastUsedAccountListener); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  } | 
					 | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Updates the available values of [initialAccount]. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// If the current `initialAccount` is not supported anymore the option will be reset. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  void updateAccounts(final List<Account> accounts) { | 
					 | 
					 | 
					 | 
					  void updateAccounts(final List<Account> accounts) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    initialAccount.values = Map.fromEntries( | 
					 | 
					 | 
					 | 
					    initialAccount.values = Map.fromEntries( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      accounts.map( | 
					 | 
					 | 
					 | 
					      accounts.map( | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -102,6 +108,10 @@ class GlobalOptions extends OptionsCollection { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  } | 
					 | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Updates the values of [pushNotificationsDistributor]. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// If the new `distributors` does not contain the currently active one | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// both [pushNotificationsDistributor] and [pushNotificationsEnabled] will be reset. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  void updateDistributors(final List<String> distributors) { | 
					 | 
					 | 
					 | 
					  void updateDistributors(final List<String> distributors) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    pushNotificationsDistributor.values = Map.fromEntries( | 
					 | 
					 | 
					 | 
					    pushNotificationsDistributor.values = Map.fromEntries( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      distributors.map( | 
					 | 
					 | 
					 | 
					      distributors.map( | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -117,6 +127,7 @@ class GlobalOptions extends OptionsCollection { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  } | 
					 | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The theme mode of the app implementing the Neon framework. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  late final themeMode = SelectOption( | 
					 | 
					 | 
					 | 
					  late final themeMode = SelectOption( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    storage: storage, | 
					 | 
					 | 
					 | 
					    storage: storage, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.themeMode, | 
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.themeMode, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -129,6 +140,10 @@ class GlobalOptions extends OptionsCollection { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }, | 
					 | 
					 | 
					 | 
					    }, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  ); | 
					 | 
					 | 
					 | 
					  ); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Whether the [ThemeMode.dark] should use a plain black background. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// This is commonly used on oled devices. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Defaults to `false`. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  late final themeOLEDAsDark = ToggleOption( | 
					 | 
					 | 
					 | 
					  late final themeOLEDAsDark = ToggleOption( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    storage: storage, | 
					 | 
					 | 
					 | 
					    storage: storage, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.themeOLEDAsDark, | 
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.themeOLEDAsDark, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -136,6 +151,9 @@ class GlobalOptions extends OptionsCollection { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    defaultValue: false, | 
					 | 
					 | 
					 | 
					    defaultValue: false, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  ); | 
					 | 
					 | 
					 | 
					  ); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Whether the `ColorScheme` should keep the Nextcloud you provided color. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Defaults to `false` generating a material3 style color. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  late final themeKeepOriginalAccentColor = ToggleOption( | 
					 | 
					 | 
					 | 
					  late final themeKeepOriginalAccentColor = ToggleOption( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    storage: storage, | 
					 | 
					 | 
					 | 
					    storage: storage, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.themeKeepOriginalAccentColor, | 
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.themeKeepOriginalAccentColor, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -143,6 +161,12 @@ class GlobalOptions extends OptionsCollection { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    defaultValue: false, | 
					 | 
					 | 
					 | 
					    defaultValue: false, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  ); | 
					 | 
					 | 
					 | 
					  ); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Whether to enable the push notifications plugin. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Setting this option to true will request notification access. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Disabling this option will reset [pushNotificationsDistributor]. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Defaults to `false`. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  late final pushNotificationsEnabled = ToggleOption( | 
					 | 
					 | 
					 | 
					  late final pushNotificationsEnabled = ToggleOption( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    storage: storage, | 
					 | 
					 | 
					 | 
					    storage: storage, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.pushNotificationsEnabled, | 
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.pushNotificationsEnabled, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -150,6 +174,7 @@ class GlobalOptions extends OptionsCollection { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    defaultValue: false, | 
					 | 
					 | 
					 | 
					    defaultValue: false, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  ); | 
					 | 
					 | 
					 | 
					  ); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The registered distributor for push notifications. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  late final pushNotificationsDistributor = SelectOption<String?>.depend( | 
					 | 
					 | 
					 | 
					  late final pushNotificationsDistributor = SelectOption<String?>.depend( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    storage: storage, | 
					 | 
					 | 
					 | 
					    storage: storage, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.pushNotificationsDistributor, | 
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.pushNotificationsDistributor, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -159,6 +184,13 @@ class GlobalOptions extends OptionsCollection { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    enabled: pushNotificationsEnabled, | 
					 | 
					 | 
					 | 
					    enabled: pushNotificationsEnabled, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  ); | 
					 | 
					 | 
					 | 
					  ); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Whether to start the app implementing Neon minimized. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Defaults to `false`. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// See: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  ///   * [minimizeInsteadOfExit]: for an option to minimize instead of closing the app. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  ///   *[systemTrayHideToTrayWhenMinimized]: to minimize the app to system tray. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  late final startupMinimized = ToggleOption( | 
					 | 
					 | 
					 | 
					  late final startupMinimized = ToggleOption( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    storage: storage, | 
					 | 
					 | 
					 | 
					    storage: storage, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.startupMinimized, | 
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.startupMinimized, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -166,6 +198,13 @@ class GlobalOptions extends OptionsCollection { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    defaultValue: false, | 
					 | 
					 | 
					 | 
					    defaultValue: false, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  ); | 
					 | 
					 | 
					 | 
					  ); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Whether to minimize app implementing Neon instead of closing. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Defaults to `false`. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// See: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  ///   * [startupMinimized]: for an option to startup in the minimized state. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  ///   *[systemTrayHideToTrayWhenMinimized]: to minimize the app to system tray. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  late final startupMinimizeInsteadOfExit = ToggleOption( | 
					 | 
					 | 
					 | 
					  late final startupMinimizeInsteadOfExit = ToggleOption( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    storage: storage, | 
					 | 
					 | 
					 | 
					    storage: storage, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.startupMinimizeInsteadOfExit, | 
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.startupMinimizeInsteadOfExit, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -175,6 +214,12 @@ class GlobalOptions extends OptionsCollection { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  // TODO: Autostart option | 
					 | 
					 | 
					 | 
					  // TODO: Autostart option | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Whether to enable the system tray. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Defaults to `false`. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// See: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  ///   *[systemTrayHideToTrayWhenMinimized]: to minimize the app to system tray. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  late final systemTrayEnabled = ToggleOption( | 
					 | 
					 | 
					 | 
					  late final systemTrayEnabled = ToggleOption( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    storage: storage, | 
					 | 
					 | 
					 | 
					    storage: storage, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.systemTrayEnabled, | 
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.systemTrayEnabled, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -182,6 +227,15 @@ class GlobalOptions extends OptionsCollection { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    defaultValue: false, | 
					 | 
					 | 
					 | 
					    defaultValue: false, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  ); | 
					 | 
					 | 
					 | 
					  ); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Whether to minimize to the system tray or not. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Requires [systemTrayEnabled] to be true. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Defaults to `true`. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// See: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  ///   * [systemTrayEnabled]: to enable the system tray. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  ///   * [startupMinimized]: for an option to startup in the minimized state. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  ///   * [minimizeInsteadOfExit]: for an option to minimize instead of closing the app. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  late final systemTrayHideToTrayWhenMinimized = ToggleOption.depend( | 
					 | 
					 | 
					 | 
					  late final systemTrayHideToTrayWhenMinimized = ToggleOption.depend( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    storage: storage, | 
					 | 
					 | 
					 | 
					    storage: storage, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.systemTrayHideToTrayWhenMinimized, | 
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.systemTrayHideToTrayWhenMinimized, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -190,6 +244,10 @@ class GlobalOptions extends OptionsCollection { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    enabled: systemTrayEnabled, | 
					 | 
					 | 
					 | 
					    enabled: systemTrayEnabled, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  ); | 
					 | 
					 | 
					 | 
					  ); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Whether to remember the last active account. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Enabling this option will reset the [initialAccount]. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Defaults to `true`. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  late final rememberLastUsedAccount = ToggleOption( | 
					 | 
					 | 
					 | 
					  late final rememberLastUsedAccount = ToggleOption( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    storage: storage, | 
					 | 
					 | 
					 | 
					    storage: storage, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.rememberLastUsedAccount, | 
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.rememberLastUsedAccount, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -197,6 +255,7 @@ class GlobalOptions extends OptionsCollection { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    defaultValue: true, | 
					 | 
					 | 
					 | 
					    defaultValue: true, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  ); | 
					 | 
					 | 
					 | 
					  ); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The initial account to use when opening the app. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  late final initialAccount = SelectOption<String?>( | 
					 | 
					 | 
					 | 
					  late final initialAccount = SelectOption<String?>( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    storage: storage, | 
					 | 
					 | 
					 | 
					    storage: storage, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.initialAccount, | 
					 | 
					 | 
					 | 
					    key: GlobalOptionKeys.initialAccount, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -219,19 +278,43 @@ class GlobalOptions extends OptionsCollection { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  ); | 
					 | 
					 | 
					 | 
					  ); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					} | 
					 | 
					 | 
					 | 
					} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					/// The storage keys for the [GlobalOptions]. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@internal | 
					 | 
					 | 
					 | 
					@internal | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					enum GlobalOptionKeys implements Storable { | 
					 | 
					 | 
					 | 
					enum GlobalOptionKeys implements Storable { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The storage key for [GlobalOptions.themeMode] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  themeMode._('theme-mode'), | 
					 | 
					 | 
					 | 
					  themeMode._('theme-mode'), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The storage key for [GlobalOptions.themeOLEDAsDark] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  themeOLEDAsDark._('theme-oled-as-dark'), | 
					 | 
					 | 
					 | 
					  themeOLEDAsDark._('theme-oled-as-dark'), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The storage key for [GlobalOptions.themeKeepOriginalAccentColor] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  themeKeepOriginalAccentColor._('theme-keep-original-accent-color'), | 
					 | 
					 | 
					 | 
					  themeKeepOriginalAccentColor._('theme-keep-original-accent-color'), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The storage key for [GlobalOptions.pushNotificationsEnabled] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  pushNotificationsEnabled._('push-notifications-enabled'), | 
					 | 
					 | 
					 | 
					  pushNotificationsEnabled._('push-notifications-enabled'), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The storage key for [GlobalOptions.pushNotificationsDistributor] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  pushNotificationsDistributor._('push-notifications-distributor'), | 
					 | 
					 | 
					 | 
					  pushNotificationsDistributor._('push-notifications-distributor'), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The storage key for [GlobalOptions.startupMinimized] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  startupMinimized._('startup-minimized'), | 
					 | 
					 | 
					 | 
					  startupMinimized._('startup-minimized'), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The storage key for [GlobalOptions.startupMinimizeInsteadOfExit] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  startupMinimizeInsteadOfExit._('startup-minimize-instead-of-exit'), | 
					 | 
					 | 
					 | 
					  startupMinimizeInsteadOfExit._('startup-minimize-instead-of-exit'), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The storage key for [GlobalOptions.systemTrayEnabled] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  systemTrayEnabled._('system-tray-enabled'), | 
					 | 
					 | 
					 | 
					  systemTrayEnabled._('system-tray-enabled'), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The storage key for [GlobalOptions.systemTrayHideToTrayWhenMinimized] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  systemTrayHideToTrayWhenMinimized._('system-tray-hide-to-tray-when-minimized'), | 
					 | 
					 | 
					 | 
					  systemTrayHideToTrayWhenMinimized._('system-tray-hide-to-tray-when-minimized'), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The storage key for [GlobalOptions.rememberLastUsedAccount] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  rememberLastUsedAccount._('remember-last-used-account'), | 
					 | 
					 | 
					 | 
					  rememberLastUsedAccount._('remember-last-used-account'), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The storage key for [GlobalOptions.initialAccount] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  initialAccount._('initial-account'), | 
					 | 
					 | 
					 | 
					  initialAccount._('initial-account'), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The storage key for [GlobalOptions.navigationMode] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  navigationMode._('navigation-mode'); | 
					 | 
					 | 
					 | 
					  navigationMode._('navigation-mode'); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  const GlobalOptionKeys._(this.value); | 
					 | 
					 | 
					 | 
					  const GlobalOptionKeys._(this.value); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -240,8 +323,16 @@ enum GlobalOptionKeys implements Storable { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  final String value; | 
					 | 
					 | 
					 | 
					  final String value; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					} | 
					 | 
					 | 
					 | 
					} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					/// App navigation modes. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@internal | 
					 | 
					 | 
					 | 
					@internal | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					enum NavigationMode { | 
					 | 
					 | 
					 | 
					enum NavigationMode { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Drawer behind a hamburger menu. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The default for small screen sizes. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  drawer, | 
					 | 
					 | 
					 | 
					  drawer, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// Persistent drawer on the leading edge. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  /// The default on large screen sizes. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  drawerAlwaysVisible, | 
					 | 
					 | 
					 | 
					  drawerAlwaysVisible, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					} | 
					 | 
					 | 
					 | 
					} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					 | 
					
  |