mirror of
https://github.com/localsend/localsend.git
synced 2026-08-07 07:14:52 +00:00
feat: custom color
This commit is contained in:
@@ -52,7 +52,8 @@
|
|||||||
"off": "@:general.off",
|
"off": "@:general.off",
|
||||||
"favorites": "Favorites",
|
"favorites": "Favorites",
|
||||||
"on": "@:general.on"
|
"on": "@:general.on"
|
||||||
}
|
},
|
||||||
|
"link": "Receive via link"
|
||||||
},
|
},
|
||||||
"sendTab": {
|
"sendTab": {
|
||||||
"title": "Send",
|
"title": "Send",
|
||||||
@@ -97,7 +98,8 @@
|
|||||||
"color": "Color",
|
"color": "Color",
|
||||||
"colorOptions": {
|
"colorOptions": {
|
||||||
"system": "System",
|
"system": "System",
|
||||||
"oled": "OLED"
|
"oled": "OLED",
|
||||||
|
"custom": "Custom"
|
||||||
},
|
},
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"languageOptions": {
|
"languageOptions": {
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ import 'package:yaru/yaru.dart' as yaru;
|
|||||||
|
|
||||||
final _borderRadius = BorderRadius.circular(5);
|
final _borderRadius = BorderRadius.circular(5);
|
||||||
|
|
||||||
ThemeData getTheme(ColorMode colorMode, Brightness brightness, DynamicColors? dynamicColors) {
|
ThemeData getTheme(ColorMode colorMode, Color customColor, Brightness brightness, DynamicColors? dynamicColors) {
|
||||||
if (colorMode == ColorMode.yaru) {
|
if (colorMode == ColorMode.yaru) {
|
||||||
return _getYaruTheme(brightness);
|
return _getYaruTheme(brightness);
|
||||||
}
|
}
|
||||||
|
|
||||||
final colorScheme = _determineColorScheme(colorMode, brightness, dynamicColors);
|
final colorScheme = _determineColorScheme(colorMode, customColor, brightness, dynamicColors);
|
||||||
|
|
||||||
final lightInputBorder = OutlineInputBorder(
|
final lightInputBorder = OutlineInputBorder(
|
||||||
borderSide: BorderSide(color: colorScheme.secondaryContainer),
|
borderSide: BorderSide(color: colorScheme.secondaryContainer),
|
||||||
@@ -140,7 +140,7 @@ extension InputDecorationThemeExt on InputDecorationThemeData {
|
|||||||
BorderRadius get borderRadius => _borderRadius;
|
BorderRadius get borderRadius => _borderRadius;
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorScheme _determineColorScheme(ColorMode mode, Brightness brightness, DynamicColors? dynamicColors) {
|
ColorScheme _determineColorScheme(ColorMode mode, Color customColor, Brightness brightness, DynamicColors? dynamicColors) {
|
||||||
final defaultColorScheme = ColorScheme.fromSeed(
|
final defaultColorScheme = ColorScheme.fromSeed(
|
||||||
seedColor: Colors.teal,
|
seedColor: Colors.teal,
|
||||||
brightness: brightness,
|
brightness: brightness,
|
||||||
@@ -153,6 +153,10 @@ ColorScheme _determineColorScheme(ColorMode mode, Brightness brightness, Dynamic
|
|||||||
surface: Colors.black,
|
surface: Colors.black,
|
||||||
),
|
),
|
||||||
ColorMode.yaru => throw 'Should reach here',
|
ColorMode.yaru => throw 'Should reach here',
|
||||||
|
ColorMode.custom => ColorScheme.fromSeed(
|
||||||
|
seedColor: customColor,
|
||||||
|
brightness: brightness,
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
return colorScheme ?? defaultColorScheme;
|
return colorScheme ?? defaultColorScheme;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
/// To regenerate, run: `dart run slang`
|
/// To regenerate, run: `dart run slang`
|
||||||
///
|
///
|
||||||
/// Locales: 55
|
/// Locales: 55
|
||||||
/// Strings: 18453 (335 per locale)
|
/// Strings: 18455 (335 per locale)
|
||||||
|
|
||||||
// coverage:ignore-file
|
// coverage:ignore-file
|
||||||
// ignore_for_file: type=lint, unused_import
|
// ignore_for_file: type=lint, unused_import
|
||||||
|
|||||||
@@ -212,6 +212,9 @@ class Translations$receiveTab$en {
|
|||||||
|
|
||||||
late final Translations$receiveTab$infoBox$en infoBox = Translations$receiveTab$infoBox$en.internal(_root);
|
late final Translations$receiveTab$infoBox$en infoBox = Translations$receiveTab$infoBox$en.internal(_root);
|
||||||
late final Translations$receiveTab$quickSave$en quickSave = Translations$receiveTab$quickSave$en.internal(_root);
|
late final Translations$receiveTab$quickSave$en quickSave = Translations$receiveTab$quickSave$en.internal(_root);
|
||||||
|
|
||||||
|
/// en: 'Receive via link'
|
||||||
|
String get link => 'Receive via link';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Path: sendTab
|
// Path: sendTab
|
||||||
@@ -1769,6 +1772,9 @@ class Translations$settingsTab$general$colorOptions$en {
|
|||||||
|
|
||||||
/// en: 'OLED'
|
/// en: 'OLED'
|
||||||
String get oled => 'OLED';
|
String get oled => 'OLED';
|
||||||
|
|
||||||
|
/// en: 'Custom'
|
||||||
|
String get custom => 'Custom';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Path: settingsTab.general.languageOptions
|
// Path: settingsTab.general.languageOptions
|
||||||
|
|||||||
+5
-3
@@ -46,7 +46,9 @@ class LocalSendApp extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final ref = context.ref;
|
final ref = context.ref;
|
||||||
final (themeMode, colorMode) = ref.watch(settingsProvider.select((settings) => (settings.theme, settings.colorMode)));
|
final (themeMode, colorMode, customColor) = ref.watch(
|
||||||
|
settingsProvider.select((settings) => (settings.theme, settings.colorMode, settings.customColor)),
|
||||||
|
);
|
||||||
final dynamicColors = ref.watch(dynamicColorsProvider);
|
final dynamicColors = ref.watch(dynamicColorsProvider);
|
||||||
return TrayWatcher(
|
return TrayWatcher(
|
||||||
child: WindowWatcher(
|
child: WindowWatcher(
|
||||||
@@ -72,8 +74,8 @@ class LocalSendApp extends StatelessWidget {
|
|||||||
supportedLocales: AppLocaleUtils.supportedLocales,
|
supportedLocales: AppLocaleUtils.supportedLocales,
|
||||||
localizationsDelegates: GlobalMaterialLocalizations.delegates,
|
localizationsDelegates: GlobalMaterialLocalizations.delegates,
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
theme: getTheme(colorMode, Brightness.light, dynamicColors),
|
theme: getTheme(colorMode, customColor, Brightness.light, dynamicColors),
|
||||||
darkTheme: getTheme(colorMode, Brightness.dark, dynamicColors),
|
darkTheme: getTheme(colorMode, customColor, Brightness.dark, dynamicColors),
|
||||||
themeMode: colorMode == ColorMode.oled ? ThemeMode.dark : themeMode,
|
themeMode: colorMode == ColorMode.oled ? ThemeMode.dark : themeMode,
|
||||||
navigatorKey: context.read(navigationProvider).key,
|
navigatorKey: context.read(navigationProvider).key,
|
||||||
home: RouterinoHome(
|
home: RouterinoHome(
|
||||||
|
|||||||
@@ -3,4 +3,5 @@ enum ColorMode {
|
|||||||
localsend,
|
localsend,
|
||||||
oled,
|
oled,
|
||||||
yaru,
|
yaru,
|
||||||
|
custom, // user-defined seed color
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ class SettingsState with SettingsStateMappable {
|
|||||||
final String alias;
|
final String alias;
|
||||||
final ThemeMode theme;
|
final ThemeMode theme;
|
||||||
final ColorMode colorMode;
|
final ColorMode colorMode;
|
||||||
|
final Color customColor; // seed color for ColorMode.custom
|
||||||
final AppLocale? locale;
|
final AppLocale? locale;
|
||||||
final int port;
|
final int port;
|
||||||
final List<String>? networkWhitelist; // null = disabled
|
final List<String>? networkWhitelist; // null = disabled
|
||||||
@@ -44,6 +45,7 @@ class SettingsState with SettingsStateMappable {
|
|||||||
required this.alias,
|
required this.alias,
|
||||||
required this.theme,
|
required this.theme,
|
||||||
required this.colorMode,
|
required this.colorMode,
|
||||||
|
required this.customColor,
|
||||||
required this.locale,
|
required this.locale,
|
||||||
required this.port,
|
required this.port,
|
||||||
required this.networkWhitelist,
|
required this.networkWhitelist,
|
||||||
|
|||||||
@@ -40,6 +40,11 @@ class SettingsStateMapper extends ClassMapperBase<SettingsState> {
|
|||||||
'colorMode',
|
'colorMode',
|
||||||
_$colorMode,
|
_$colorMode,
|
||||||
);
|
);
|
||||||
|
static Color _$customColor(SettingsState v) => v.customColor;
|
||||||
|
static const Field<SettingsState, Color> _f$customColor = Field(
|
||||||
|
'customColor',
|
||||||
|
_$customColor,
|
||||||
|
);
|
||||||
static AppLocale? _$locale(SettingsState v) => v.locale;
|
static AppLocale? _$locale(SettingsState v) => v.locale;
|
||||||
static const Field<SettingsState, AppLocale> _f$locale = Field(
|
static const Field<SettingsState, AppLocale> _f$locale = Field(
|
||||||
'locale',
|
'locale',
|
||||||
@@ -171,6 +176,7 @@ class SettingsStateMapper extends ClassMapperBase<SettingsState> {
|
|||||||
#alias: _f$alias,
|
#alias: _f$alias,
|
||||||
#theme: _f$theme,
|
#theme: _f$theme,
|
||||||
#colorMode: _f$colorMode,
|
#colorMode: _f$colorMode,
|
||||||
|
#customColor: _f$customColor,
|
||||||
#locale: _f$locale,
|
#locale: _f$locale,
|
||||||
#port: _f$port,
|
#port: _f$port,
|
||||||
#networkWhitelist: _f$networkWhitelist,
|
#networkWhitelist: _f$networkWhitelist,
|
||||||
@@ -204,6 +210,7 @@ class SettingsStateMapper extends ClassMapperBase<SettingsState> {
|
|||||||
alias: data.dec(_f$alias),
|
alias: data.dec(_f$alias),
|
||||||
theme: data.dec(_f$theme),
|
theme: data.dec(_f$theme),
|
||||||
colorMode: data.dec(_f$colorMode),
|
colorMode: data.dec(_f$colorMode),
|
||||||
|
customColor: data.dec(_f$customColor),
|
||||||
locale: data.dec(_f$locale),
|
locale: data.dec(_f$locale),
|
||||||
port: data.dec(_f$port),
|
port: data.dec(_f$port),
|
||||||
networkWhitelist: data.dec(_f$networkWhitelist),
|
networkWhitelist: data.dec(_f$networkWhitelist),
|
||||||
@@ -303,6 +310,7 @@ abstract class SettingsStateCopyWith<$R, $In extends SettingsState, $Out>
|
|||||||
String? alias,
|
String? alias,
|
||||||
ThemeMode? theme,
|
ThemeMode? theme,
|
||||||
ColorMode? colorMode,
|
ColorMode? colorMode,
|
||||||
|
Color? customColor,
|
||||||
AppLocale? locale,
|
AppLocale? locale,
|
||||||
int? port,
|
int? port,
|
||||||
List<String>? networkWhitelist,
|
List<String>? networkWhitelist,
|
||||||
@@ -364,6 +372,7 @@ class _SettingsStateCopyWithImpl<$R, $Out>
|
|||||||
String? alias,
|
String? alias,
|
||||||
ThemeMode? theme,
|
ThemeMode? theme,
|
||||||
ColorMode? colorMode,
|
ColorMode? colorMode,
|
||||||
|
Color? customColor,
|
||||||
Object? locale = $none,
|
Object? locale = $none,
|
||||||
int? port,
|
int? port,
|
||||||
Object? networkWhitelist = $none,
|
Object? networkWhitelist = $none,
|
||||||
@@ -395,6 +404,7 @@ class _SettingsStateCopyWithImpl<$R, $Out>
|
|||||||
if (alias != null) #alias: alias,
|
if (alias != null) #alias: alias,
|
||||||
if (theme != null) #theme: theme,
|
if (theme != null) #theme: theme,
|
||||||
if (colorMode != null) #colorMode: colorMode,
|
if (colorMode != null) #colorMode: colorMode,
|
||||||
|
if (customColor != null) #customColor: customColor,
|
||||||
if (locale != $none) #locale: locale,
|
if (locale != $none) #locale: locale,
|
||||||
if (port != null) #port: port,
|
if (port != null) #port: port,
|
||||||
if (networkWhitelist != $none) #networkWhitelist: networkWhitelist,
|
if (networkWhitelist != $none) #networkWhitelist: networkWhitelist,
|
||||||
@@ -432,6 +442,7 @@ class _SettingsStateCopyWithImpl<$R, $Out>
|
|||||||
alias: data.get(#alias, or: $value.alias),
|
alias: data.get(#alias, or: $value.alias),
|
||||||
theme: data.get(#theme, or: $value.theme),
|
theme: data.get(#theme, or: $value.theme),
|
||||||
colorMode: data.get(#colorMode, or: $value.colorMode),
|
colorMode: data.get(#colorMode, or: $value.colorMode),
|
||||||
|
customColor: data.get(#customColor, or: $value.customColor),
|
||||||
locale: data.get(#locale, or: $value.locale),
|
locale: data.get(#locale, or: $value.locale),
|
||||||
port: data.get(#port, or: $value.port),
|
port: data.get(#port, or: $value.port),
|
||||||
networkWhitelist: data.get(#networkWhitelist, or: $value.networkWhitelist),
|
networkWhitelist: data.get(#networkWhitelist, or: $value.networkWhitelist),
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class _ReceiveTabState extends State<ReceiveTab> {
|
|||||||
await context.global.dispatchAsync(NavigateAction.push(const WebSharePage()));
|
await context.global.dispatchAsync(NavigateAction.push(const WebSharePage()));
|
||||||
},
|
},
|
||||||
icon: Icon(Icons.language),
|
icon: Icon(Icons.language),
|
||||||
label: Text(t.$wip.receiveTab.link('Receive via link')),
|
label: Text(t.receiveTab.link),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class SettingsTab extends StatelessWidget {
|
|||||||
child: Text(colorMode.humanName),
|
child: Text(colorMode.humanName),
|
||||||
);
|
);
|
||||||
}).toList(),
|
}).toList(),
|
||||||
onChanged: vm.onChangeColorMode,
|
onChanged: (colorMode) => vm.onChangeColorMode(context, colorMode),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
_ButtonEntry(
|
_ButtonEntry(
|
||||||
@@ -768,6 +768,7 @@ extension on ColorMode {
|
|||||||
ColorMode.localsend => t.appName,
|
ColorMode.localsend => t.appName,
|
||||||
ColorMode.oled => t.settingsTab.general.colorOptions.oled,
|
ColorMode.oled => t.settingsTab.general.colorOptions.oled,
|
||||||
ColorMode.yaru => 'Yaru',
|
ColorMode.yaru => 'Yaru',
|
||||||
|
ColorMode.custom => t.settingsTab.general.colorOptions.custom,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import 'package:localsend_app/util/native/autostart_helper.dart';
|
|||||||
import 'package:localsend_app/util/native/context_menu_helper.dart';
|
import 'package:localsend_app/util/native/context_menu_helper.dart';
|
||||||
import 'package:localsend_app/util/ui/dynamic_colors.dart';
|
import 'package:localsend_app/util/ui/dynamic_colors.dart';
|
||||||
import 'package:localsend_app/util/ui/snackbar.dart';
|
import 'package:localsend_app/util/ui/snackbar.dart';
|
||||||
|
import 'package:localsend_app/widget/dialogs/custom_color_dialog.dart';
|
||||||
import 'package:localsend_isolates/isolate.dart';
|
import 'package:localsend_isolates/isolate.dart';
|
||||||
import 'package:localsend_isolates/model/device_info_result.dart';
|
import 'package:localsend_isolates/model/device_info_result.dart';
|
||||||
import 'package:localsend_isolates/util/sleep.dart';
|
import 'package:localsend_isolates/util/sleep.dart';
|
||||||
@@ -80,7 +81,17 @@ class SettingsTabController extends ReduxNotifier<SettingsTabVm> {
|
|||||||
await updateSystemOverlayStyle(context);
|
await updateSystemOverlayStyle(context);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onChangeColorMode: (colorMode) async {
|
onChangeColorMode: (context, colorMode) async {
|
||||||
|
if (colorMode == ColorMode.custom) {
|
||||||
|
final color = await showDialog<Color>(
|
||||||
|
context: context,
|
||||||
|
builder: (_) => CustomColorDialog(initialColor: _settingsService.state.customColor),
|
||||||
|
);
|
||||||
|
if (color == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await _settingsService.setCustomColor(color);
|
||||||
|
}
|
||||||
await _settingsService.setColorMode(colorMode);
|
await _settingsService.setColorMode(colorMode);
|
||||||
if (colorMode == ColorMode.oled) {
|
if (colorMode == ColorMode.oled) {
|
||||||
await _settingsService.setTheme(ThemeMode.dark);
|
await _settingsService.setTheme(ThemeMode.dark);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class SettingsTabVm with SettingsTabVmMappable {
|
|||||||
final bool autoStartLaunchHidden;
|
final bool autoStartLaunchHidden;
|
||||||
final bool showInContextMenu;
|
final bool showInContextMenu;
|
||||||
final void Function(BuildContext context, ThemeMode mode) onChangeTheme;
|
final void Function(BuildContext context, ThemeMode mode) onChangeTheme;
|
||||||
final void Function(ColorMode mode) onChangeColorMode;
|
final void Function(BuildContext context, ColorMode mode) onChangeColorMode;
|
||||||
final void Function(BuildContext context) onTapLanguage;
|
final void Function(BuildContext context) onTapLanguage;
|
||||||
final void Function(BuildContext context) onToggleAutoStart;
|
final void Function(BuildContext context) onToggleAutoStart;
|
||||||
final void Function(BuildContext context) onToggleAutoStartLaunchHidden;
|
final void Function(BuildContext context) onToggleAutoStartLaunchHidden;
|
||||||
|
|||||||
@@ -99,7 +99,8 @@ class SettingsTabVmMapper extends ClassMapperBase<SettingsTabVm> {
|
|||||||
);
|
);
|
||||||
static Function _$onChangeColorMode(SettingsTabVm v) =>
|
static Function _$onChangeColorMode(SettingsTabVm v) =>
|
||||||
(v as dynamic).onChangeColorMode as Function;
|
(v as dynamic).onChangeColorMode as Function;
|
||||||
static dynamic _arg$onChangeColorMode(f) => f<void Function(ColorMode)>();
|
static dynamic _arg$onChangeColorMode(f) =>
|
||||||
|
f<void Function(BuildContext, ColorMode)>();
|
||||||
static const Field<SettingsTabVm, Function> _f$onChangeColorMode = Field(
|
static const Field<SettingsTabVm, Function> _f$onChangeColorMode = Field(
|
||||||
'onChangeColorMode',
|
'onChangeColorMode',
|
||||||
_$onChangeColorMode,
|
_$onChangeColorMode,
|
||||||
@@ -317,7 +318,7 @@ abstract class SettingsTabVmCopyWith<$R, $In extends SettingsTabVm, $Out>
|
|||||||
bool? autoStartLaunchHidden,
|
bool? autoStartLaunchHidden,
|
||||||
bool? showInContextMenu,
|
bool? showInContextMenu,
|
||||||
void Function(BuildContext, ThemeMode)? onChangeTheme,
|
void Function(BuildContext, ThemeMode)? onChangeTheme,
|
||||||
void Function(ColorMode)? onChangeColorMode,
|
void Function(BuildContext, ColorMode)? onChangeColorMode,
|
||||||
void Function(BuildContext)? onTapLanguage,
|
void Function(BuildContext)? onTapLanguage,
|
||||||
void Function(BuildContext)? onToggleAutoStart,
|
void Function(BuildContext)? onToggleAutoStart,
|
||||||
void Function(BuildContext)? onToggleAutoStartLaunchHidden,
|
void Function(BuildContext)? onToggleAutoStartLaunchHidden,
|
||||||
@@ -367,7 +368,7 @@ class _SettingsTabVmCopyWithImpl<$R, $Out>
|
|||||||
bool? autoStartLaunchHidden,
|
bool? autoStartLaunchHidden,
|
||||||
bool? showInContextMenu,
|
bool? showInContextMenu,
|
||||||
void Function(BuildContext, ThemeMode)? onChangeTheme,
|
void Function(BuildContext, ThemeMode)? onChangeTheme,
|
||||||
void Function(ColorMode)? onChangeColorMode,
|
void Function(BuildContext, ColorMode)? onChangeColorMode,
|
||||||
void Function(BuildContext)? onTapLanguage,
|
void Function(BuildContext)? onTapLanguage,
|
||||||
void Function(BuildContext)? onToggleAutoStart,
|
void Function(BuildContext)? onToggleAutoStart,
|
||||||
void Function(BuildContext)? onToggleAutoStartLaunchHidden,
|
void Function(BuildContext)? onToggleAutoStartLaunchHidden,
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ const _showToken = 'ls_show_token';
|
|||||||
const _aliasKey = 'ls_alias';
|
const _aliasKey = 'ls_alias';
|
||||||
const _themeKey = 'ls_theme'; // now called brightness
|
const _themeKey = 'ls_theme'; // now called brightness
|
||||||
const _colorKey = 'ls_color';
|
const _colorKey = 'ls_color';
|
||||||
|
const _customColorKey = 'ls_custom_color'; // RRGGBB hex, used by ColorMode.custom
|
||||||
const _localeKey = 'ls_locale';
|
const _localeKey = 'ls_locale';
|
||||||
const _portKey = 'ls_port';
|
const _portKey = 'ls_port';
|
||||||
const _networkWhitelistKey = 'ls_network_whitelist';
|
const _networkWhitelistKey = 'ls_network_whitelist';
|
||||||
@@ -307,6 +308,19 @@ class PersistenceService {
|
|||||||
await _prefs.setString(_colorKey, color.name);
|
await _prefs.setString(_colorKey, color.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Color getCustomColor() {
|
||||||
|
final value = _prefs.getString(_customColorKey);
|
||||||
|
final rgb = value == null ? null : int.tryParse(value, radix: 16);
|
||||||
|
if (rgb == null) {
|
||||||
|
return Colors.teal;
|
||||||
|
}
|
||||||
|
return Color(0xff000000 | rgb);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> setCustomColor(Color color) async {
|
||||||
|
await _prefs.setString(_customColorKey, color.toARGB32().toRadixString(16).padLeft(8, '0').substring(2));
|
||||||
|
}
|
||||||
|
|
||||||
AppLocale? getLocale() {
|
AppLocale? getLocale() {
|
||||||
final value = _prefs.getString(_localeKey);
|
final value = _prefs.getString(_localeKey);
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ class SettingsService extends PureNotifier<SettingsState> {
|
|||||||
alias: _persistence.getAlias(),
|
alias: _persistence.getAlias(),
|
||||||
theme: _persistence.getTheme(),
|
theme: _persistence.getTheme(),
|
||||||
colorMode: _persistence.getColorMode(),
|
colorMode: _persistence.getColorMode(),
|
||||||
|
customColor: _persistence.getCustomColor(),
|
||||||
locale: _persistence.getLocale(),
|
locale: _persistence.getLocale(),
|
||||||
port: _persistence.getPort(),
|
port: _persistence.getPort(),
|
||||||
networkWhitelist: _persistence.getNetworkWhitelist(),
|
networkWhitelist: _persistence.getNetworkWhitelist(),
|
||||||
@@ -97,6 +98,13 @@ class SettingsService extends PureNotifier<SettingsState> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> setCustomColor(Color color) async {
|
||||||
|
await _persistence.setCustomColor(color);
|
||||||
|
state = state.copyWith(
|
||||||
|
customColor: color,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> setAdvancedSettingsEnabled(bool isEnabled) async {
|
Future<void> setAdvancedSettingsEnabled(bool isEnabled) async {
|
||||||
await _persistence.setAdvancedSettingsEnabled(isEnabled);
|
await _persistence.setAdvancedSettingsEnabled(isEnabled);
|
||||||
state = state.copyWith(
|
state = state.copyWith(
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
import 'package:flex_color_picker/flex_color_picker.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:localsend_app/gen/strings.g.dart';
|
||||||
|
import 'package:refena_flutter/addons.dart';
|
||||||
|
import 'package:refena_flutter/refena_flutter.dart';
|
||||||
|
import 'package:routerino/routerino.dart';
|
||||||
|
|
||||||
|
/// Lets the user pick a color visually or enter a HEX code (RRGGBB).
|
||||||
|
/// Pops with the selected [Color] or null when cancelled.
|
||||||
|
class CustomColorDialog extends StatefulWidget {
|
||||||
|
final Color initialColor;
|
||||||
|
|
||||||
|
const CustomColorDialog({required this.initialColor});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<CustomColorDialog> createState() => _CustomColorDialogState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CustomColorDialogState extends State<CustomColorDialog> {
|
||||||
|
late Color _color = widget.initialColor;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AlertDialog(
|
||||||
|
title: Text(t.settingsTab.general.colorOptions.custom),
|
||||||
|
content: SingleChildScrollView(
|
||||||
|
child: ColorPicker(
|
||||||
|
color: _color,
|
||||||
|
onColorChanged: (color) => setState(() => _color = color),
|
||||||
|
pickersEnabled: const {
|
||||||
|
ColorPickerType.primary: false,
|
||||||
|
ColorPickerType.accent: false,
|
||||||
|
ColorPickerType.wheel: true,
|
||||||
|
},
|
||||||
|
showColorCode: true, // editable field, so manual HEX input stays possible
|
||||||
|
colorCodeHasColor: true,
|
||||||
|
enableShadesSelection: false,
|
||||||
|
copyPasteBehavior: const ColorPickerCopyPasteBehavior(
|
||||||
|
copyFormat: ColorPickerCopyFormat.hexRRGGBB,
|
||||||
|
parseShortHexCode: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => context.pop(),
|
||||||
|
child: Text(t.general.cancel),
|
||||||
|
),
|
||||||
|
ElevatedButton(
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||||
|
foregroundColor: Theme.of(context).colorScheme.onPrimary,
|
||||||
|
),
|
||||||
|
onPressed: () => context.global.dispatch(NavigateAction.pop(_color)),
|
||||||
|
child: Text(t.general.confirm),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -458,6 +458,22 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.1"
|
version: "1.1.1"
|
||||||
|
flex_color_picker:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: flex_color_picker
|
||||||
|
sha256: a0979dd61f21b634717b98eb4ceaed2bfe009fe020ce8597aaf164b9eeb57aaa
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.8.0"
|
||||||
|
flex_seed_scheme:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: flex_seed_scheme
|
||||||
|
sha256: a3183753bbcfc3af106224bff3ab3e1844b73f58062136b7499919f49f3667e7
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.0.1"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ dependencies:
|
|||||||
dynamic_color: 1.8.1
|
dynamic_color: 1.8.1
|
||||||
file_picker: 11.0.2
|
file_picker: 11.0.2
|
||||||
file_selector: 1.1.0
|
file_selector: 1.1.0
|
||||||
|
flex_color_picker: 3.8.0
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_displaymode: 0.7.0
|
flutter_displaymode: 0.7.0
|
||||||
|
|||||||
+261
-232
@@ -3,21 +3,22 @@
|
|||||||
// Do not manually edit this file.
|
// Do not manually edit this file.
|
||||||
|
|
||||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||||
import 'dart:async' as _i4;
|
import 'dart:async' as _i5;
|
||||||
|
import 'dart:ui' as _i3;
|
||||||
|
|
||||||
import 'package:flutter/material.dart' as _i8;
|
import 'package:flutter/material.dart' as _i9;
|
||||||
import 'package:localsend_app/gen/strings.g.dart' as _i10;
|
import 'package:localsend_app/gen/strings.g.dart' as _i11;
|
||||||
import 'package:localsend_app/model/persistence/color_mode.dart' as _i9;
|
import 'package:localsend_app/model/persistence/color_mode.dart' as _i10;
|
||||||
import 'package:localsend_app/model/persistence/favorite_device.dart' as _i6;
|
import 'package:localsend_app/model/persistence/favorite_device.dart' as _i7;
|
||||||
import 'package:localsend_app/model/persistence/quick_save_mode.dart' as _i11;
|
import 'package:localsend_app/model/persistence/quick_save_mode.dart' as _i12;
|
||||||
import 'package:localsend_app/model/persistence/receive_history_entry.dart' as _i5;
|
import 'package:localsend_app/model/persistence/receive_history_entry.dart' as _i6;
|
||||||
import 'package:localsend_app/model/send_mode.dart' as _i12;
|
import 'package:localsend_app/model/send_mode.dart' as _i13;
|
||||||
import 'package:localsend_app/provider/persistence_provider.dart' as _i3;
|
import 'package:localsend_app/provider/persistence_provider.dart' as _i4;
|
||||||
import 'package:localsend_isolates/model/device.dart' as _i13;
|
import 'package:localsend_isolates/model/device.dart' as _i14;
|
||||||
import 'package:localsend_isolates/model/stored_security_context.dart' as _i2;
|
import 'package:localsend_isolates/model/stored_security_context.dart' as _i2;
|
||||||
import 'package:mockito/mockito.dart' as _i1;
|
import 'package:mockito/mockito.dart' as _i1;
|
||||||
import 'package:mockito/src/dummies.dart' as _i7;
|
import 'package:mockito/src/dummies.dart' as _i8;
|
||||||
import 'package:shared_preferences/shared_preferences.dart' as _i14;
|
import 'package:shared_preferences/shared_preferences.dart' as _i15;
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
// ignore_for_file: avoid_redundant_argument_values
|
// ignore_for_file: avoid_redundant_argument_values
|
||||||
@@ -38,10 +39,14 @@ class _FakeStoredSecurityContext_0 extends _i1.SmartFake implements _i2.StoredSe
|
|||||||
_FakeStoredSecurityContext_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
_FakeStoredSecurityContext_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class _FakeColor_1 extends _i1.SmartFake implements _i3.Color {
|
||||||
|
_FakeColor_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||||
|
}
|
||||||
|
|
||||||
/// A class which mocks [PersistenceService].
|
/// A class which mocks [PersistenceService].
|
||||||
///
|
///
|
||||||
/// See the documentation for Mockito's code generation for more information.
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService {
|
class MockPersistenceService extends _i1.Mock implements _i4.PersistenceService {
|
||||||
@override
|
@override
|
||||||
bool get isFirstAppStart =>
|
bool get isFirstAppStart =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
@@ -76,77 +81,77 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as _i2.StoredSecurityContext);
|
as _i2.StoredSecurityContext);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setSecurityContext(_i2.StoredSecurityContext? context) =>
|
_i5.Future<void> setSecurityContext(_i2.StoredSecurityContext? context) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setSecurityContext, [context]),
|
Invocation.method(#setSecurityContext, [context]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setSignalingServers(List<String>? servers) =>
|
_i5.Future<void> setSignalingServers(List<String>? servers) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setSignalingServers, [servers]),
|
Invocation.method(#setSignalingServers, [servers]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setStunServers(List<String>? servers) =>
|
_i5.Future<void> setStunServers(List<String>? servers) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setStunServers, [servers]),
|
Invocation.method(#setStunServers, [servers]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<_i5.ReceiveHistoryEntry> getReceiveHistory() =>
|
List<_i6.ReceiveHistoryEntry> getReceiveHistory() =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#getReceiveHistory, []),
|
Invocation.method(#getReceiveHistory, []),
|
||||||
returnValue: <_i5.ReceiveHistoryEntry>[],
|
returnValue: <_i6.ReceiveHistoryEntry>[],
|
||||||
returnValueForMissingStub: <_i5.ReceiveHistoryEntry>[],
|
returnValueForMissingStub: <_i6.ReceiveHistoryEntry>[],
|
||||||
)
|
)
|
||||||
as List<_i5.ReceiveHistoryEntry>);
|
as List<_i6.ReceiveHistoryEntry>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setReceiveHistory(List<_i5.ReceiveHistoryEntry>? entries) =>
|
_i5.Future<void> setReceiveHistory(List<_i6.ReceiveHistoryEntry>? entries) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setReceiveHistory, [entries]),
|
Invocation.method(#setReceiveHistory, [entries]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<_i6.FavoriteDevice> getFavorites() =>
|
List<_i7.FavoriteDevice> getFavorites() =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#getFavorites, []),
|
Invocation.method(#getFavorites, []),
|
||||||
returnValue: <_i6.FavoriteDevice>[],
|
returnValue: <_i7.FavoriteDevice>[],
|
||||||
returnValueForMissingStub: <_i6.FavoriteDevice>[],
|
returnValueForMissingStub: <_i7.FavoriteDevice>[],
|
||||||
)
|
)
|
||||||
as List<_i6.FavoriteDevice>);
|
as List<_i7.FavoriteDevice>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setFavorites(List<_i6.FavoriteDevice>? entries) =>
|
_i5.Future<void> setFavorites(List<_i7.FavoriteDevice>? entries) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setFavorites, [entries]),
|
Invocation.method(#setFavorites, [entries]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String getShowToken() =>
|
String getShowToken() =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#getShowToken, []),
|
Invocation.method(#getShowToken, []),
|
||||||
returnValue: _i7.dummyValue<String>(
|
returnValue: _i8.dummyValue<String>(
|
||||||
this,
|
this,
|
||||||
Invocation.method(#getShowToken, []),
|
Invocation.method(#getShowToken, []),
|
||||||
),
|
),
|
||||||
returnValueForMissingStub: _i7.dummyValue<String>(
|
returnValueForMissingStub: _i8.dummyValue<String>(
|
||||||
this,
|
this,
|
||||||
Invocation.method(#getShowToken, []),
|
Invocation.method(#getShowToken, []),
|
||||||
),
|
),
|
||||||
@@ -157,11 +162,11 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
String getAlias() =>
|
String getAlias() =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#getAlias, []),
|
Invocation.method(#getAlias, []),
|
||||||
returnValue: _i7.dummyValue<String>(
|
returnValue: _i8.dummyValue<String>(
|
||||||
this,
|
this,
|
||||||
Invocation.method(#getAlias, []),
|
Invocation.method(#getAlias, []),
|
||||||
),
|
),
|
||||||
returnValueForMissingStub: _i7.dummyValue<String>(
|
returnValueForMissingStub: _i8.dummyValue<String>(
|
||||||
this,
|
this,
|
||||||
Invocation.method(#getAlias, []),
|
Invocation.method(#getAlias, []),
|
||||||
),
|
),
|
||||||
@@ -169,58 +174,82 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as String);
|
as String);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setAlias(String? alias) =>
|
_i5.Future<void> setAlias(String? alias) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setAlias, [alias]),
|
Invocation.method(#setAlias, [alias]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i8.ThemeMode getTheme() =>
|
_i9.ThemeMode getTheme() =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#getTheme, []),
|
Invocation.method(#getTheme, []),
|
||||||
returnValue: _i8.ThemeMode.system,
|
returnValue: _i9.ThemeMode.system,
|
||||||
returnValueForMissingStub: _i8.ThemeMode.system,
|
returnValueForMissingStub: _i9.ThemeMode.system,
|
||||||
)
|
)
|
||||||
as _i8.ThemeMode);
|
as _i9.ThemeMode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setTheme(_i8.ThemeMode? theme) =>
|
_i5.Future<void> setTheme(_i9.ThemeMode? theme) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setTheme, [theme]),
|
Invocation.method(#setTheme, [theme]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i9.ColorMode getColorMode() =>
|
_i10.ColorMode getColorMode() =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#getColorMode, []),
|
Invocation.method(#getColorMode, []),
|
||||||
returnValue: _i9.ColorMode.system,
|
returnValue: _i10.ColorMode.system,
|
||||||
returnValueForMissingStub: _i9.ColorMode.system,
|
returnValueForMissingStub: _i10.ColorMode.system,
|
||||||
)
|
)
|
||||||
as _i9.ColorMode);
|
as _i10.ColorMode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setColorMode(_i9.ColorMode? color) =>
|
_i5.Future<void> setColorMode(_i10.ColorMode? color) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setColorMode, [color]),
|
Invocation.method(#setColorMode, [color]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setLocale(_i10.AppLocale? locale) =>
|
_i3.Color getCustomColor() =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getCustomColor, []),
|
||||||
|
returnValue: _FakeColor_1(
|
||||||
|
this,
|
||||||
|
Invocation.method(#getCustomColor, []),
|
||||||
|
),
|
||||||
|
returnValueForMissingStub: _FakeColor_1(
|
||||||
|
this,
|
||||||
|
Invocation.method(#getCustomColor, []),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
as _i3.Color);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_i5.Future<void> setCustomColor(_i3.Color? color) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#setCustomColor, [color]),
|
||||||
|
returnValue: _i5.Future<void>.value(),
|
||||||
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
|
)
|
||||||
|
as _i5.Future<void>);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_i5.Future<void> setLocale(_i11.AppLocale? locale) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setLocale, [locale]),
|
Invocation.method(#setLocale, [locale]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int getPort() =>
|
int getPort() =>
|
||||||
@@ -232,31 +261,31 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as int);
|
as int);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setPort(int? port) =>
|
_i5.Future<void> setPort(int? port) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setPort, [port]),
|
Invocation.method(#setPort, [port]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setNetworkWhitelist(List<String>? whitelist) =>
|
_i5.Future<void> setNetworkWhitelist(List<String>? whitelist) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setNetworkWhitelist, [whitelist]),
|
Invocation.method(#setNetworkWhitelist, [whitelist]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setNetworkBlacklist(List<String>? blacklist) =>
|
_i5.Future<void> setNetworkBlacklist(List<String>? blacklist) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setNetworkBlacklist, [blacklist]),
|
Invocation.method(#setNetworkBlacklist, [blacklist]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int getDiscoveryTimeout() =>
|
int getDiscoveryTimeout() =>
|
||||||
@@ -268,13 +297,13 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as int);
|
as int);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setDiscoveryTimeout(int? timeout) =>
|
_i5.Future<void> setDiscoveryTimeout(int? timeout) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setDiscoveryTimeout, [timeout]),
|
Invocation.method(#setDiscoveryTimeout, [timeout]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool getShareViaLinkAutoAccept() =>
|
bool getShareViaLinkAutoAccept() =>
|
||||||
@@ -286,15 +315,15 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as bool);
|
as bool);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setShareViaLinkAutoAccept(bool? shareViaLinkAutoAccept) =>
|
_i5.Future<void> setShareViaLinkAutoAccept(bool? shareViaLinkAutoAccept) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setShareViaLinkAutoAccept, [
|
Invocation.method(#setShareViaLinkAutoAccept, [
|
||||||
shareViaLinkAutoAccept,
|
shareViaLinkAutoAccept,
|
||||||
]),
|
]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool getReceiveViaLinkAutoAccept() =>
|
bool getReceiveViaLinkAutoAccept() =>
|
||||||
@@ -306,17 +335,17 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as bool);
|
as bool);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setReceiveViaLinkAutoAccept(
|
_i5.Future<void> setReceiveViaLinkAutoAccept(
|
||||||
bool? receiveViaLinkAutoAccept,
|
bool? receiveViaLinkAutoAccept,
|
||||||
) =>
|
) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setReceiveViaLinkAutoAccept, [
|
Invocation.method(#setReceiveViaLinkAutoAccept, [
|
||||||
receiveViaLinkAutoAccept,
|
receiveViaLinkAutoAccept,
|
||||||
]),
|
]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool getCreateChecksums() =>
|
bool getCreateChecksums() =>
|
||||||
@@ -328,13 +357,13 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as bool);
|
as bool);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setCreateChecksums(bool? createChecksums) =>
|
_i5.Future<void> setCreateChecksums(bool? createChecksums) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setCreateChecksums, [createChecksums]),
|
Invocation.method(#setCreateChecksums, [createChecksums]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool getVerifyChecksums() =>
|
bool getVerifyChecksums() =>
|
||||||
@@ -346,23 +375,23 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as bool);
|
as bool);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setVerifyChecksums(bool? verifyChecksums) =>
|
_i5.Future<void> setVerifyChecksums(bool? verifyChecksums) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setVerifyChecksums, [verifyChecksums]),
|
Invocation.method(#setVerifyChecksums, [verifyChecksums]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String getMulticastGroup() =>
|
String getMulticastGroup() =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#getMulticastGroup, []),
|
Invocation.method(#getMulticastGroup, []),
|
||||||
returnValue: _i7.dummyValue<String>(
|
returnValue: _i8.dummyValue<String>(
|
||||||
this,
|
this,
|
||||||
Invocation.method(#getMulticastGroup, []),
|
Invocation.method(#getMulticastGroup, []),
|
||||||
),
|
),
|
||||||
returnValueForMissingStub: _i7.dummyValue<String>(
|
returnValueForMissingStub: _i8.dummyValue<String>(
|
||||||
this,
|
this,
|
||||||
Invocation.method(#getMulticastGroup, []),
|
Invocation.method(#getMulticastGroup, []),
|
||||||
),
|
),
|
||||||
@@ -370,22 +399,22 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as String);
|
as String);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setMulticastGroup(String? group) =>
|
_i5.Future<void> setMulticastGroup(String? group) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setMulticastGroup, [group]),
|
Invocation.method(#setMulticastGroup, [group]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setDestination(String? destination) =>
|
_i5.Future<void> setDestination(String? destination) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setDestination, [destination]),
|
Invocation.method(#setDestination, [destination]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool isSaveToGallery() =>
|
bool isSaveToGallery() =>
|
||||||
@@ -397,13 +426,13 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as bool);
|
as bool);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setSaveToGallery(bool? saveToGallery) =>
|
_i5.Future<void> setSaveToGallery(bool? saveToGallery) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setSaveToGallery, [saveToGallery]),
|
Invocation.method(#setSaveToGallery, [saveToGallery]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool isSaveToHistory() =>
|
bool isSaveToHistory() =>
|
||||||
@@ -415,13 +444,13 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as bool);
|
as bool);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setSaveToHistory(bool? saveToHistory) =>
|
_i5.Future<void> setSaveToHistory(bool? saveToHistory) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setSaveToHistory, [saveToHistory]),
|
Invocation.method(#setSaveToHistory, [saveToHistory]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool getAdvancedSettingsEnabled() =>
|
bool getAdvancedSettingsEnabled() =>
|
||||||
@@ -433,40 +462,40 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as bool);
|
as bool);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setAdvancedSettingsEnabled(bool? isEnabled) =>
|
_i5.Future<void> setAdvancedSettingsEnabled(bool? isEnabled) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setAdvancedSettingsEnabled, [isEnabled]),
|
Invocation.method(#setAdvancedSettingsEnabled, [isEnabled]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i11.QuickSaveMode getQuickSave() =>
|
_i12.QuickSaveMode getQuickSave() =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#getQuickSave, []),
|
Invocation.method(#getQuickSave, []),
|
||||||
returnValue: _i11.QuickSaveMode.off,
|
returnValue: _i12.QuickSaveMode.off,
|
||||||
returnValueForMissingStub: _i11.QuickSaveMode.off,
|
returnValueForMissingStub: _i12.QuickSaveMode.off,
|
||||||
)
|
)
|
||||||
as _i11.QuickSaveMode);
|
as _i12.QuickSaveMode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setQuickSave(_i11.QuickSaveMode? mode) =>
|
_i5.Future<void> setQuickSave(_i12.QuickSaveMode? mode) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setQuickSave, [mode]),
|
Invocation.method(#setQuickSave, [mode]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setReceivePin(String? pin) =>
|
_i5.Future<void> setReceivePin(String? pin) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setReceivePin, [pin]),
|
Invocation.method(#setReceivePin, [pin]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool isAutoFinish() =>
|
bool isAutoFinish() =>
|
||||||
@@ -478,13 +507,13 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as bool);
|
as bool);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setAutoFinish(bool? autoFinish) =>
|
_i5.Future<void> setAutoFinish(bool? autoFinish) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setAutoFinish, [autoFinish]),
|
Invocation.method(#setAutoFinish, [autoFinish]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool isMinimizeToTray() =>
|
bool isMinimizeToTray() =>
|
||||||
@@ -496,13 +525,13 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as bool);
|
as bool);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setMinimizeToTray(bool? minimizeToTray) =>
|
_i5.Future<void> setMinimizeToTray(bool? minimizeToTray) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setMinimizeToTray, [minimizeToTray]),
|
Invocation.method(#setMinimizeToTray, [minimizeToTray]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool isHttps() =>
|
bool isHttps() =>
|
||||||
@@ -514,76 +543,76 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as bool);
|
as bool);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setHttps(bool? https) =>
|
_i5.Future<void> setHttps(bool? https) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setHttps, [https]),
|
Invocation.method(#setHttps, [https]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i12.SendMode getSendMode() =>
|
_i13.SendMode getSendMode() =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#getSendMode, []),
|
Invocation.method(#getSendMode, []),
|
||||||
returnValue: _i12.SendMode.single,
|
returnValue: _i13.SendMode.single,
|
||||||
returnValueForMissingStub: _i12.SendMode.single,
|
returnValueForMissingStub: _i13.SendMode.single,
|
||||||
)
|
)
|
||||||
as _i12.SendMode);
|
as _i13.SendMode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setSendMode(_i12.SendMode? mode) =>
|
_i5.Future<void> setSendMode(_i13.SendMode? mode) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setSendMode, [mode]),
|
Invocation.method(#setSendMode, [mode]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setWindowOffsetX(double? x) =>
|
_i5.Future<void> setWindowOffsetX(double? x) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setWindowOffsetX, [x]),
|
Invocation.method(#setWindowOffsetX, [x]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setWindowOffsetY(double? y) =>
|
_i5.Future<void> setWindowOffsetY(double? y) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setWindowOffsetY, [y]),
|
Invocation.method(#setWindowOffsetY, [y]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setWindowHeight(double? height) =>
|
_i5.Future<void> setWindowHeight(double? height) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setWindowHeight, [height]),
|
Invocation.method(#setWindowHeight, [height]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setWindowWidth(double? width) =>
|
_i5.Future<void> setWindowWidth(double? width) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setWindowWidth, [width]),
|
Invocation.method(#setWindowWidth, [width]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setSaveWindowPlacement(bool? savePlacement) =>
|
_i5.Future<void> setSaveWindowPlacement(bool? savePlacement) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setSaveWindowPlacement, [savePlacement]),
|
Invocation.method(#setSaveWindowPlacement, [savePlacement]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool getSaveWindowPlacement() =>
|
bool getSaveWindowPlacement() =>
|
||||||
@@ -595,13 +624,13 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as bool);
|
as bool);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setEnableAnimations(bool? enableAnimations) =>
|
_i5.Future<void> setEnableAnimations(bool? enableAnimations) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setEnableAnimations, [enableAnimations]),
|
Invocation.method(#setEnableAnimations, [enableAnimations]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool getEnableAnimations() =>
|
bool getEnableAnimations() =>
|
||||||
@@ -613,46 +642,46 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
|||||||
as bool);
|
as bool);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setDeviceType(_i13.DeviceType? deviceType) =>
|
_i5.Future<void> setDeviceType(_i14.DeviceType? deviceType) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setDeviceType, [deviceType]),
|
Invocation.method(#setDeviceType, [deviceType]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setDeviceModel(String? deviceModel) =>
|
_i5.Future<void> setDeviceModel(String? deviceModel) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setDeviceModel, [deviceModel]),
|
Invocation.method(#setDeviceModel, [deviceModel]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> setWhatsNew(String? version) =>
|
_i5.Future<void> setWhatsNew(String? version) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setWhatsNew, [version]),
|
Invocation.method(#setWhatsNew, [version]),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> clear() =>
|
_i5.Future<void> clear() =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#clear, []),
|
Invocation.method(#clear, []),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A class which mocks [SharedPreferences].
|
/// A class which mocks [SharedPreferences].
|
||||||
///
|
///
|
||||||
/// See the documentation for Mockito's code generation for more information.
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
class MockSharedPreferences extends _i1.Mock implements _i14.SharedPreferences {
|
class MockSharedPreferences extends _i1.Mock implements _i15.SharedPreferences {
|
||||||
@override
|
@override
|
||||||
Set<String> getKeys() =>
|
Set<String> getKeys() =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
@@ -720,83 +749,83 @@ class MockSharedPreferences extends _i1.Mock implements _i14.SharedPreferences {
|
|||||||
as List<String>?);
|
as List<String>?);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<bool> setBool(String? key, bool? value) =>
|
_i5.Future<bool> setBool(String? key, bool? value) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setBool, [key, value]),
|
Invocation.method(#setBool, [key, value]),
|
||||||
returnValue: _i4.Future<bool>.value(false),
|
returnValue: _i5.Future<bool>.value(false),
|
||||||
returnValueForMissingStub: _i4.Future<bool>.value(false),
|
returnValueForMissingStub: _i5.Future<bool>.value(false),
|
||||||
)
|
)
|
||||||
as _i4.Future<bool>);
|
as _i5.Future<bool>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<bool> setInt(String? key, int? value) =>
|
_i5.Future<bool> setInt(String? key, int? value) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setInt, [key, value]),
|
Invocation.method(#setInt, [key, value]),
|
||||||
returnValue: _i4.Future<bool>.value(false),
|
returnValue: _i5.Future<bool>.value(false),
|
||||||
returnValueForMissingStub: _i4.Future<bool>.value(false),
|
returnValueForMissingStub: _i5.Future<bool>.value(false),
|
||||||
)
|
)
|
||||||
as _i4.Future<bool>);
|
as _i5.Future<bool>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<bool> setDouble(String? key, double? value) =>
|
_i5.Future<bool> setDouble(String? key, double? value) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setDouble, [key, value]),
|
Invocation.method(#setDouble, [key, value]),
|
||||||
returnValue: _i4.Future<bool>.value(false),
|
returnValue: _i5.Future<bool>.value(false),
|
||||||
returnValueForMissingStub: _i4.Future<bool>.value(false),
|
returnValueForMissingStub: _i5.Future<bool>.value(false),
|
||||||
)
|
)
|
||||||
as _i4.Future<bool>);
|
as _i5.Future<bool>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<bool> setString(String? key, String? value) =>
|
_i5.Future<bool> setString(String? key, String? value) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setString, [key, value]),
|
Invocation.method(#setString, [key, value]),
|
||||||
returnValue: _i4.Future<bool>.value(false),
|
returnValue: _i5.Future<bool>.value(false),
|
||||||
returnValueForMissingStub: _i4.Future<bool>.value(false),
|
returnValueForMissingStub: _i5.Future<bool>.value(false),
|
||||||
)
|
)
|
||||||
as _i4.Future<bool>);
|
as _i5.Future<bool>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<bool> setStringList(String? key, List<String>? value) =>
|
_i5.Future<bool> setStringList(String? key, List<String>? value) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#setStringList, [key, value]),
|
Invocation.method(#setStringList, [key, value]),
|
||||||
returnValue: _i4.Future<bool>.value(false),
|
returnValue: _i5.Future<bool>.value(false),
|
||||||
returnValueForMissingStub: _i4.Future<bool>.value(false),
|
returnValueForMissingStub: _i5.Future<bool>.value(false),
|
||||||
)
|
)
|
||||||
as _i4.Future<bool>);
|
as _i5.Future<bool>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<bool> remove(String? key) =>
|
_i5.Future<bool> remove(String? key) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#remove, [key]),
|
Invocation.method(#remove, [key]),
|
||||||
returnValue: _i4.Future<bool>.value(false),
|
returnValue: _i5.Future<bool>.value(false),
|
||||||
returnValueForMissingStub: _i4.Future<bool>.value(false),
|
returnValueForMissingStub: _i5.Future<bool>.value(false),
|
||||||
)
|
)
|
||||||
as _i4.Future<bool>);
|
as _i5.Future<bool>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<bool> commit() =>
|
_i5.Future<bool> commit() =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#commit, []),
|
Invocation.method(#commit, []),
|
||||||
returnValue: _i4.Future<bool>.value(false),
|
returnValue: _i5.Future<bool>.value(false),
|
||||||
returnValueForMissingStub: _i4.Future<bool>.value(false),
|
returnValueForMissingStub: _i5.Future<bool>.value(false),
|
||||||
)
|
)
|
||||||
as _i4.Future<bool>);
|
as _i5.Future<bool>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<bool> clear() =>
|
_i5.Future<bool> clear() =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#clear, []),
|
Invocation.method(#clear, []),
|
||||||
returnValue: _i4.Future<bool>.value(false),
|
returnValue: _i5.Future<bool>.value(false),
|
||||||
returnValueForMissingStub: _i4.Future<bool>.value(false),
|
returnValueForMissingStub: _i5.Future<bool>.value(false),
|
||||||
)
|
)
|
||||||
as _i4.Future<bool>);
|
as _i5.Future<bool>);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i4.Future<void> reload() =>
|
_i5.Future<void> reload() =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(#reload, []),
|
Invocation.method(#reload, []),
|
||||||
returnValue: _i4.Future<void>.value(),
|
returnValue: _i5.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
)
|
)
|
||||||
as _i4.Future<void>);
|
as _i5.Future<void>);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user