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",
|
||||
"favorites": "Favorites",
|
||||
"on": "@:general.on"
|
||||
}
|
||||
},
|
||||
"link": "Receive via link"
|
||||
},
|
||||
"sendTab": {
|
||||
"title": "Send",
|
||||
@@ -97,7 +98,8 @@
|
||||
"color": "Color",
|
||||
"colorOptions": {
|
||||
"system": "System",
|
||||
"oled": "OLED"
|
||||
"oled": "OLED",
|
||||
"custom": "Custom"
|
||||
},
|
||||
"language": "Language",
|
||||
"languageOptions": {
|
||||
|
||||
@@ -10,12 +10,12 @@ import 'package:yaru/yaru.dart' as yaru;
|
||||
|
||||
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) {
|
||||
return _getYaruTheme(brightness);
|
||||
}
|
||||
|
||||
final colorScheme = _determineColorScheme(colorMode, brightness, dynamicColors);
|
||||
final colorScheme = _determineColorScheme(colorMode, customColor, brightness, dynamicColors);
|
||||
|
||||
final lightInputBorder = OutlineInputBorder(
|
||||
borderSide: BorderSide(color: colorScheme.secondaryContainer),
|
||||
@@ -140,7 +140,7 @@ extension InputDecorationThemeExt on InputDecorationThemeData {
|
||||
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(
|
||||
seedColor: Colors.teal,
|
||||
brightness: brightness,
|
||||
@@ -153,6 +153,10 @@ ColorScheme _determineColorScheme(ColorMode mode, Brightness brightness, Dynamic
|
||||
surface: Colors.black,
|
||||
),
|
||||
ColorMode.yaru => throw 'Should reach here',
|
||||
ColorMode.custom => ColorScheme.fromSeed(
|
||||
seedColor: customColor,
|
||||
brightness: brightness,
|
||||
),
|
||||
};
|
||||
|
||||
return colorScheme ?? defaultColorScheme;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/// To regenerate, run: `dart run slang`
|
||||
///
|
||||
/// Locales: 55
|
||||
/// Strings: 18453 (335 per locale)
|
||||
/// Strings: 18455 (335 per locale)
|
||||
|
||||
// coverage:ignore-file
|
||||
// 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$quickSave$en quickSave = Translations$receiveTab$quickSave$en.internal(_root);
|
||||
|
||||
/// en: 'Receive via link'
|
||||
String get link => 'Receive via link';
|
||||
}
|
||||
|
||||
// Path: sendTab
|
||||
@@ -1769,6 +1772,9 @@ class Translations$settingsTab$general$colorOptions$en {
|
||||
|
||||
/// en: 'OLED'
|
||||
String get oled => 'OLED';
|
||||
|
||||
/// en: 'Custom'
|
||||
String get custom => 'Custom';
|
||||
}
|
||||
|
||||
// Path: settingsTab.general.languageOptions
|
||||
|
||||
+5
-3
@@ -46,7 +46,9 @@ class LocalSendApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
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);
|
||||
return TrayWatcher(
|
||||
child: WindowWatcher(
|
||||
@@ -72,8 +74,8 @@ class LocalSendApp extends StatelessWidget {
|
||||
supportedLocales: AppLocaleUtils.supportedLocales,
|
||||
localizationsDelegates: GlobalMaterialLocalizations.delegates,
|
||||
debugShowCheckedModeBanner: false,
|
||||
theme: getTheme(colorMode, Brightness.light, dynamicColors),
|
||||
darkTheme: getTheme(colorMode, Brightness.dark, dynamicColors),
|
||||
theme: getTheme(colorMode, customColor, Brightness.light, dynamicColors),
|
||||
darkTheme: getTheme(colorMode, customColor, Brightness.dark, dynamicColors),
|
||||
themeMode: colorMode == ColorMode.oled ? ThemeMode.dark : themeMode,
|
||||
navigatorKey: context.read(navigationProvider).key,
|
||||
home: RouterinoHome(
|
||||
|
||||
@@ -3,4 +3,5 @@ enum ColorMode {
|
||||
localsend,
|
||||
oled,
|
||||
yaru,
|
||||
custom, // user-defined seed color
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ class SettingsState with SettingsStateMappable {
|
||||
final String alias;
|
||||
final ThemeMode theme;
|
||||
final ColorMode colorMode;
|
||||
final Color customColor; // seed color for ColorMode.custom
|
||||
final AppLocale? locale;
|
||||
final int port;
|
||||
final List<String>? networkWhitelist; // null = disabled
|
||||
@@ -44,6 +45,7 @@ class SettingsState with SettingsStateMappable {
|
||||
required this.alias,
|
||||
required this.theme,
|
||||
required this.colorMode,
|
||||
required this.customColor,
|
||||
required this.locale,
|
||||
required this.port,
|
||||
required this.networkWhitelist,
|
||||
|
||||
@@ -40,6 +40,11 @@ class SettingsStateMapper extends ClassMapperBase<SettingsState> {
|
||||
'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 const Field<SettingsState, AppLocale> _f$locale = Field(
|
||||
'locale',
|
||||
@@ -171,6 +176,7 @@ class SettingsStateMapper extends ClassMapperBase<SettingsState> {
|
||||
#alias: _f$alias,
|
||||
#theme: _f$theme,
|
||||
#colorMode: _f$colorMode,
|
||||
#customColor: _f$customColor,
|
||||
#locale: _f$locale,
|
||||
#port: _f$port,
|
||||
#networkWhitelist: _f$networkWhitelist,
|
||||
@@ -204,6 +210,7 @@ class SettingsStateMapper extends ClassMapperBase<SettingsState> {
|
||||
alias: data.dec(_f$alias),
|
||||
theme: data.dec(_f$theme),
|
||||
colorMode: data.dec(_f$colorMode),
|
||||
customColor: data.dec(_f$customColor),
|
||||
locale: data.dec(_f$locale),
|
||||
port: data.dec(_f$port),
|
||||
networkWhitelist: data.dec(_f$networkWhitelist),
|
||||
@@ -303,6 +310,7 @@ abstract class SettingsStateCopyWith<$R, $In extends SettingsState, $Out>
|
||||
String? alias,
|
||||
ThemeMode? theme,
|
||||
ColorMode? colorMode,
|
||||
Color? customColor,
|
||||
AppLocale? locale,
|
||||
int? port,
|
||||
List<String>? networkWhitelist,
|
||||
@@ -364,6 +372,7 @@ class _SettingsStateCopyWithImpl<$R, $Out>
|
||||
String? alias,
|
||||
ThemeMode? theme,
|
||||
ColorMode? colorMode,
|
||||
Color? customColor,
|
||||
Object? locale = $none,
|
||||
int? port,
|
||||
Object? networkWhitelist = $none,
|
||||
@@ -395,6 +404,7 @@ class _SettingsStateCopyWithImpl<$R, $Out>
|
||||
if (alias != null) #alias: alias,
|
||||
if (theme != null) #theme: theme,
|
||||
if (colorMode != null) #colorMode: colorMode,
|
||||
if (customColor != null) #customColor: customColor,
|
||||
if (locale != $none) #locale: locale,
|
||||
if (port != null) #port: port,
|
||||
if (networkWhitelist != $none) #networkWhitelist: networkWhitelist,
|
||||
@@ -432,6 +442,7 @@ class _SettingsStateCopyWithImpl<$R, $Out>
|
||||
alias: data.get(#alias, or: $value.alias),
|
||||
theme: data.get(#theme, or: $value.theme),
|
||||
colorMode: data.get(#colorMode, or: $value.colorMode),
|
||||
customColor: data.get(#customColor, or: $value.customColor),
|
||||
locale: data.get(#locale, or: $value.locale),
|
||||
port: data.get(#port, or: $value.port),
|
||||
networkWhitelist: data.get(#networkWhitelist, or: $value.networkWhitelist),
|
||||
|
||||
@@ -110,7 +110,7 @@ class _ReceiveTabState extends State<ReceiveTab> {
|
||||
await context.global.dispatchAsync(NavigateAction.push(const WebSharePage()));
|
||||
},
|
||||
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),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: vm.onChangeColorMode,
|
||||
onChanged: (colorMode) => vm.onChangeColorMode(context, colorMode),
|
||||
),
|
||||
),
|
||||
_ButtonEntry(
|
||||
@@ -768,6 +768,7 @@ extension on ColorMode {
|
||||
ColorMode.localsend => t.appName,
|
||||
ColorMode.oled => t.settingsTab.general.colorOptions.oled,
|
||||
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/ui/dynamic_colors.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/model/device_info_result.dart';
|
||||
import 'package:localsend_isolates/util/sleep.dart';
|
||||
@@ -80,7 +81,17 @@ class SettingsTabController extends ReduxNotifier<SettingsTabVm> {
|
||||
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);
|
||||
if (colorMode == ColorMode.oled) {
|
||||
await _settingsService.setTheme(ThemeMode.dark);
|
||||
|
||||
@@ -25,7 +25,7 @@ class SettingsTabVm with SettingsTabVmMappable {
|
||||
final bool autoStartLaunchHidden;
|
||||
final bool showInContextMenu;
|
||||
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) onToggleAutoStart;
|
||||
final void Function(BuildContext context) onToggleAutoStartLaunchHidden;
|
||||
|
||||
@@ -99,7 +99,8 @@ class SettingsTabVmMapper extends ClassMapperBase<SettingsTabVm> {
|
||||
);
|
||||
static Function _$onChangeColorMode(SettingsTabVm v) =>
|
||||
(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(
|
||||
'onChangeColorMode',
|
||||
_$onChangeColorMode,
|
||||
@@ -317,7 +318,7 @@ abstract class SettingsTabVmCopyWith<$R, $In extends SettingsTabVm, $Out>
|
||||
bool? autoStartLaunchHidden,
|
||||
bool? showInContextMenu,
|
||||
void Function(BuildContext, ThemeMode)? onChangeTheme,
|
||||
void Function(ColorMode)? onChangeColorMode,
|
||||
void Function(BuildContext, ColorMode)? onChangeColorMode,
|
||||
void Function(BuildContext)? onTapLanguage,
|
||||
void Function(BuildContext)? onToggleAutoStart,
|
||||
void Function(BuildContext)? onToggleAutoStartLaunchHidden,
|
||||
@@ -367,7 +368,7 @@ class _SettingsTabVmCopyWithImpl<$R, $Out>
|
||||
bool? autoStartLaunchHidden,
|
||||
bool? showInContextMenu,
|
||||
void Function(BuildContext, ThemeMode)? onChangeTheme,
|
||||
void Function(ColorMode)? onChangeColorMode,
|
||||
void Function(BuildContext, ColorMode)? onChangeColorMode,
|
||||
void Function(BuildContext)? onTapLanguage,
|
||||
void Function(BuildContext)? onToggleAutoStart,
|
||||
void Function(BuildContext)? onToggleAutoStartLaunchHidden,
|
||||
|
||||
@@ -70,6 +70,7 @@ const _showToken = 'ls_show_token';
|
||||
const _aliasKey = 'ls_alias';
|
||||
const _themeKey = 'ls_theme'; // now called brightness
|
||||
const _colorKey = 'ls_color';
|
||||
const _customColorKey = 'ls_custom_color'; // RRGGBB hex, used by ColorMode.custom
|
||||
const _localeKey = 'ls_locale';
|
||||
const _portKey = 'ls_port';
|
||||
const _networkWhitelistKey = 'ls_network_whitelist';
|
||||
@@ -307,6 +308,19 @@ class PersistenceService {
|
||||
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() {
|
||||
final value = _prefs.getString(_localeKey);
|
||||
if (value == null) {
|
||||
|
||||
@@ -49,6 +49,7 @@ class SettingsService extends PureNotifier<SettingsState> {
|
||||
alias: _persistence.getAlias(),
|
||||
theme: _persistence.getTheme(),
|
||||
colorMode: _persistence.getColorMode(),
|
||||
customColor: _persistence.getCustomColor(),
|
||||
locale: _persistence.getLocale(),
|
||||
port: _persistence.getPort(),
|
||||
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 {
|
||||
await _persistence.setAdvancedSettingsEnabled(isEnabled);
|
||||
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"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
|
||||
@@ -19,6 +19,7 @@ dependencies:
|
||||
dynamic_color: 1.8.1
|
||||
file_picker: 11.0.2
|
||||
file_selector: 1.1.0
|
||||
flex_color_picker: 3.8.0
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_displaymode: 0.7.0
|
||||
|
||||
+261
-232
@@ -3,21 +3,22 @@
|
||||
// Do not manually edit this file.
|
||||
|
||||
// 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:localsend_app/gen/strings.g.dart' as _i10;
|
||||
import 'package:localsend_app/model/persistence/color_mode.dart' as _i9;
|
||||
import 'package:localsend_app/model/persistence/favorite_device.dart' as _i6;
|
||||
import 'package:localsend_app/model/persistence/quick_save_mode.dart' as _i11;
|
||||
import 'package:localsend_app/model/persistence/receive_history_entry.dart' as _i5;
|
||||
import 'package:localsend_app/model/send_mode.dart' as _i12;
|
||||
import 'package:localsend_app/provider/persistence_provider.dart' as _i3;
|
||||
import 'package:localsend_isolates/model/device.dart' as _i13;
|
||||
import 'package:flutter/material.dart' as _i9;
|
||||
import 'package:localsend_app/gen/strings.g.dart' as _i11;
|
||||
import 'package:localsend_app/model/persistence/color_mode.dart' as _i10;
|
||||
import 'package:localsend_app/model/persistence/favorite_device.dart' as _i7;
|
||||
import 'package:localsend_app/model/persistence/quick_save_mode.dart' as _i12;
|
||||
import 'package:localsend_app/model/persistence/receive_history_entry.dart' as _i6;
|
||||
import 'package:localsend_app/model/send_mode.dart' as _i13;
|
||||
import 'package:localsend_app/provider/persistence_provider.dart' as _i4;
|
||||
import 'package:localsend_isolates/model/device.dart' as _i14;
|
||||
import 'package:localsend_isolates/model/stored_security_context.dart' as _i2;
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i7;
|
||||
import 'package:shared_preferences/shared_preferences.dart' as _i14;
|
||||
import 'package:mockito/src/dummies.dart' as _i8;
|
||||
import 'package:shared_preferences/shared_preferences.dart' as _i15;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// 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);
|
||||
}
|
||||
|
||||
class _FakeColor_1 extends _i1.SmartFake implements _i3.Color {
|
||||
_FakeColor_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [PersistenceService].
|
||||
///
|
||||
/// 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
|
||||
bool get isFirstAppStart =>
|
||||
(super.noSuchMethod(
|
||||
@@ -76,77 +81,77 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as _i2.StoredSecurityContext);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setSecurityContext(_i2.StoredSecurityContext? context) =>
|
||||
_i5.Future<void> setSecurityContext(_i2.StoredSecurityContext? context) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setSecurityContext, [context]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setSignalingServers(List<String>? servers) =>
|
||||
_i5.Future<void> setSignalingServers(List<String>? servers) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setSignalingServers, [servers]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setStunServers(List<String>? servers) =>
|
||||
_i5.Future<void> setStunServers(List<String>? servers) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setStunServers, [servers]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
List<_i5.ReceiveHistoryEntry> getReceiveHistory() =>
|
||||
List<_i6.ReceiveHistoryEntry> getReceiveHistory() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getReceiveHistory, []),
|
||||
returnValue: <_i5.ReceiveHistoryEntry>[],
|
||||
returnValueForMissingStub: <_i5.ReceiveHistoryEntry>[],
|
||||
returnValue: <_i6.ReceiveHistoryEntry>[],
|
||||
returnValueForMissingStub: <_i6.ReceiveHistoryEntry>[],
|
||||
)
|
||||
as List<_i5.ReceiveHistoryEntry>);
|
||||
as List<_i6.ReceiveHistoryEntry>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setReceiveHistory(List<_i5.ReceiveHistoryEntry>? entries) =>
|
||||
_i5.Future<void> setReceiveHistory(List<_i6.ReceiveHistoryEntry>? entries) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setReceiveHistory, [entries]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
List<_i6.FavoriteDevice> getFavorites() =>
|
||||
List<_i7.FavoriteDevice> getFavorites() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getFavorites, []),
|
||||
returnValue: <_i6.FavoriteDevice>[],
|
||||
returnValueForMissingStub: <_i6.FavoriteDevice>[],
|
||||
returnValue: <_i7.FavoriteDevice>[],
|
||||
returnValueForMissingStub: <_i7.FavoriteDevice>[],
|
||||
)
|
||||
as List<_i6.FavoriteDevice>);
|
||||
as List<_i7.FavoriteDevice>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setFavorites(List<_i6.FavoriteDevice>? entries) =>
|
||||
_i5.Future<void> setFavorites(List<_i7.FavoriteDevice>? entries) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setFavorites, [entries]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
String getShowToken() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getShowToken, []),
|
||||
returnValue: _i7.dummyValue<String>(
|
||||
returnValue: _i8.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getShowToken, []),
|
||||
),
|
||||
returnValueForMissingStub: _i7.dummyValue<String>(
|
||||
returnValueForMissingStub: _i8.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getShowToken, []),
|
||||
),
|
||||
@@ -157,11 +162,11 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
String getAlias() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getAlias, []),
|
||||
returnValue: _i7.dummyValue<String>(
|
||||
returnValue: _i8.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getAlias, []),
|
||||
),
|
||||
returnValueForMissingStub: _i7.dummyValue<String>(
|
||||
returnValueForMissingStub: _i8.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getAlias, []),
|
||||
),
|
||||
@@ -169,58 +174,82 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setAlias(String? alias) =>
|
||||
_i5.Future<void> setAlias(String? alias) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setAlias, [alias]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i8.ThemeMode getTheme() =>
|
||||
_i9.ThemeMode getTheme() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getTheme, []),
|
||||
returnValue: _i8.ThemeMode.system,
|
||||
returnValueForMissingStub: _i8.ThemeMode.system,
|
||||
returnValue: _i9.ThemeMode.system,
|
||||
returnValueForMissingStub: _i9.ThemeMode.system,
|
||||
)
|
||||
as _i8.ThemeMode);
|
||||
as _i9.ThemeMode);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setTheme(_i8.ThemeMode? theme) =>
|
||||
_i5.Future<void> setTheme(_i9.ThemeMode? theme) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setTheme, [theme]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.ColorMode getColorMode() =>
|
||||
_i10.ColorMode getColorMode() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getColorMode, []),
|
||||
returnValue: _i9.ColorMode.system,
|
||||
returnValueForMissingStub: _i9.ColorMode.system,
|
||||
returnValue: _i10.ColorMode.system,
|
||||
returnValueForMissingStub: _i10.ColorMode.system,
|
||||
)
|
||||
as _i9.ColorMode);
|
||||
as _i10.ColorMode);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setColorMode(_i9.ColorMode? color) =>
|
||||
_i5.Future<void> setColorMode(_i10.ColorMode? color) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setColorMode, [color]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@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(
|
||||
Invocation.method(#setLocale, [locale]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
int getPort() =>
|
||||
@@ -232,31 +261,31 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setPort(int? port) =>
|
||||
_i5.Future<void> setPort(int? port) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setPort, [port]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setNetworkWhitelist(List<String>? whitelist) =>
|
||||
_i5.Future<void> setNetworkWhitelist(List<String>? whitelist) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setNetworkWhitelist, [whitelist]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setNetworkBlacklist(List<String>? blacklist) =>
|
||||
_i5.Future<void> setNetworkBlacklist(List<String>? blacklist) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setNetworkBlacklist, [blacklist]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
int getDiscoveryTimeout() =>
|
||||
@@ -268,13 +297,13 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setDiscoveryTimeout(int? timeout) =>
|
||||
_i5.Future<void> setDiscoveryTimeout(int? timeout) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setDiscoveryTimeout, [timeout]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
bool getShareViaLinkAutoAccept() =>
|
||||
@@ -286,15 +315,15 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as bool);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setShareViaLinkAutoAccept(bool? shareViaLinkAutoAccept) =>
|
||||
_i5.Future<void> setShareViaLinkAutoAccept(bool? shareViaLinkAutoAccept) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setShareViaLinkAutoAccept, [
|
||||
shareViaLinkAutoAccept,
|
||||
]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
bool getReceiveViaLinkAutoAccept() =>
|
||||
@@ -306,17 +335,17 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as bool);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setReceiveViaLinkAutoAccept(
|
||||
_i5.Future<void> setReceiveViaLinkAutoAccept(
|
||||
bool? receiveViaLinkAutoAccept,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setReceiveViaLinkAutoAccept, [
|
||||
receiveViaLinkAutoAccept,
|
||||
]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
bool getCreateChecksums() =>
|
||||
@@ -328,13 +357,13 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as bool);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setCreateChecksums(bool? createChecksums) =>
|
||||
_i5.Future<void> setCreateChecksums(bool? createChecksums) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setCreateChecksums, [createChecksums]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
bool getVerifyChecksums() =>
|
||||
@@ -346,23 +375,23 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as bool);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setVerifyChecksums(bool? verifyChecksums) =>
|
||||
_i5.Future<void> setVerifyChecksums(bool? verifyChecksums) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setVerifyChecksums, [verifyChecksums]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
String getMulticastGroup() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getMulticastGroup, []),
|
||||
returnValue: _i7.dummyValue<String>(
|
||||
returnValue: _i8.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getMulticastGroup, []),
|
||||
),
|
||||
returnValueForMissingStub: _i7.dummyValue<String>(
|
||||
returnValueForMissingStub: _i8.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getMulticastGroup, []),
|
||||
),
|
||||
@@ -370,22 +399,22 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setMulticastGroup(String? group) =>
|
||||
_i5.Future<void> setMulticastGroup(String? group) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setMulticastGroup, [group]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setDestination(String? destination) =>
|
||||
_i5.Future<void> setDestination(String? destination) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setDestination, [destination]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
bool isSaveToGallery() =>
|
||||
@@ -397,13 +426,13 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as bool);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setSaveToGallery(bool? saveToGallery) =>
|
||||
_i5.Future<void> setSaveToGallery(bool? saveToGallery) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setSaveToGallery, [saveToGallery]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
bool isSaveToHistory() =>
|
||||
@@ -415,13 +444,13 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as bool);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setSaveToHistory(bool? saveToHistory) =>
|
||||
_i5.Future<void> setSaveToHistory(bool? saveToHistory) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setSaveToHistory, [saveToHistory]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
bool getAdvancedSettingsEnabled() =>
|
||||
@@ -433,40 +462,40 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as bool);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setAdvancedSettingsEnabled(bool? isEnabled) =>
|
||||
_i5.Future<void> setAdvancedSettingsEnabled(bool? isEnabled) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setAdvancedSettingsEnabled, [isEnabled]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.QuickSaveMode getQuickSave() =>
|
||||
_i12.QuickSaveMode getQuickSave() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getQuickSave, []),
|
||||
returnValue: _i11.QuickSaveMode.off,
|
||||
returnValueForMissingStub: _i11.QuickSaveMode.off,
|
||||
returnValue: _i12.QuickSaveMode.off,
|
||||
returnValueForMissingStub: _i12.QuickSaveMode.off,
|
||||
)
|
||||
as _i11.QuickSaveMode);
|
||||
as _i12.QuickSaveMode);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setQuickSave(_i11.QuickSaveMode? mode) =>
|
||||
_i5.Future<void> setQuickSave(_i12.QuickSaveMode? mode) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setQuickSave, [mode]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setReceivePin(String? pin) =>
|
||||
_i5.Future<void> setReceivePin(String? pin) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setReceivePin, [pin]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
bool isAutoFinish() =>
|
||||
@@ -478,13 +507,13 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as bool);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setAutoFinish(bool? autoFinish) =>
|
||||
_i5.Future<void> setAutoFinish(bool? autoFinish) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setAutoFinish, [autoFinish]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
bool isMinimizeToTray() =>
|
||||
@@ -496,13 +525,13 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as bool);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setMinimizeToTray(bool? minimizeToTray) =>
|
||||
_i5.Future<void> setMinimizeToTray(bool? minimizeToTray) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setMinimizeToTray, [minimizeToTray]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
bool isHttps() =>
|
||||
@@ -514,76 +543,76 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as bool);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setHttps(bool? https) =>
|
||||
_i5.Future<void> setHttps(bool? https) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setHttps, [https]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.SendMode getSendMode() =>
|
||||
_i13.SendMode getSendMode() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getSendMode, []),
|
||||
returnValue: _i12.SendMode.single,
|
||||
returnValueForMissingStub: _i12.SendMode.single,
|
||||
returnValue: _i13.SendMode.single,
|
||||
returnValueForMissingStub: _i13.SendMode.single,
|
||||
)
|
||||
as _i12.SendMode);
|
||||
as _i13.SendMode);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setSendMode(_i12.SendMode? mode) =>
|
||||
_i5.Future<void> setSendMode(_i13.SendMode? mode) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setSendMode, [mode]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setWindowOffsetX(double? x) =>
|
||||
_i5.Future<void> setWindowOffsetX(double? x) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setWindowOffsetX, [x]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setWindowOffsetY(double? y) =>
|
||||
_i5.Future<void> setWindowOffsetY(double? y) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setWindowOffsetY, [y]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setWindowHeight(double? height) =>
|
||||
_i5.Future<void> setWindowHeight(double? height) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setWindowHeight, [height]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setWindowWidth(double? width) =>
|
||||
_i5.Future<void> setWindowWidth(double? width) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setWindowWidth, [width]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setSaveWindowPlacement(bool? savePlacement) =>
|
||||
_i5.Future<void> setSaveWindowPlacement(bool? savePlacement) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setSaveWindowPlacement, [savePlacement]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
bool getSaveWindowPlacement() =>
|
||||
@@ -595,13 +624,13 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as bool);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setEnableAnimations(bool? enableAnimations) =>
|
||||
_i5.Future<void> setEnableAnimations(bool? enableAnimations) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setEnableAnimations, [enableAnimations]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
bool getEnableAnimations() =>
|
||||
@@ -613,46 +642,46 @@ class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService
|
||||
as bool);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setDeviceType(_i13.DeviceType? deviceType) =>
|
||||
_i5.Future<void> setDeviceType(_i14.DeviceType? deviceType) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setDeviceType, [deviceType]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setDeviceModel(String? deviceModel) =>
|
||||
_i5.Future<void> setDeviceModel(String? deviceModel) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setDeviceModel, [deviceModel]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> setWhatsNew(String? version) =>
|
||||
_i5.Future<void> setWhatsNew(String? version) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setWhatsNew, [version]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> clear() =>
|
||||
_i5.Future<void> clear() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
}
|
||||
|
||||
/// A class which mocks [SharedPreferences].
|
||||
///
|
||||
/// 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
|
||||
Set<String> getKeys() =>
|
||||
(super.noSuchMethod(
|
||||
@@ -720,83 +749,83 @@ class MockSharedPreferences extends _i1.Mock implements _i14.SharedPreferences {
|
||||
as List<String>?);
|
||||
|
||||
@override
|
||||
_i4.Future<bool> setBool(String? key, bool? value) =>
|
||||
_i5.Future<bool> setBool(String? key, bool? value) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setBool, [key, value]),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
returnValueForMissingStub: _i4.Future<bool>.value(false),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
returnValueForMissingStub: _i5.Future<bool>.value(false),
|
||||
)
|
||||
as _i4.Future<bool>);
|
||||
as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i4.Future<bool> setInt(String? key, int? value) =>
|
||||
_i5.Future<bool> setInt(String? key, int? value) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setInt, [key, value]),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
returnValueForMissingStub: _i4.Future<bool>.value(false),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
returnValueForMissingStub: _i5.Future<bool>.value(false),
|
||||
)
|
||||
as _i4.Future<bool>);
|
||||
as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i4.Future<bool> setDouble(String? key, double? value) =>
|
||||
_i5.Future<bool> setDouble(String? key, double? value) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setDouble, [key, value]),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
returnValueForMissingStub: _i4.Future<bool>.value(false),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
returnValueForMissingStub: _i5.Future<bool>.value(false),
|
||||
)
|
||||
as _i4.Future<bool>);
|
||||
as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i4.Future<bool> setString(String? key, String? value) =>
|
||||
_i5.Future<bool> setString(String? key, String? value) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setString, [key, value]),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
returnValueForMissingStub: _i4.Future<bool>.value(false),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
returnValueForMissingStub: _i5.Future<bool>.value(false),
|
||||
)
|
||||
as _i4.Future<bool>);
|
||||
as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i4.Future<bool> setStringList(String? key, List<String>? value) =>
|
||||
_i5.Future<bool> setStringList(String? key, List<String>? value) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setStringList, [key, value]),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
returnValueForMissingStub: _i4.Future<bool>.value(false),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
returnValueForMissingStub: _i5.Future<bool>.value(false),
|
||||
)
|
||||
as _i4.Future<bool>);
|
||||
as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i4.Future<bool> remove(String? key) =>
|
||||
_i5.Future<bool> remove(String? key) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#remove, [key]),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
returnValueForMissingStub: _i4.Future<bool>.value(false),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
returnValueForMissingStub: _i5.Future<bool>.value(false),
|
||||
)
|
||||
as _i4.Future<bool>);
|
||||
as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i4.Future<bool> commit() =>
|
||||
_i5.Future<bool> commit() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#commit, []),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
returnValueForMissingStub: _i4.Future<bool>.value(false),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
returnValueForMissingStub: _i5.Future<bool>.value(false),
|
||||
)
|
||||
as _i4.Future<bool>);
|
||||
as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i4.Future<bool> clear() =>
|
||||
_i5.Future<bool> clear() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
returnValueForMissingStub: _i4.Future<bool>.value(false),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
returnValueForMissingStub: _i5.Future<bool>.value(false),
|
||||
)
|
||||
as _i4.Future<bool>);
|
||||
as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> reload() =>
|
||||
_i5.Future<void> reload() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#reload, []),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
as _i5.Future<void>);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user