migration done
This commit is contained in:
+19
-3
@@ -2,8 +2,14 @@ targets:
|
|||||||
$default:
|
$default:
|
||||||
builders:
|
builders:
|
||||||
drift_dev:
|
drift_dev:
|
||||||
# These options change how drift generates code
|
# disable drift's default builder, we're using the modular setup
|
||||||
options:
|
# instead.
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Instead, enable drift_dev:analyzer and drift_dev:modular manually:
|
||||||
|
drift_dev:analyzer:
|
||||||
|
enabled: true
|
||||||
|
options: &options
|
||||||
skip_verification_code: true
|
skip_verification_code: true
|
||||||
data_class_to_companions: false
|
data_class_to_companions: false
|
||||||
named_parameters: true
|
named_parameters: true
|
||||||
@@ -19,6 +25,16 @@ targets:
|
|||||||
modules:
|
modules:
|
||||||
- json1
|
- json1
|
||||||
- fts5
|
- fts5
|
||||||
|
drift_dev:modular:
|
||||||
|
enabled: true
|
||||||
|
# We use yaml anchors to give the two builders the same options
|
||||||
|
options: *options
|
||||||
json_serializable:
|
json_serializable:
|
||||||
options:
|
options:
|
||||||
explicit_to_json: true
|
explicit_to_json: true
|
||||||
|
|
||||||
|
global_options:
|
||||||
|
drift_dev:modular:
|
||||||
|
runs_before:
|
||||||
|
- riverpod_generator
|
||||||
|
|
||||||
@@ -20,16 +20,15 @@
|
|||||||
import 'package:riverpod/riverpod.dart';
|
import 'package:riverpod/riverpod.dart';
|
||||||
import 'package:weblibre/core/logger.dart';
|
import 'package:weblibre/core/logger.dart';
|
||||||
|
|
||||||
class ErrorObserver extends ProviderObserver {
|
final class ErrorObserver extends ProviderObserver {
|
||||||
const ErrorObserver();
|
const ErrorObserver();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void providerDidFail(
|
void providerDidFail(
|
||||||
ProviderBase<Object?> provider,
|
ProviderObserverContext context,
|
||||||
Object error,
|
Object error,
|
||||||
StackTrace stackTrace,
|
StackTrace stackTrace,
|
||||||
ProviderContainer container,
|
|
||||||
) {
|
) {
|
||||||
logger.e('Provider $provider threw $error at $stackTrace');
|
logger.e('Provider ${context.provider} threw $error at $stackTrace');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,58 +6,129 @@ part of 'defaults.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(lightSeedColorFallback)
|
||||||
|
const lightSeedColorFallbackProvider = LightSeedColorFallbackProvider._();
|
||||||
|
|
||||||
|
final class LightSeedColorFallbackProvider
|
||||||
|
extends $FunctionalProvider<Color, Color, Color>
|
||||||
|
with $Provider<Color> {
|
||||||
|
const LightSeedColorFallbackProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'lightSeedColorFallbackProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$lightSeedColorFallbackHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<Color> $createElement($ProviderPointer pointer) =>
|
||||||
|
$ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Color create(Ref ref) {
|
||||||
|
return lightSeedColorFallback(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(Color value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<Color>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$lightSeedColorFallbackHash() =>
|
String _$lightSeedColorFallbackHash() =>
|
||||||
r'af151d3293d372f5df451aa8c3a75136377b6ce1';
|
r'af151d3293d372f5df451aa8c3a75136377b6ce1';
|
||||||
|
|
||||||
/// See also [lightSeedColorFallback].
|
@ProviderFor(darkSeedColorFallback)
|
||||||
@ProviderFor(lightSeedColorFallback)
|
const darkSeedColorFallbackProvider = DarkSeedColorFallbackProvider._();
|
||||||
final lightSeedColorFallbackProvider = Provider<Color>.internal(
|
|
||||||
lightSeedColorFallback,
|
final class DarkSeedColorFallbackProvider
|
||||||
name: r'lightSeedColorFallbackProvider',
|
extends $FunctionalProvider<Color, Color, Color>
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
with $Provider<Color> {
|
||||||
? null
|
const DarkSeedColorFallbackProvider._()
|
||||||
: _$lightSeedColorFallbackHash,
|
: super(
|
||||||
dependencies: null,
|
from: null,
|
||||||
allTransitiveDependencies: null,
|
argument: null,
|
||||||
);
|
retry: null,
|
||||||
|
name: r'darkSeedColorFallbackProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$darkSeedColorFallbackHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<Color> $createElement($ProviderPointer pointer) =>
|
||||||
|
$ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Color create(Ref ref) {
|
||||||
|
return darkSeedColorFallback(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(Color value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<Color>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef LightSeedColorFallbackRef = ProviderRef<Color>;
|
|
||||||
String _$darkSeedColorFallbackHash() =>
|
String _$darkSeedColorFallbackHash() =>
|
||||||
r'9418cf71e3d80c8a2142e0d3a8820989b29bff86';
|
r'9418cf71e3d80c8a2142e0d3a8820989b29bff86';
|
||||||
|
|
||||||
/// See also [darkSeedColorFallback].
|
|
||||||
@ProviderFor(darkSeedColorFallback)
|
|
||||||
final darkSeedColorFallbackProvider = Provider<Color>.internal(
|
|
||||||
darkSeedColorFallback,
|
|
||||||
name: r'darkSeedColorFallbackProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$darkSeedColorFallbackHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef DarkSeedColorFallbackRef = ProviderRef<Color>;
|
|
||||||
String _$docsUriHash() => r'6456efcf97ddc7ee87a67e2d3380f7241e3d76ea';
|
|
||||||
|
|
||||||
/// See also [docsUri].
|
|
||||||
@ProviderFor(docsUri)
|
@ProviderFor(docsUri)
|
||||||
final docsUriProvider = Provider<Uri>.internal(
|
const docsUriProvider = DocsUriProvider._();
|
||||||
docsUri,
|
|
||||||
name: r'docsUriProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$docsUriHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
final class DocsUriProvider extends $FunctionalProvider<Uri, Uri, Uri>
|
||||||
// ignore: unused_element
|
with $Provider<Uri> {
|
||||||
typedef DocsUriRef = ProviderRef<Uri>;
|
const DocsUriProvider._()
|
||||||
// ignore_for_file: type=lint
|
: super(
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'docsUriProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$docsUriHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<Uri> $createElement($ProviderPointer pointer) =>
|
||||||
|
$ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Uri create(Ref ref) {
|
||||||
|
return docsUri(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(Uri value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<Uri>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$docsUriHash() => r'6456efcf97ddc7ee87a67e2d3380f7241e3d76ea';
|
||||||
|
|||||||
@@ -6,20 +6,49 @@ part of 'format.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(Format)
|
||||||
|
const formatProvider = FormatProvider._();
|
||||||
|
|
||||||
|
final class FormatProvider extends $AsyncNotifierProvider<Format, void> {
|
||||||
|
const FormatProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'formatProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$formatHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
Format create() => Format();
|
||||||
|
}
|
||||||
|
|
||||||
String _$formatHash() => r'fe7fcdd19b512784a36f3838c57701030475e429';
|
String _$formatHash() => r'fe7fcdd19b512784a36f3838c57701030475e429';
|
||||||
|
|
||||||
/// See also [Format].
|
abstract class _$Format extends $AsyncNotifier<void> {
|
||||||
@ProviderFor(Format)
|
FutureOr<void> build();
|
||||||
final formatProvider = AsyncNotifierProvider<Format, void>.internal(
|
@$mustCallSuper
|
||||||
Format.new,
|
@override
|
||||||
name: r'formatProvider',
|
void runBuild() {
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
build();
|
||||||
? null
|
final ref = this.ref as $Ref<AsyncValue<void>, void>;
|
||||||
: _$formatHash,
|
final element =
|
||||||
dependencies: null,
|
ref.element
|
||||||
allTransitiveDependencies: null,
|
as $ClassProviderElement<
|
||||||
);
|
AnyNotifier<AsyncValue<void>, void>,
|
||||||
|
AsyncValue<void>,
|
||||||
typedef _$Format = AsyncNotifier<void>;
|
Object?,
|
||||||
// ignore_for_file: type=lint
|
Object?
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
>;
|
||||||
|
element.handleValue(ref, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,21 +6,58 @@ part of 'global_drop.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(WillAcceptDrop)
|
||||||
|
const willAcceptDropProvider = WillAcceptDropProvider._();
|
||||||
|
|
||||||
|
final class WillAcceptDropProvider
|
||||||
|
extends $NotifierProvider<WillAcceptDrop, DropTargetData?> {
|
||||||
|
const WillAcceptDropProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'willAcceptDropProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$willAcceptDropHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
WillAcceptDrop create() => WillAcceptDrop();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(DropTargetData? value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<DropTargetData?>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$willAcceptDropHash() => r'97b47784ef9101757602b4408d1f545ef2308830';
|
String _$willAcceptDropHash() => r'97b47784ef9101757602b4408d1f545ef2308830';
|
||||||
|
|
||||||
/// See also [WillAcceptDrop].
|
abstract class _$WillAcceptDrop extends $Notifier<DropTargetData?> {
|
||||||
@ProviderFor(WillAcceptDrop)
|
DropTargetData? build();
|
||||||
final willAcceptDropProvider =
|
@$mustCallSuper
|
||||||
AutoDisposeNotifierProvider<WillAcceptDrop, DropTargetData?>.internal(
|
@override
|
||||||
WillAcceptDrop.new,
|
void runBuild() {
|
||||||
name: r'willAcceptDropProvider',
|
final created = build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref = this.ref as $Ref<DropTargetData?, DropTargetData?>;
|
||||||
? null
|
final element =
|
||||||
: _$willAcceptDropHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<DropTargetData?, DropTargetData?>,
|
||||||
);
|
DropTargetData?,
|
||||||
|
Object?,
|
||||||
typedef _$WillAcceptDrop = AutoDisposeNotifier<DropTargetData?>;
|
Object?
|
||||||
// ignore_for_file: type=lint
|
>;
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,22 +6,39 @@ part of 'router.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$routerHash() => r'ce7cc5b5f236781a06867a852a08ed03d3582022';
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// See also [router].
|
|
||||||
@ProviderFor(router)
|
@ProviderFor(router)
|
||||||
final routerProvider = FutureProvider<GoRouter>.internal(
|
const routerProvider = RouterProvider._();
|
||||||
router,
|
|
||||||
name: r'routerProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$routerHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
final class RouterProvider
|
||||||
// ignore: unused_element
|
extends
|
||||||
typedef RouterRef = FutureProviderRef<GoRouter>;
|
$FunctionalProvider<AsyncValue<GoRouter>, GoRouter, FutureOr<GoRouter>>
|
||||||
// ignore_for_file: type=lint
|
with $FutureModifier<GoRouter>, $FutureProvider<GoRouter> {
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
const RouterProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'routerProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$routerHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$FutureProviderElement<GoRouter> $createElement($ProviderPointer pointer) =>
|
||||||
|
$FutureProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<GoRouter> create(Ref ref) {
|
||||||
|
return router(ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$routerHash() => r'ce7cc5b5f236781a06867a852a08ed03d3582022';
|
||||||
|
|||||||
@@ -39,14 +39,14 @@ part of 'routes.dart';
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
class BangCategoriesRoute extends GoRouteData with _$BangCategoriesRoute {
|
class BangCategoriesRoute extends GoRouteData with $BangCategoriesRoute {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, GoRouterState state) {
|
Widget build(BuildContext context, GoRouterState state) {
|
||||||
return const BangCategoriesScreen();
|
return const BangCategoriesScreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class BangCategoryRoute extends GoRouteData with _$BangCategoryRoute {
|
class BangCategoryRoute extends GoRouteData with $BangCategoryRoute {
|
||||||
final String category;
|
final String category;
|
||||||
|
|
||||||
const BangCategoryRoute({required this.category});
|
const BangCategoryRoute({required this.category});
|
||||||
@@ -57,7 +57,7 @@ class BangCategoryRoute extends GoRouteData with _$BangCategoryRoute {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class BangSubCategoryRoute extends GoRouteData with _$BangSubCategoryRoute {
|
class BangSubCategoryRoute extends GoRouteData with $BangSubCategoryRoute {
|
||||||
final String category;
|
final String category;
|
||||||
final String subCategory;
|
final String subCategory;
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ class BangSubCategoryRoute extends GoRouteData with _$BangSubCategoryRoute {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class BangSearchRoute extends GoRouteData with _$BangSearchRoute {
|
class BangSearchRoute extends GoRouteData with $BangSearchRoute {
|
||||||
static const String emptySearchText = ' ';
|
static const String emptySearchText = ' ';
|
||||||
|
|
||||||
//This should be nullable but isnt allowed by go_router
|
//This should be nullable but isnt allowed by go_router
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ part of 'routes.dart';
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
class BrowserRoute extends GoRouteData with _$BrowserRoute {
|
class BrowserRoute extends GoRouteData with $BrowserRoute {
|
||||||
static const name = 'BrowserRoute';
|
static const name = 'BrowserRoute';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -72,7 +72,7 @@ class BrowserRoute extends GoRouteData with _$BrowserRoute {
|
|||||||
|
|
||||||
enum TabType { regular, private, child }
|
enum TabType { regular, private, child }
|
||||||
|
|
||||||
class SearchRoute extends GoRouteData with _$SearchRoute {
|
class SearchRoute extends GoRouteData with $SearchRoute {
|
||||||
static const String emptySearchText = ' ';
|
static const String emptySearchText = ' ';
|
||||||
|
|
||||||
final TabType tabType;
|
final TabType tabType;
|
||||||
@@ -100,14 +100,14 @@ class SearchRoute extends GoRouteData with _$SearchRoute {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TorProxyRoute extends GoRouteData with _$TorProxyRoute {
|
class TorProxyRoute extends GoRouteData with $TorProxyRoute {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, GoRouterState state) {
|
Widget build(BuildContext context, GoRouterState state) {
|
||||||
return const TorProxyScreen();
|
return const TorProxyScreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ContainerListRoute extends GoRouteData with _$ContainerListRoute {
|
class ContainerListRoute extends GoRouteData with $ContainerListRoute {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, GoRouterState state) {
|
Widget build(BuildContext context, GoRouterState state) {
|
||||||
return const ContainerListScreen();
|
return const ContainerListScreen();
|
||||||
@@ -115,14 +115,14 @@ class ContainerListRoute extends GoRouteData with _$ContainerListRoute {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class ContainerSelectionRoute extends GoRouteData
|
class ContainerSelectionRoute extends GoRouteData
|
||||||
with _$ContainerSelectionRoute {
|
with $ContainerSelectionRoute {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, GoRouterState state) {
|
Widget build(BuildContext context, GoRouterState state) {
|
||||||
return const ContainerSelectionScreen();
|
return const ContainerSelectionScreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ContainerEditRoute extends GoRouteData with _$ContainerEditRoute {
|
class ContainerEditRoute extends GoRouteData with $ContainerEditRoute {
|
||||||
final ContainerDataWithCount $extra;
|
final ContainerDataWithCount $extra;
|
||||||
|
|
||||||
ContainerEditRoute(this.$extra);
|
ContainerEditRoute(this.$extra);
|
||||||
@@ -133,7 +133,7 @@ class ContainerEditRoute extends GoRouteData with _$ContainerEditRoute {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ContainerCreateRoute extends GoRouteData with _$ContainerCreateRoute {
|
class ContainerCreateRoute extends GoRouteData with $ContainerCreateRoute {
|
||||||
final ContainerData $extra;
|
final ContainerData $extra;
|
||||||
|
|
||||||
ContainerCreateRoute(this.$extra);
|
ContainerCreateRoute(this.$extra);
|
||||||
@@ -144,7 +144,7 @@ class ContainerCreateRoute extends GoRouteData with _$ContainerCreateRoute {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ContextMenuRoute extends GoRouteData with _$ContextMenuRoute {
|
class ContextMenuRoute extends GoRouteData with $ContextMenuRoute {
|
||||||
final String $extra;
|
final String $extra;
|
||||||
|
|
||||||
const ContextMenuRoute(this.$extra);
|
const ContextMenuRoute(this.$extra);
|
||||||
@@ -158,7 +158,7 @@ class ContextMenuRoute extends GoRouteData with _$ContextMenuRoute {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TabTreeRoute extends GoRouteData with _$TabTreeRoute {
|
class TabTreeRoute extends GoRouteData with $TabTreeRoute {
|
||||||
final String rootTabId;
|
final String rootTabId;
|
||||||
|
|
||||||
const TabTreeRoute(this.rootTabId);
|
const TabTreeRoute(this.rootTabId);
|
||||||
@@ -169,7 +169,7 @@ class TabTreeRoute extends GoRouteData with _$TabTreeRoute {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class OpenSharedContentRoute extends GoRouteData with _$OpenSharedContentRoute {
|
class OpenSharedContentRoute extends GoRouteData with $OpenSharedContentRoute {
|
||||||
final Uri $extra;
|
final Uri $extra;
|
||||||
|
|
||||||
const OpenSharedContentRoute(this.$extra);
|
const OpenSharedContentRoute(this.$extra);
|
||||||
@@ -180,7 +180,7 @@ class OpenSharedContentRoute extends GoRouteData with _$OpenSharedContentRoute {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class HistoryRoute extends GoRouteData with _$HistoryRoute {
|
class HistoryRoute extends GoRouteData with $HistoryRoute {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, GoRouterState state) {
|
Widget build(BuildContext context, GoRouterState state) {
|
||||||
return const HistoryScreen();
|
return const HistoryScreen();
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ part 'routes.bangs.dart';
|
|||||||
part 'routes.feeds.dart';
|
part 'routes.feeds.dart';
|
||||||
|
|
||||||
@TypedGoRoute<AboutRoute>(name: 'AboutRoute', path: '/about')
|
@TypedGoRoute<AboutRoute>(name: 'AboutRoute', path: '/about')
|
||||||
class AboutRoute extends GoRouteData with _$AboutRoute {
|
class AboutRoute extends GoRouteData with $AboutRoute {
|
||||||
@override
|
@override
|
||||||
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||||
return DialogPage(builder: (_) => const AboutDialogScreen());
|
return DialogPage(builder: (_) => const AboutDialogScreen());
|
||||||
@@ -71,7 +71,7 @@ class AboutRoute extends GoRouteData with _$AboutRoute {
|
|||||||
name: 'OnboardingRoute',
|
name: 'OnboardingRoute',
|
||||||
path: '/onboarding/:currentRevision/:targetRevision',
|
path: '/onboarding/:currentRevision/:targetRevision',
|
||||||
)
|
)
|
||||||
class OnboardingRoute extends GoRouteData with _$OnboardingRoute {
|
class OnboardingRoute extends GoRouteData with $OnboardingRoute {
|
||||||
final int currentRevision;
|
final int currentRevision;
|
||||||
final int targetRevision;
|
final int targetRevision;
|
||||||
|
|
||||||
|
|||||||
@@ -43,14 +43,14 @@ part of 'routes.dart';
|
|||||||
TypedGoRoute<FeedEditRoute>(name: 'FeedEditRoute', path: 'edit/:feedId'),
|
TypedGoRoute<FeedEditRoute>(name: 'FeedEditRoute', path: 'edit/:feedId'),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
class FeedListRoute extends GoRouteData with _$FeedListRoute {
|
class FeedListRoute extends GoRouteData with $FeedListRoute {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, GoRouterState state) {
|
Widget build(BuildContext context, GoRouterState state) {
|
||||||
return const FeedListScreen();
|
return const FeedListScreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FeedCreateRoute extends GoRouteData with _$FeedCreateRoute {
|
class FeedCreateRoute extends GoRouteData with $FeedCreateRoute {
|
||||||
final Uri feedId;
|
final Uri feedId;
|
||||||
|
|
||||||
FeedCreateRoute({required this.feedId});
|
FeedCreateRoute({required this.feedId});
|
||||||
@@ -61,7 +61,7 @@ class FeedCreateRoute extends GoRouteData with _$FeedCreateRoute {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SelectFeedDialogRoute extends GoRouteData with _$SelectFeedDialogRoute {
|
class SelectFeedDialogRoute extends GoRouteData with $SelectFeedDialogRoute {
|
||||||
final String feedsJson;
|
final String feedsJson;
|
||||||
|
|
||||||
const SelectFeedDialogRoute({required this.feedsJson});
|
const SelectFeedDialogRoute({required this.feedsJson});
|
||||||
@@ -78,7 +78,7 @@ class SelectFeedDialogRoute extends GoRouteData with _$SelectFeedDialogRoute {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FeedEditRoute extends GoRouteData with _$FeedEditRoute {
|
class FeedEditRoute extends GoRouteData with $FeedEditRoute {
|
||||||
final Uri feedId;
|
final Uri feedId;
|
||||||
|
|
||||||
const FeedEditRoute({required this.feedId});
|
const FeedEditRoute({required this.feedId});
|
||||||
@@ -89,7 +89,7 @@ class FeedEditRoute extends GoRouteData with _$FeedEditRoute {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FeedAddRoute extends GoRouteData with _$FeedAddRoute {
|
class FeedAddRoute extends GoRouteData with $FeedAddRoute {
|
||||||
final Uri? $extra;
|
final Uri? $extra;
|
||||||
|
|
||||||
static const name = 'FeedAddRoute';
|
static const name = 'FeedAddRoute';
|
||||||
@@ -102,7 +102,7 @@ class FeedAddRoute extends GoRouteData with _$FeedAddRoute {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FeedArticleListRoute extends GoRouteData with _$FeedArticleListRoute {
|
class FeedArticleListRoute extends GoRouteData with $FeedArticleListRoute {
|
||||||
final Uri feedId;
|
final Uri feedId;
|
||||||
|
|
||||||
FeedArticleListRoute({required this.feedId});
|
FeedArticleListRoute({required this.feedId});
|
||||||
@@ -113,7 +113,7 @@ class FeedArticleListRoute extends GoRouteData with _$FeedArticleListRoute {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FeedArticleRoute extends GoRouteData with _$FeedArticleRoute {
|
class FeedArticleRoute extends GoRouteData with $FeedArticleRoute {
|
||||||
final String articleId;
|
final String articleId;
|
||||||
|
|
||||||
FeedArticleRoute({required this.articleId});
|
FeedArticleRoute({required this.articleId});
|
||||||
|
|||||||
@@ -18,11 +18,10 @@ List<RouteBase> get $appRoutes => [
|
|||||||
RouteBase get $aboutRoute => GoRouteData.$route(
|
RouteBase get $aboutRoute => GoRouteData.$route(
|
||||||
path: '/about',
|
path: '/about',
|
||||||
name: 'AboutRoute',
|
name: 'AboutRoute',
|
||||||
|
factory: $AboutRoute._fromState,
|
||||||
factory: _$AboutRoute._fromState,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
mixin _$AboutRoute on GoRouteData {
|
mixin $AboutRoute on GoRouteData {
|
||||||
static AboutRoute _fromState(GoRouterState state) => AboutRoute();
|
static AboutRoute _fromState(GoRouterState state) => AboutRoute();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -45,14 +44,13 @@ mixin _$AboutRoute on GoRouteData {
|
|||||||
RouteBase get $onboardingRoute => GoRouteData.$route(
|
RouteBase get $onboardingRoute => GoRouteData.$route(
|
||||||
path: '/onboarding/:currentRevision/:targetRevision',
|
path: '/onboarding/:currentRevision/:targetRevision',
|
||||||
name: 'OnboardingRoute',
|
name: 'OnboardingRoute',
|
||||||
|
factory: $OnboardingRoute._fromState,
|
||||||
factory: _$OnboardingRoute._fromState,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
mixin _$OnboardingRoute on GoRouteData {
|
mixin $OnboardingRoute on GoRouteData {
|
||||||
static OnboardingRoute _fromState(GoRouterState state) => OnboardingRoute(
|
static OnboardingRoute _fromState(GoRouterState state) => OnboardingRoute(
|
||||||
currentRevision: int.parse(state.pathParameters['currentRevision']!)!,
|
currentRevision: int.parse(state.pathParameters['currentRevision']!),
|
||||||
targetRevision: int.parse(state.pathParameters['targetRevision']!)!,
|
targetRevision: int.parse(state.pathParameters['targetRevision']!),
|
||||||
);
|
);
|
||||||
|
|
||||||
OnboardingRoute get _self => this as OnboardingRoute;
|
OnboardingRoute get _self => this as OnboardingRoute;
|
||||||
@@ -79,38 +77,32 @@ mixin _$OnboardingRoute on GoRouteData {
|
|||||||
RouteBase get $settingsRoute => GoRouteData.$route(
|
RouteBase get $settingsRoute => GoRouteData.$route(
|
||||||
path: '/settings',
|
path: '/settings',
|
||||||
name: 'SettingsRoute',
|
name: 'SettingsRoute',
|
||||||
|
factory: $SettingsRoute._fromState,
|
||||||
factory: _$SettingsRoute._fromState,
|
|
||||||
routes: [
|
routes: [
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'general',
|
path: 'general',
|
||||||
name: 'GeneralSettingsRoute',
|
name: 'GeneralSettingsRoute',
|
||||||
|
factory: $GeneralSettingsRoute._fromState,
|
||||||
factory: _$GeneralSettingsRoute._fromState,
|
|
||||||
),
|
),
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'bang',
|
path: 'bang',
|
||||||
name: 'BangSettingsRoute',
|
name: 'BangSettingsRoute',
|
||||||
|
factory: $BangSettingsRoute._fromState,
|
||||||
factory: _$BangSettingsRoute._fromState,
|
|
||||||
),
|
),
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'web_engine',
|
path: 'web_engine',
|
||||||
name: 'WebEngineSettingsRoute',
|
name: 'WebEngineSettingsRoute',
|
||||||
|
factory: $WebEngineSettingsRoute._fromState,
|
||||||
factory: _$WebEngineSettingsRoute._fromState,
|
|
||||||
routes: [
|
routes: [
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'hardening',
|
path: 'hardening',
|
||||||
name: 'WebEngineHardeningRoute',
|
name: 'WebEngineHardeningRoute',
|
||||||
|
factory: $WebEngineHardeningRoute._fromState,
|
||||||
factory: _$WebEngineHardeningRoute._fromState,
|
|
||||||
routes: [
|
routes: [
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'group/:group',
|
path: 'group/:group',
|
||||||
name: 'WebEngineHardeningGroupRoute',
|
name: 'WebEngineHardeningGroupRoute',
|
||||||
|
factory: $WebEngineHardeningGroupRoute._fromState,
|
||||||
factory: _$WebEngineHardeningGroupRoute._fromState,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -119,13 +111,12 @@ RouteBase get $settingsRoute => GoRouteData.$route(
|
|||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'developer',
|
path: 'developer',
|
||||||
name: 'DeveloperSettingsRoute',
|
name: 'DeveloperSettingsRoute',
|
||||||
|
factory: $DeveloperSettingsRoute._fromState,
|
||||||
factory: _$DeveloperSettingsRoute._fromState,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
mixin _$SettingsRoute on GoRouteData {
|
mixin $SettingsRoute on GoRouteData {
|
||||||
static SettingsRoute _fromState(GoRouterState state) => SettingsRoute();
|
static SettingsRoute _fromState(GoRouterState state) => SettingsRoute();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -145,7 +136,7 @@ mixin _$SettingsRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$GeneralSettingsRoute on GoRouteData {
|
mixin $GeneralSettingsRoute on GoRouteData {
|
||||||
static GeneralSettingsRoute _fromState(GoRouterState state) =>
|
static GeneralSettingsRoute _fromState(GoRouterState state) =>
|
||||||
GeneralSettingsRoute();
|
GeneralSettingsRoute();
|
||||||
|
|
||||||
@@ -166,7 +157,7 @@ mixin _$GeneralSettingsRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$BangSettingsRoute on GoRouteData {
|
mixin $BangSettingsRoute on GoRouteData {
|
||||||
static BangSettingsRoute _fromState(GoRouterState state) =>
|
static BangSettingsRoute _fromState(GoRouterState state) =>
|
||||||
BangSettingsRoute();
|
BangSettingsRoute();
|
||||||
|
|
||||||
@@ -187,7 +178,7 @@ mixin _$BangSettingsRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$WebEngineSettingsRoute on GoRouteData {
|
mixin $WebEngineSettingsRoute on GoRouteData {
|
||||||
static WebEngineSettingsRoute _fromState(GoRouterState state) =>
|
static WebEngineSettingsRoute _fromState(GoRouterState state) =>
|
||||||
WebEngineSettingsRoute();
|
WebEngineSettingsRoute();
|
||||||
|
|
||||||
@@ -208,7 +199,7 @@ mixin _$WebEngineSettingsRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$WebEngineHardeningRoute on GoRouteData {
|
mixin $WebEngineHardeningRoute on GoRouteData {
|
||||||
static WebEngineHardeningRoute _fromState(GoRouterState state) =>
|
static WebEngineHardeningRoute _fromState(GoRouterState state) =>
|
||||||
WebEngineHardeningRoute();
|
WebEngineHardeningRoute();
|
||||||
|
|
||||||
@@ -230,7 +221,7 @@ mixin _$WebEngineHardeningRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$WebEngineHardeningGroupRoute on GoRouteData {
|
mixin $WebEngineHardeningGroupRoute on GoRouteData {
|
||||||
static WebEngineHardeningGroupRoute _fromState(GoRouterState state) =>
|
static WebEngineHardeningGroupRoute _fromState(GoRouterState state) =>
|
||||||
WebEngineHardeningGroupRoute(group: state.pathParameters['group']!);
|
WebEngineHardeningGroupRoute(group: state.pathParameters['group']!);
|
||||||
|
|
||||||
@@ -256,7 +247,7 @@ mixin _$WebEngineHardeningGroupRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$DeveloperSettingsRoute on GoRouteData {
|
mixin $DeveloperSettingsRoute on GoRouteData {
|
||||||
static DeveloperSettingsRoute _fromState(GoRouterState state) =>
|
static DeveloperSettingsRoute _fromState(GoRouterState state) =>
|
||||||
DeveloperSettingsRoute();
|
DeveloperSettingsRoute();
|
||||||
|
|
||||||
@@ -280,75 +271,64 @@ mixin _$DeveloperSettingsRoute on GoRouteData {
|
|||||||
RouteBase get $browserRoute => GoRouteData.$route(
|
RouteBase get $browserRoute => GoRouteData.$route(
|
||||||
path: '/',
|
path: '/',
|
||||||
name: 'BrowserRoute',
|
name: 'BrowserRoute',
|
||||||
|
factory: $BrowserRoute._fromState,
|
||||||
factory: _$BrowserRoute._fromState,
|
|
||||||
routes: [
|
routes: [
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'search/:tabType/:searchText',
|
path: 'search/:tabType/:searchText',
|
||||||
name: 'SearchRoute',
|
name: 'SearchRoute',
|
||||||
|
factory: $SearchRoute._fromState,
|
||||||
factory: _$SearchRoute._fromState,
|
|
||||||
),
|
),
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'tor_proxy',
|
path: 'tor_proxy',
|
||||||
name: 'TorProxyRoute',
|
name: 'TorProxyRoute',
|
||||||
|
factory: $TorProxyRoute._fromState,
|
||||||
factory: _$TorProxyRoute._fromState,
|
|
||||||
),
|
),
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'history',
|
path: 'history',
|
||||||
name: 'HistoryRoute',
|
name: 'HistoryRoute',
|
||||||
|
factory: $HistoryRoute._fromState,
|
||||||
factory: _$HistoryRoute._fromState,
|
|
||||||
),
|
),
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'context_menu',
|
path: 'context_menu',
|
||||||
name: 'ContextMenuRoute',
|
name: 'ContextMenuRoute',
|
||||||
|
factory: $ContextMenuRoute._fromState,
|
||||||
factory: _$ContextMenuRoute._fromState,
|
|
||||||
),
|
),
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'containers',
|
path: 'containers',
|
||||||
name: 'ContainerListRoute',
|
name: 'ContainerListRoute',
|
||||||
|
factory: $ContainerListRoute._fromState,
|
||||||
factory: _$ContainerListRoute._fromState,
|
|
||||||
routes: [
|
routes: [
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'create',
|
path: 'create',
|
||||||
name: 'ContainerCreateRoute',
|
name: 'ContainerCreateRoute',
|
||||||
|
factory: $ContainerCreateRoute._fromState,
|
||||||
factory: _$ContainerCreateRoute._fromState,
|
|
||||||
),
|
),
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'edit',
|
path: 'edit',
|
||||||
name: 'ContainerEditRoute',
|
name: 'ContainerEditRoute',
|
||||||
|
factory: $ContainerEditRoute._fromState,
|
||||||
factory: _$ContainerEditRoute._fromState,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'select_container',
|
path: 'select_container',
|
||||||
name: 'ContainerSelectionRoute',
|
name: 'ContainerSelectionRoute',
|
||||||
|
factory: $ContainerSelectionRoute._fromState,
|
||||||
factory: _$ContainerSelectionRoute._fromState,
|
|
||||||
),
|
),
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'tab_tree/:rootTabId',
|
path: 'tab_tree/:rootTabId',
|
||||||
name: 'TabTreeRoute',
|
name: 'TabTreeRoute',
|
||||||
|
factory: $TabTreeRoute._fromState,
|
||||||
factory: _$TabTreeRoute._fromState,
|
|
||||||
),
|
),
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'open_content',
|
path: 'open_content',
|
||||||
name: 'OpenSharedContentRoute',
|
name: 'OpenSharedContentRoute',
|
||||||
|
factory: $OpenSharedContentRoute._fromState,
|
||||||
factory: _$OpenSharedContentRoute._fromState,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
mixin _$BrowserRoute on GoRouteData {
|
mixin $BrowserRoute on GoRouteData {
|
||||||
static BrowserRoute _fromState(GoRouterState state) => BrowserRoute();
|
static BrowserRoute _fromState(GoRouterState state) => BrowserRoute();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -368,7 +348,7 @@ mixin _$BrowserRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$SearchRoute on GoRouteData {
|
mixin $SearchRoute on GoRouteData {
|
||||||
static SearchRoute _fromState(GoRouterState state) => SearchRoute(
|
static SearchRoute _fromState(GoRouterState state) => SearchRoute(
|
||||||
tabType: _$TabTypeEnumMap._$fromName(state.pathParameters['tabType']!)!,
|
tabType: _$TabTypeEnumMap._$fromName(state.pathParameters['tabType']!)!,
|
||||||
searchText:
|
searchText:
|
||||||
@@ -405,7 +385,7 @@ const _$TabTypeEnumMap = {
|
|||||||
TabType.child: 'child',
|
TabType.child: 'child',
|
||||||
};
|
};
|
||||||
|
|
||||||
mixin _$TorProxyRoute on GoRouteData {
|
mixin $TorProxyRoute on GoRouteData {
|
||||||
static TorProxyRoute _fromState(GoRouterState state) => TorProxyRoute();
|
static TorProxyRoute _fromState(GoRouterState state) => TorProxyRoute();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -425,7 +405,7 @@ mixin _$TorProxyRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$HistoryRoute on GoRouteData {
|
mixin $HistoryRoute on GoRouteData {
|
||||||
static HistoryRoute _fromState(GoRouterState state) => HistoryRoute();
|
static HistoryRoute _fromState(GoRouterState state) => HistoryRoute();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -445,7 +425,7 @@ mixin _$HistoryRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$ContextMenuRoute on GoRouteData {
|
mixin $ContextMenuRoute on GoRouteData {
|
||||||
static ContextMenuRoute _fromState(GoRouterState state) =>
|
static ContextMenuRoute _fromState(GoRouterState state) =>
|
||||||
ContextMenuRoute(state.extra as String);
|
ContextMenuRoute(state.extra as String);
|
||||||
|
|
||||||
@@ -470,7 +450,7 @@ mixin _$ContextMenuRoute on GoRouteData {
|
|||||||
context.replace(location, extra: _self.$extra);
|
context.replace(location, extra: _self.$extra);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$ContainerListRoute on GoRouteData {
|
mixin $ContainerListRoute on GoRouteData {
|
||||||
static ContainerListRoute _fromState(GoRouterState state) =>
|
static ContainerListRoute _fromState(GoRouterState state) =>
|
||||||
ContainerListRoute();
|
ContainerListRoute();
|
||||||
|
|
||||||
@@ -491,7 +471,7 @@ mixin _$ContainerListRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$ContainerCreateRoute on GoRouteData {
|
mixin $ContainerCreateRoute on GoRouteData {
|
||||||
static ContainerCreateRoute _fromState(GoRouterState state) =>
|
static ContainerCreateRoute _fromState(GoRouterState state) =>
|
||||||
ContainerCreateRoute(state.extra as ContainerData);
|
ContainerCreateRoute(state.extra as ContainerData);
|
||||||
|
|
||||||
@@ -516,7 +496,7 @@ mixin _$ContainerCreateRoute on GoRouteData {
|
|||||||
context.replace(location, extra: _self.$extra);
|
context.replace(location, extra: _self.$extra);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$ContainerEditRoute on GoRouteData {
|
mixin $ContainerEditRoute on GoRouteData {
|
||||||
static ContainerEditRoute _fromState(GoRouterState state) =>
|
static ContainerEditRoute _fromState(GoRouterState state) =>
|
||||||
ContainerEditRoute(state.extra as ContainerDataWithCount);
|
ContainerEditRoute(state.extra as ContainerDataWithCount);
|
||||||
|
|
||||||
@@ -541,7 +521,7 @@ mixin _$ContainerEditRoute on GoRouteData {
|
|||||||
context.replace(location, extra: _self.$extra);
|
context.replace(location, extra: _self.$extra);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$ContainerSelectionRoute on GoRouteData {
|
mixin $ContainerSelectionRoute on GoRouteData {
|
||||||
static ContainerSelectionRoute _fromState(GoRouterState state) =>
|
static ContainerSelectionRoute _fromState(GoRouterState state) =>
|
||||||
ContainerSelectionRoute();
|
ContainerSelectionRoute();
|
||||||
|
|
||||||
@@ -562,7 +542,7 @@ mixin _$ContainerSelectionRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$TabTreeRoute on GoRouteData {
|
mixin $TabTreeRoute on GoRouteData {
|
||||||
static TabTreeRoute _fromState(GoRouterState state) =>
|
static TabTreeRoute _fromState(GoRouterState state) =>
|
||||||
TabTreeRoute(state.pathParameters['rootTabId']!);
|
TabTreeRoute(state.pathParameters['rootTabId']!);
|
||||||
|
|
||||||
@@ -587,7 +567,7 @@ mixin _$TabTreeRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$OpenSharedContentRoute on GoRouteData {
|
mixin $OpenSharedContentRoute on GoRouteData {
|
||||||
static OpenSharedContentRoute _fromState(GoRouterState state) =>
|
static OpenSharedContentRoute _fromState(GoRouterState state) =>
|
||||||
OpenSharedContentRoute(state.extra as Uri);
|
OpenSharedContentRoute(state.extra as Uri);
|
||||||
|
|
||||||
@@ -620,33 +600,29 @@ extension<T extends Enum> on Map<T, String> {
|
|||||||
RouteBase get $bangCategoriesRoute => GoRouteData.$route(
|
RouteBase get $bangCategoriesRoute => GoRouteData.$route(
|
||||||
path: '/bangs',
|
path: '/bangs',
|
||||||
name: 'BangRoute',
|
name: 'BangRoute',
|
||||||
|
factory: $BangCategoriesRoute._fromState,
|
||||||
factory: _$BangCategoriesRoute._fromState,
|
|
||||||
routes: [
|
routes: [
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'search/:searchText',
|
path: 'search/:searchText',
|
||||||
name: 'BangSearchRoute',
|
name: 'BangSearchRoute',
|
||||||
|
factory: $BangSearchRoute._fromState,
|
||||||
factory: _$BangSearchRoute._fromState,
|
|
||||||
),
|
),
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'category/:category',
|
path: 'category/:category',
|
||||||
name: 'BangCategoryRoute',
|
name: 'BangCategoryRoute',
|
||||||
|
factory: $BangCategoryRoute._fromState,
|
||||||
factory: _$BangCategoryRoute._fromState,
|
|
||||||
routes: [
|
routes: [
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: ':subCategory',
|
path: ':subCategory',
|
||||||
name: 'BangSubCategoryRoute',
|
name: 'BangSubCategoryRoute',
|
||||||
|
factory: $BangSubCategoryRoute._fromState,
|
||||||
factory: _$BangSubCategoryRoute._fromState,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
mixin _$BangCategoriesRoute on GoRouteData {
|
mixin $BangCategoriesRoute on GoRouteData {
|
||||||
static BangCategoriesRoute _fromState(GoRouterState state) =>
|
static BangCategoriesRoute _fromState(GoRouterState state) =>
|
||||||
BangCategoriesRoute();
|
BangCategoriesRoute();
|
||||||
|
|
||||||
@@ -667,7 +643,7 @@ mixin _$BangCategoriesRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$BangSearchRoute on GoRouteData {
|
mixin $BangSearchRoute on GoRouteData {
|
||||||
static BangSearchRoute _fromState(GoRouterState state) => BangSearchRoute(
|
static BangSearchRoute _fromState(GoRouterState state) => BangSearchRoute(
|
||||||
searchText:
|
searchText:
|
||||||
state.pathParameters['searchText'] ?? BangSearchRoute.emptySearchText,
|
state.pathParameters['searchText'] ?? BangSearchRoute.emptySearchText,
|
||||||
@@ -694,7 +670,7 @@ mixin _$BangSearchRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$BangCategoryRoute on GoRouteData {
|
mixin $BangCategoryRoute on GoRouteData {
|
||||||
static BangCategoryRoute _fromState(GoRouterState state) =>
|
static BangCategoryRoute _fromState(GoRouterState state) =>
|
||||||
BangCategoryRoute(category: state.pathParameters['category']!);
|
BangCategoryRoute(category: state.pathParameters['category']!);
|
||||||
|
|
||||||
@@ -719,7 +695,7 @@ mixin _$BangCategoryRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$BangSubCategoryRoute on GoRouteData {
|
mixin $BangSubCategoryRoute on GoRouteData {
|
||||||
static BangSubCategoryRoute _fromState(GoRouterState state) =>
|
static BangSubCategoryRoute _fromState(GoRouterState state) =>
|
||||||
BangSubCategoryRoute(
|
BangSubCategoryRoute(
|
||||||
category: state.pathParameters['category']!,
|
category: state.pathParameters['category']!,
|
||||||
@@ -750,49 +726,42 @@ mixin _$BangSubCategoryRoute on GoRouteData {
|
|||||||
RouteBase get $feedListRoute => GoRouteData.$route(
|
RouteBase get $feedListRoute => GoRouteData.$route(
|
||||||
path: '/feeds',
|
path: '/feeds',
|
||||||
name: 'FeedListRoute',
|
name: 'FeedListRoute',
|
||||||
|
factory: $FeedListRoute._fromState,
|
||||||
factory: _$FeedListRoute._fromState,
|
|
||||||
routes: [
|
routes: [
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'add',
|
path: 'add',
|
||||||
name: 'FeedAddRoute',
|
name: 'FeedAddRoute',
|
||||||
|
factory: $FeedAddRoute._fromState,
|
||||||
factory: _$FeedAddRoute._fromState,
|
|
||||||
),
|
),
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'articles/:feedId',
|
path: 'articles/:feedId',
|
||||||
name: 'FeedArticleListRoute',
|
name: 'FeedArticleListRoute',
|
||||||
|
factory: $FeedArticleListRoute._fromState,
|
||||||
factory: _$FeedArticleListRoute._fromState,
|
|
||||||
),
|
),
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'article/:articleId',
|
path: 'article/:articleId',
|
||||||
name: 'FeedArticleRoute',
|
name: 'FeedArticleRoute',
|
||||||
|
factory: $FeedArticleRoute._fromState,
|
||||||
factory: _$FeedArticleRoute._fromState,
|
|
||||||
),
|
),
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'create/:feedId',
|
path: 'create/:feedId',
|
||||||
name: 'FeedCreateRoute',
|
name: 'FeedCreateRoute',
|
||||||
|
factory: $FeedCreateRoute._fromState,
|
||||||
factory: _$FeedCreateRoute._fromState,
|
|
||||||
),
|
),
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'available/:feedsJson',
|
path: 'available/:feedsJson',
|
||||||
name: 'SelectFeedDialogRoute',
|
name: 'SelectFeedDialogRoute',
|
||||||
|
factory: $SelectFeedDialogRoute._fromState,
|
||||||
factory: _$SelectFeedDialogRoute._fromState,
|
|
||||||
),
|
),
|
||||||
GoRouteData.$route(
|
GoRouteData.$route(
|
||||||
path: 'edit/:feedId',
|
path: 'edit/:feedId',
|
||||||
name: 'FeedEditRoute',
|
name: 'FeedEditRoute',
|
||||||
|
factory: $FeedEditRoute._fromState,
|
||||||
factory: _$FeedEditRoute._fromState,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
mixin _$FeedListRoute on GoRouteData {
|
mixin $FeedListRoute on GoRouteData {
|
||||||
static FeedListRoute _fromState(GoRouterState state) => FeedListRoute();
|
static FeedListRoute _fromState(GoRouterState state) => FeedListRoute();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -812,7 +781,7 @@ mixin _$FeedListRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$FeedAddRoute on GoRouteData {
|
mixin $FeedAddRoute on GoRouteData {
|
||||||
static FeedAddRoute _fromState(GoRouterState state) =>
|
static FeedAddRoute _fromState(GoRouterState state) =>
|
||||||
FeedAddRoute($extra: state.extra as Uri?);
|
FeedAddRoute($extra: state.extra as Uri?);
|
||||||
|
|
||||||
@@ -837,9 +806,9 @@ mixin _$FeedAddRoute on GoRouteData {
|
|||||||
context.replace(location, extra: _self.$extra);
|
context.replace(location, extra: _self.$extra);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$FeedArticleListRoute on GoRouteData {
|
mixin $FeedArticleListRoute on GoRouteData {
|
||||||
static FeedArticleListRoute _fromState(GoRouterState state) =>
|
static FeedArticleListRoute _fromState(GoRouterState state) =>
|
||||||
FeedArticleListRoute(feedId: Uri.parse(state.pathParameters['feedId']!)!);
|
FeedArticleListRoute(feedId: Uri.parse(state.pathParameters['feedId']!));
|
||||||
|
|
||||||
FeedArticleListRoute get _self => this as FeedArticleListRoute;
|
FeedArticleListRoute get _self => this as FeedArticleListRoute;
|
||||||
|
|
||||||
@@ -862,7 +831,7 @@ mixin _$FeedArticleListRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$FeedArticleRoute on GoRouteData {
|
mixin $FeedArticleRoute on GoRouteData {
|
||||||
static FeedArticleRoute _fromState(GoRouterState state) =>
|
static FeedArticleRoute _fromState(GoRouterState state) =>
|
||||||
FeedArticleRoute(articleId: state.pathParameters['articleId']!);
|
FeedArticleRoute(articleId: state.pathParameters['articleId']!);
|
||||||
|
|
||||||
@@ -887,9 +856,9 @@ mixin _$FeedArticleRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$FeedCreateRoute on GoRouteData {
|
mixin $FeedCreateRoute on GoRouteData {
|
||||||
static FeedCreateRoute _fromState(GoRouterState state) =>
|
static FeedCreateRoute _fromState(GoRouterState state) =>
|
||||||
FeedCreateRoute(feedId: Uri.parse(state.pathParameters['feedId']!)!);
|
FeedCreateRoute(feedId: Uri.parse(state.pathParameters['feedId']!));
|
||||||
|
|
||||||
FeedCreateRoute get _self => this as FeedCreateRoute;
|
FeedCreateRoute get _self => this as FeedCreateRoute;
|
||||||
|
|
||||||
@@ -912,7 +881,7 @@ mixin _$FeedCreateRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$SelectFeedDialogRoute on GoRouteData {
|
mixin $SelectFeedDialogRoute on GoRouteData {
|
||||||
static SelectFeedDialogRoute _fromState(GoRouterState state) =>
|
static SelectFeedDialogRoute _fromState(GoRouterState state) =>
|
||||||
SelectFeedDialogRoute(feedsJson: state.pathParameters['feedsJson']!);
|
SelectFeedDialogRoute(feedsJson: state.pathParameters['feedsJson']!);
|
||||||
|
|
||||||
@@ -937,9 +906,9 @@ mixin _$SelectFeedDialogRoute on GoRouteData {
|
|||||||
void replace(BuildContext context) => context.replace(location);
|
void replace(BuildContext context) => context.replace(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin _$FeedEditRoute on GoRouteData {
|
mixin $FeedEditRoute on GoRouteData {
|
||||||
static FeedEditRoute _fromState(GoRouterState state) =>
|
static FeedEditRoute _fromState(GoRouterState state) =>
|
||||||
FeedEditRoute(feedId: Uri.parse(state.pathParameters['feedId']!)!);
|
FeedEditRoute(feedId: Uri.parse(state.pathParameters['feedId']!));
|
||||||
|
|
||||||
FeedEditRoute get _self => this as FeedEditRoute;
|
FeedEditRoute get _self => this as FeedEditRoute;
|
||||||
|
|
||||||
|
|||||||
@@ -50,35 +50,35 @@ part of 'routes.dart';
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
class SettingsRoute extends GoRouteData with _$SettingsRoute {
|
class SettingsRoute extends GoRouteData with $SettingsRoute {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, GoRouterState state) {
|
Widget build(BuildContext context, GoRouterState state) {
|
||||||
return const SettingsScreen();
|
return const SettingsScreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class GeneralSettingsRoute extends GoRouteData with _$GeneralSettingsRoute {
|
class GeneralSettingsRoute extends GoRouteData with $GeneralSettingsRoute {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, GoRouterState state) {
|
Widget build(BuildContext context, GoRouterState state) {
|
||||||
return const GeneralSettingsScreen();
|
return const GeneralSettingsScreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class BangSettingsRoute extends GoRouteData with _$BangSettingsRoute {
|
class BangSettingsRoute extends GoRouteData with $BangSettingsRoute {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, GoRouterState state) {
|
Widget build(BuildContext context, GoRouterState state) {
|
||||||
return const BangSettingsScreen();
|
return const BangSettingsScreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class WebEngineSettingsRoute extends GoRouteData with _$WebEngineSettingsRoute {
|
class WebEngineSettingsRoute extends GoRouteData with $WebEngineSettingsRoute {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, GoRouterState state) {
|
Widget build(BuildContext context, GoRouterState state) {
|
||||||
return const WebEngineSettingsScreen();
|
return const WebEngineSettingsScreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DeveloperSettingsRoute extends GoRouteData with _$DeveloperSettingsRoute {
|
class DeveloperSettingsRoute extends GoRouteData with $DeveloperSettingsRoute {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, GoRouterState state) {
|
Widget build(BuildContext context, GoRouterState state) {
|
||||||
return const DeveloperSettingsScreen();
|
return const DeveloperSettingsScreen();
|
||||||
@@ -86,7 +86,7 @@ class DeveloperSettingsRoute extends GoRouteData with _$DeveloperSettingsRoute {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class WebEngineHardeningRoute extends GoRouteData
|
class WebEngineHardeningRoute extends GoRouteData
|
||||||
with _$WebEngineHardeningRoute {
|
with $WebEngineHardeningRoute {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, GoRouterState state) {
|
Widget build(BuildContext context, GoRouterState state) {
|
||||||
return const WebEngineHardeningScreen();
|
return const WebEngineHardeningScreen();
|
||||||
@@ -94,7 +94,7 @@ class WebEngineHardeningRoute extends GoRouteData
|
|||||||
}
|
}
|
||||||
|
|
||||||
class WebEngineHardeningGroupRoute extends GoRouteData
|
class WebEngineHardeningGroupRoute extends GoRouteData
|
||||||
with _$WebEngineHardeningGroupRoute {
|
with $WebEngineHardeningGroupRoute {
|
||||||
final String group;
|
final String group;
|
||||||
|
|
||||||
const WebEngineHardeningGroupRoute({required this.group});
|
const WebEngineHardeningGroupRoute({required this.group});
|
||||||
|
|||||||
@@ -15,12 +15,13 @@ abstract class _$WebPageInfoCWProxy {
|
|||||||
|
|
||||||
WebPageInfo feeds(Set<Uri>? feeds);
|
WebPageInfo feeds(Set<Uri>? feeds);
|
||||||
|
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `WebPageInfo(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `WebPageInfo(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// WebPageInfo(...).copyWith(id: 12, name: "My name")
|
/// WebPageInfo(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
WebPageInfo call({
|
WebPageInfo call({
|
||||||
Uri url,
|
Uri url,
|
||||||
String? title,
|
String? title,
|
||||||
@@ -29,31 +30,33 @@ abstract class _$WebPageInfoCWProxy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfWebPageInfo.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfWebPageInfo.copyWith.fieldName(...)`
|
/// Callable proxy for `copyWith` functionality.
|
||||||
|
/// Use as `instanceOfWebPageInfo.copyWith(...)` or call `instanceOfWebPageInfo.copyWith.fieldName(value)` for a single field.
|
||||||
class _$WebPageInfoCWProxyImpl implements _$WebPageInfoCWProxy {
|
class _$WebPageInfoCWProxyImpl implements _$WebPageInfoCWProxy {
|
||||||
const _$WebPageInfoCWProxyImpl(this._value);
|
const _$WebPageInfoCWProxyImpl(this._value);
|
||||||
|
|
||||||
final WebPageInfo _value;
|
final WebPageInfo _value;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
WebPageInfo url(Uri url) => this(url: url);
|
WebPageInfo url(Uri url) => call(url: url);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
WebPageInfo title(String? title) => this(title: title);
|
WebPageInfo title(String? title) => call(title: title);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
WebPageInfo favicon(BrowserIcon? favicon) => this(favicon: favicon);
|
WebPageInfo favicon(BrowserIcon? favicon) => call(favicon: favicon);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
WebPageInfo feeds(Set<Uri>? feeds) => this(feeds: feeds);
|
WebPageInfo feeds(Set<Uri>? feeds) => call(feeds: feeds);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `WebPageInfo(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `WebPageInfo(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// WebPageInfo(...).copyWith(id: 12, name: "My name")
|
/// WebPageInfo(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
WebPageInfo call({
|
WebPageInfo call({
|
||||||
Object? url = const $CopyWithPlaceholder(),
|
Object? url = const $CopyWithPlaceholder(),
|
||||||
Object? title = const $CopyWithPlaceholder(),
|
Object? title = const $CopyWithPlaceholder(),
|
||||||
@@ -61,7 +64,7 @@ class _$WebPageInfoCWProxyImpl implements _$WebPageInfoCWProxy {
|
|||||||
Object? feeds = const $CopyWithPlaceholder(),
|
Object? feeds = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return WebPageInfo(
|
return WebPageInfo(
|
||||||
url: url == const $CopyWithPlaceholder()
|
url: url == const $CopyWithPlaceholder() || url == null
|
||||||
? _value.url
|
? _value.url
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: url as Uri,
|
: url as Uri,
|
||||||
@@ -82,7 +85,8 @@ class _$WebPageInfoCWProxyImpl implements _$WebPageInfoCWProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension $WebPageInfoCopyWith on WebPageInfo {
|
extension $WebPageInfoCopyWith on WebPageInfo {
|
||||||
/// Returns a callable class that can be used as follows: `instanceOfWebPageInfo.copyWith(...)` or like so:`instanceOfWebPageInfo.copyWith.fieldName(...)`.
|
/// Returns a callable class used to build a new instance with modified fields.
|
||||||
|
/// Example: `instanceOfWebPageInfo.copyWith(...)` or `instanceOfWebPageInfo.copyWith.fieldName(...)`.
|
||||||
// ignore: library_private_types_in_public_api
|
// ignore: library_private_types_in_public_api
|
||||||
_$WebPageInfoCWProxy get copyWith => _$WebPageInfoCWProxyImpl(this);
|
_$WebPageInfoCWProxy get copyWith => _$WebPageInfoCWProxyImpl(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,28 +6,94 @@ part of 'app_initialization.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(AppInitializationService)
|
||||||
|
const appInitializationServiceProvider = AppInitializationServiceProvider._();
|
||||||
|
|
||||||
|
final class AppInitializationServiceProvider
|
||||||
|
extends
|
||||||
|
$NotifierProvider<
|
||||||
|
AppInitializationService,
|
||||||
|
Result<({List<ErrorMessage> errors, bool initialized, String? stage})>
|
||||||
|
> {
|
||||||
|
const AppInitializationServiceProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'appInitializationServiceProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$appInitializationServiceHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
AppInitializationService create() => AppInitializationService();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(
|
||||||
|
Result<({List<ErrorMessage> errors, bool initialized, String? stage})>
|
||||||
|
value,
|
||||||
|
) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride:
|
||||||
|
$SyncValueProvider<
|
||||||
|
Result<
|
||||||
|
({List<ErrorMessage> errors, bool initialized, String? stage})
|
||||||
|
>
|
||||||
|
>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$appInitializationServiceHash() =>
|
String _$appInitializationServiceHash() =>
|
||||||
r'9966be978ea4990c56a3aba347e7979921bf6b2b';
|
r'9966be978ea4990c56a3aba347e7979921bf6b2b';
|
||||||
|
|
||||||
/// See also [AppInitializationService].
|
abstract class _$AppInitializationService
|
||||||
@ProviderFor(AppInitializationService)
|
extends
|
||||||
final appInitializationServiceProvider =
|
$Notifier<
|
||||||
NotifierProvider<
|
Result<({List<ErrorMessage> errors, bool initialized, String? stage})>
|
||||||
AppInitializationService,
|
> {
|
||||||
Result<({bool initialized, String? stage, List<ErrorMessage> errors})>
|
Result<({List<ErrorMessage> errors, bool initialized, String? stage})>
|
||||||
>.internal(
|
build();
|
||||||
AppInitializationService.new,
|
@$mustCallSuper
|
||||||
name: r'appInitializationServiceProvider',
|
@override
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
void runBuild() {
|
||||||
? null
|
final created = build();
|
||||||
: _$appInitializationServiceHash,
|
final ref =
|
||||||
dependencies: null,
|
this.ref
|
||||||
allTransitiveDependencies: null,
|
as $Ref<
|
||||||
);
|
Result<
|
||||||
|
({List<ErrorMessage> errors, bool initialized, String? stage})
|
||||||
typedef _$AppInitializationService =
|
>,
|
||||||
Notifier<
|
Result<
|
||||||
Result<({bool initialized, String? stage, List<ErrorMessage> errors})>
|
({List<ErrorMessage> errors, bool initialized, String? stage})
|
||||||
>;
|
>
|
||||||
// ignore_for_file: type=lint
|
>;
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<
|
||||||
|
Result<
|
||||||
|
({List<ErrorMessage> errors, bool initialized, String? stage})
|
||||||
|
>,
|
||||||
|
Result<
|
||||||
|
({List<ErrorMessage> errors, bool initialized, String? stage})
|
||||||
|
>
|
||||||
|
>,
|
||||||
|
Result<
|
||||||
|
({List<ErrorMessage> errors, bool initialized, String? stage})
|
||||||
|
>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,22 +6,59 @@ part of 'generic_website.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(GenericWebsiteService)
|
||||||
|
const genericWebsiteServiceProvider = GenericWebsiteServiceProvider._();
|
||||||
|
|
||||||
|
final class GenericWebsiteServiceProvider
|
||||||
|
extends $NotifierProvider<GenericWebsiteService, void> {
|
||||||
|
const GenericWebsiteServiceProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'genericWebsiteServiceProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$genericWebsiteServiceHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
GenericWebsiteService create() => GenericWebsiteService();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(void value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<void>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$genericWebsiteServiceHash() =>
|
String _$genericWebsiteServiceHash() =>
|
||||||
r'c20897405a4d31983a22d61e955ffb7430d06a54';
|
r'c20897405a4d31983a22d61e955ffb7430d06a54';
|
||||||
|
|
||||||
/// See also [GenericWebsiteService].
|
abstract class _$GenericWebsiteService extends $Notifier<void> {
|
||||||
@ProviderFor(GenericWebsiteService)
|
void build();
|
||||||
final genericWebsiteServiceProvider =
|
@$mustCallSuper
|
||||||
NotifierProvider<GenericWebsiteService, void>.internal(
|
@override
|
||||||
GenericWebsiteService.new,
|
void runBuild() {
|
||||||
name: r'genericWebsiteServiceProvider',
|
build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref = this.ref as $Ref<void, void>;
|
||||||
? null
|
final element =
|
||||||
: _$genericWebsiteServiceHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<void, void>,
|
||||||
);
|
void,
|
||||||
|
Object?,
|
||||||
typedef _$GenericWebsiteService = Notifier<void>;
|
Object?
|
||||||
// ignore_for_file: type=lint
|
>;
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
element.handleValue(ref, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:hooks_riverpod/misc.dart';
|
||||||
import 'package:riverpod/riverpod.dart';
|
import 'package:riverpod/riverpod.dart';
|
||||||
|
|
||||||
extension CacheForExtension on Ref {
|
extension CacheForExtension on Ref {
|
||||||
|
|||||||
@@ -6,22 +6,44 @@ part of 'package_info_repository.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$packageInfoHash() => r'cc57db7b4684ab0d5df0f050b8ea045a3658e89a';
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// See also [packageInfo].
|
|
||||||
@ProviderFor(packageInfo)
|
@ProviderFor(packageInfo)
|
||||||
final packageInfoProvider = FutureProvider<PackageInfo>.internal(
|
const packageInfoProvider = PackageInfoProvider._();
|
||||||
packageInfo,
|
|
||||||
name: r'packageInfoProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$packageInfoHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
final class PackageInfoProvider
|
||||||
// ignore: unused_element
|
extends
|
||||||
typedef PackageInfoRef = FutureProviderRef<PackageInfo>;
|
$FunctionalProvider<
|
||||||
// ignore_for_file: type=lint
|
AsyncValue<PackageInfo>,
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
PackageInfo,
|
||||||
|
FutureOr<PackageInfo>
|
||||||
|
>
|
||||||
|
with $FutureModifier<PackageInfo>, $FutureProvider<PackageInfo> {
|
||||||
|
const PackageInfoProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'packageInfoProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$packageInfoHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$FutureProviderElement<PackageInfo> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $FutureProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<PackageInfo> create(Ref ref) {
|
||||||
|
return packageInfo(ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$packageInfoHash() => r'cc57db7b4684ab0d5df0f050b8ea045a3658e89a';
|
||||||
|
|||||||
@@ -6,42 +6,87 @@ part of 'home_widget.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(widgetPinnable)
|
||||||
|
const widgetPinnableProvider = WidgetPinnableProvider._();
|
||||||
|
|
||||||
|
final class WidgetPinnableProvider
|
||||||
|
extends $FunctionalProvider<AsyncValue<bool>, bool, FutureOr<bool>>
|
||||||
|
with $FutureModifier<bool>, $FutureProvider<bool> {
|
||||||
|
const WidgetPinnableProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'widgetPinnableProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$widgetPinnableHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$FutureProviderElement<bool> $createElement($ProviderPointer pointer) =>
|
||||||
|
$FutureProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<bool> create(Ref ref) {
|
||||||
|
return widgetPinnable(ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$widgetPinnableHash() => r'f91041f0f051ad0f00dd765cafea5571ca8c8088';
|
String _$widgetPinnableHash() => r'f91041f0f051ad0f00dd765cafea5571ca8c8088';
|
||||||
|
|
||||||
/// See also [widgetPinnable].
|
@ProviderFor(appWidgetLaunchStream)
|
||||||
@ProviderFor(widgetPinnable)
|
const appWidgetLaunchStreamProvider = AppWidgetLaunchStreamProvider._();
|
||||||
final widgetPinnableProvider = FutureProvider<bool>.internal(
|
|
||||||
widgetPinnable,
|
final class AppWidgetLaunchStreamProvider
|
||||||
name: r'widgetPinnableProvider',
|
extends
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
$FunctionalProvider<
|
||||||
? null
|
Raw<Stream<ReceivedIntentParameter>>,
|
||||||
: _$widgetPinnableHash,
|
Raw<Stream<ReceivedIntentParameter>>,
|
||||||
dependencies: null,
|
Raw<Stream<ReceivedIntentParameter>>
|
||||||
allTransitiveDependencies: null,
|
>
|
||||||
);
|
with $Provider<Raw<Stream<ReceivedIntentParameter>>> {
|
||||||
|
const AppWidgetLaunchStreamProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'appWidgetLaunchStreamProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$appWidgetLaunchStreamHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<Raw<Stream<ReceivedIntentParameter>>> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Raw<Stream<ReceivedIntentParameter>> create(Ref ref) {
|
||||||
|
return appWidgetLaunchStream(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(Raw<Stream<ReceivedIntentParameter>> value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride:
|
||||||
|
$SyncValueProvider<Raw<Stream<ReceivedIntentParameter>>>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef WidgetPinnableRef = FutureProviderRef<bool>;
|
|
||||||
String _$appWidgetLaunchStreamHash() =>
|
String _$appWidgetLaunchStreamHash() =>
|
||||||
r'ed042d1391ae3dbc26f806d6fa2e9a4a2464ae44';
|
r'ed042d1391ae3dbc26f806d6fa2e9a4a2464ae44';
|
||||||
|
|
||||||
/// See also [appWidgetLaunchStream].
|
|
||||||
@ProviderFor(appWidgetLaunchStream)
|
|
||||||
final appWidgetLaunchStreamProvider =
|
|
||||||
AutoDisposeProvider<Raw<Stream<ReceivedIntentParameter>>>.internal(
|
|
||||||
appWidgetLaunchStream,
|
|
||||||
name: r'appWidgetLaunchStreamProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$appWidgetLaunchStreamHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef AppWidgetLaunchStreamRef =
|
|
||||||
AutoDisposeProviderRef<Raw<Stream<ReceivedIntentParameter>>>;
|
|
||||||
// ignore_for_file: type=lint
|
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
|
||||||
|
|||||||
@@ -19,15 +19,15 @@
|
|||||||
*/
|
*/
|
||||||
import 'package:drift/drift.dart';
|
import 'package:drift/drift.dart';
|
||||||
import 'package:nullability/nullability.dart';
|
import 'package:nullability/nullability.dart';
|
||||||
|
import 'package:weblibre/features/bangs/data/database/daos/bang.drift.dart';
|
||||||
import 'package:weblibre/features/bangs/data/database/database.dart';
|
import 'package:weblibre/features/bangs/data/database/database.dart';
|
||||||
|
import 'package:weblibre/features/bangs/data/database/definitions.drift.dart';
|
||||||
import 'package:weblibre/features/bangs/data/models/bang.dart';
|
import 'package:weblibre/features/bangs/data/models/bang.dart';
|
||||||
import 'package:weblibre/features/bangs/data/models/bang_data.dart';
|
import 'package:weblibre/features/bangs/data/models/bang_data.dart';
|
||||||
import 'package:weblibre/features/bangs/data/models/bang_group.dart';
|
import 'package:weblibre/features/bangs/data/models/bang_group.dart';
|
||||||
|
|
||||||
part 'bang.g.dart';
|
|
||||||
|
|
||||||
@DriftAccessor()
|
@DriftAccessor()
|
||||||
class BangDao extends DatabaseAccessor<BangDatabase> with _$BangDaoMixin {
|
class BangDao extends DatabaseAccessor<BangDatabase> with $BangDaoMixin {
|
||||||
BangDao(super.db);
|
BangDao(super.db);
|
||||||
|
|
||||||
Selectable<Bang> getBangList({Iterable<BangGroup>? groups}) {
|
Selectable<Bang> getBangList({Iterable<BangGroup>? groups}) {
|
||||||
@@ -122,9 +122,11 @@ class BangDao extends DatabaseAccessor<BangDatabase> with _$BangDaoMixin {
|
|||||||
final ftsQuery = db.buildFtsQuery(searchString);
|
final ftsQuery = db.buildFtsQuery(searchString);
|
||||||
|
|
||||||
if (ftsQuery.isNotEmpty) {
|
if (ftsQuery.isNotEmpty) {
|
||||||
return db.queryBangs(query: ftsQuery);
|
return db.definitionsDrift.queryBangs(query: ftsQuery);
|
||||||
} else {
|
} else {
|
||||||
return db.queryBangsBasic(query: db.buildLikeQuery(searchString));
|
return db.definitionsDrift.queryBangsBasic(
|
||||||
|
query: db.buildLikeQuery(searchString),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
// dart format width=80
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
import 'package:drift/drift.dart' as i0;
|
||||||
|
import 'package:weblibre/features/bangs/data/database/database.dart' as i1;
|
||||||
|
|
||||||
|
mixin $BangDaoMixin on i0.DatabaseAccessor<i1.BangDatabase> {}
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'bang.dart';
|
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
|
||||||
mixin _$BangDaoMixin on DatabaseAccessor<BangDatabase> {}
|
|
||||||
@@ -18,14 +18,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import 'package:drift/drift.dart';
|
import 'package:drift/drift.dart';
|
||||||
|
import 'package:weblibre/features/bangs/data/database/daos/sync.drift.dart';
|
||||||
import 'package:weblibre/features/bangs/data/database/database.dart';
|
import 'package:weblibre/features/bangs/data/database/database.dart';
|
||||||
|
import 'package:weblibre/features/bangs/data/database/definitions.drift.dart';
|
||||||
import 'package:weblibre/features/bangs/data/models/bang.dart';
|
import 'package:weblibre/features/bangs/data/models/bang.dart';
|
||||||
import 'package:weblibre/features/bangs/data/models/bang_group.dart';
|
import 'package:weblibre/features/bangs/data/models/bang_group.dart';
|
||||||
|
|
||||||
part 'sync.g.dart';
|
|
||||||
|
|
||||||
@DriftAccessor()
|
@DriftAccessor()
|
||||||
class SyncDao extends DatabaseAccessor<BangDatabase> with _$SyncDaoMixin {
|
class SyncDao extends DatabaseAccessor<BangDatabase> with $SyncDaoMixin {
|
||||||
SyncDao(super.db);
|
SyncDao(super.db);
|
||||||
|
|
||||||
SingleOrNullSelectable<DateTime?> getLastSyncOfGroup(BangGroup group) {
|
SingleOrNullSelectable<DateTime?> getLastSyncOfGroup(BangGroup group) {
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
// dart format width=80
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
import 'package:drift/drift.dart' as i0;
|
||||||
|
import 'package:weblibre/features/bangs/data/database/database.dart' as i1;
|
||||||
|
|
||||||
|
mixin $SyncDaoMixin on i0.DatabaseAccessor<i1.BangDatabase> {}
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'sync.dart';
|
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
|
||||||
mixin _$SyncDaoMixin on DatabaseAccessor<BangDatabase> {}
|
|
||||||
@@ -20,17 +20,11 @@
|
|||||||
import 'package:drift/drift.dart';
|
import 'package:drift/drift.dart';
|
||||||
import 'package:weblibre/features/bangs/data/database/daos/bang.dart';
|
import 'package:weblibre/features/bangs/data/database/daos/bang.dart';
|
||||||
import 'package:weblibre/features/bangs/data/database/daos/sync.dart';
|
import 'package:weblibre/features/bangs/data/database/daos/sync.dart';
|
||||||
import 'package:weblibre/features/bangs/data/database/drift/converters/bang_format.dart';
|
import 'package:weblibre/features/bangs/data/database/database.drift.dart';
|
||||||
import 'package:weblibre/features/bangs/data/models/bang.dart';
|
|
||||||
import 'package:weblibre/features/bangs/data/models/bang_data.dart';
|
|
||||||
import 'package:weblibre/features/bangs/data/models/bang_group.dart';
|
|
||||||
import 'package:weblibre/features/bangs/data/models/search_history_entry.dart';
|
|
||||||
import 'package:weblibre/features/search/domain/fts_tokenizer.dart';
|
import 'package:weblibre/features/search/domain/fts_tokenizer.dart';
|
||||||
|
|
||||||
part 'database.g.dart';
|
@DriftDatabase(include: {'definitions.drift'}, daos: [BangDao, SyncDao])
|
||||||
|
class BangDatabase extends $BangDatabase with PrefixQueryBuilderMixin {
|
||||||
@DriftDatabase(include: {'database.drift'}, daos: [BangDao, SyncDao])
|
|
||||||
class BangDatabase extends _$BangDatabase with PrefixQueryBuilderMixin {
|
|
||||||
@override
|
@override
|
||||||
final int schemaVersion = 1;
|
final int schemaVersion = 1;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,136 @@
|
|||||||
|
// dart format width=80
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
import 'package:drift/drift.dart' as i0;
|
||||||
|
import 'package:weblibre/features/bangs/data/database/definitions.drift.dart'
|
||||||
|
as i1;
|
||||||
|
import 'package:weblibre/features/bangs/data/database/daos/bang.dart' as i2;
|
||||||
|
import 'package:weblibre/features/bangs/data/database/database.dart' as i3;
|
||||||
|
import 'package:weblibre/features/bangs/data/database/daos/sync.dart' as i4;
|
||||||
|
import 'package:drift/internal/modular.dart' as i5;
|
||||||
|
import 'package:sqlite3/common.dart' as i6;
|
||||||
|
|
||||||
|
abstract class $BangDatabase extends i0.GeneratedDatabase {
|
||||||
|
$BangDatabase(i0.QueryExecutor e) : super(e);
|
||||||
|
$BangDatabaseManager get managers => $BangDatabaseManager(this);
|
||||||
|
late final i1.BangTable bang = i1.BangTable(this);
|
||||||
|
late final i1.BangSync bangSync = i1.BangSync(this);
|
||||||
|
late final i1.BangFrequency bangFrequency = i1.BangFrequency(this);
|
||||||
|
late final i1.BangHistory bangHistory = i1.BangHistory(this);
|
||||||
|
late final i1.BangFts bangFts = i1.BangFts(this);
|
||||||
|
late final i1.BangDataView bangDataView = i1.BangDataView(this);
|
||||||
|
late final i2.BangDao bangDao = i2.BangDao(this as i3.BangDatabase);
|
||||||
|
late final i4.SyncDao syncDao = i4.SyncDao(this as i3.BangDatabase);
|
||||||
|
i1.DefinitionsDrift get definitionsDrift => i5.ReadDatabaseContainer(
|
||||||
|
this,
|
||||||
|
).accessor<i1.DefinitionsDrift>(i1.DefinitionsDrift.new);
|
||||||
|
@override
|
||||||
|
Iterable<i0.TableInfo<i0.Table, Object?>> get allTables =>
|
||||||
|
allSchemaEntities.whereType<i0.TableInfo<i0.Table, Object?>>();
|
||||||
|
@override
|
||||||
|
List<i0.DatabaseSchemaEntity> get allSchemaEntities => [
|
||||||
|
bang,
|
||||||
|
bangSync,
|
||||||
|
bangFrequency,
|
||||||
|
bangHistory,
|
||||||
|
bangFts,
|
||||||
|
bangDataView,
|
||||||
|
i1.bangAfterInsert,
|
||||||
|
i1.bangAfterDelete,
|
||||||
|
i1.bangAfterUpdate,
|
||||||
|
];
|
||||||
|
@override
|
||||||
|
i0.StreamQueryUpdateRules get streamUpdateRules =>
|
||||||
|
const i0.StreamQueryUpdateRules([
|
||||||
|
i0.WritePropagation(
|
||||||
|
on: i0.TableUpdateQuery.onTableName(
|
||||||
|
'bang',
|
||||||
|
limitUpdateKind: i0.UpdateKind.delete,
|
||||||
|
),
|
||||||
|
result: [
|
||||||
|
i0.TableUpdate('bang_frequency', kind: i0.UpdateKind.delete),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
i0.WritePropagation(
|
||||||
|
on: i0.TableUpdateQuery.onTableName(
|
||||||
|
'bang',
|
||||||
|
limitUpdateKind: i0.UpdateKind.insert,
|
||||||
|
),
|
||||||
|
result: [i0.TableUpdate('bang_fts', kind: i0.UpdateKind.insert)],
|
||||||
|
),
|
||||||
|
i0.WritePropagation(
|
||||||
|
on: i0.TableUpdateQuery.onTableName(
|
||||||
|
'bang',
|
||||||
|
limitUpdateKind: i0.UpdateKind.delete,
|
||||||
|
),
|
||||||
|
result: [i0.TableUpdate('bang_fts', kind: i0.UpdateKind.insert)],
|
||||||
|
),
|
||||||
|
i0.WritePropagation(
|
||||||
|
on: i0.TableUpdateQuery.onTableName(
|
||||||
|
'bang',
|
||||||
|
limitUpdateKind: i0.UpdateKind.update,
|
||||||
|
),
|
||||||
|
result: [i0.TableUpdate('bang_fts', kind: i0.UpdateKind.insert)],
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
class $BangDatabaseManager {
|
||||||
|
final $BangDatabase _db;
|
||||||
|
$BangDatabaseManager(this._db);
|
||||||
|
i1.$BangTableTableManager get bang =>
|
||||||
|
i1.$BangTableTableManager(_db, _db.bang);
|
||||||
|
i1.$BangSyncTableManager get bangSync =>
|
||||||
|
i1.$BangSyncTableManager(_db, _db.bangSync);
|
||||||
|
i1.$BangFrequencyTableManager get bangFrequency =>
|
||||||
|
i1.$BangFrequencyTableManager(_db, _db.bangFrequency);
|
||||||
|
i1.$BangHistoryTableManager get bangHistory =>
|
||||||
|
i1.$BangHistoryTableManager(_db, _db.bangHistory);
|
||||||
|
i1.$BangFtsTableManager get bangFts =>
|
||||||
|
i1.$BangFtsTableManager(_db, _db.bangFts);
|
||||||
|
}
|
||||||
|
|
||||||
|
extension DefineFunctions on i6.CommonDatabase {
|
||||||
|
void defineFunctions({
|
||||||
|
required String Function(int, String?) lexoRankNext,
|
||||||
|
required String Function(int, String?) lexoRankPrevious,
|
||||||
|
required String Function(String?, String?) lexoRankReorderAfter,
|
||||||
|
required String Function(String?, String?) lexoRankReorderBefore,
|
||||||
|
}) {
|
||||||
|
createFunction(
|
||||||
|
functionName: 'lexo_rank_next',
|
||||||
|
argumentCount: const i6.AllowedArgumentCount(2),
|
||||||
|
function: (args) {
|
||||||
|
final arg0 = args[0] as int;
|
||||||
|
final arg1 = args[1] as String?;
|
||||||
|
return lexoRankNext(arg0, arg1);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
createFunction(
|
||||||
|
functionName: 'lexo_rank_previous',
|
||||||
|
argumentCount: const i6.AllowedArgumentCount(2),
|
||||||
|
function: (args) {
|
||||||
|
final arg0 = args[0] as int;
|
||||||
|
final arg1 = args[1] as String?;
|
||||||
|
return lexoRankPrevious(arg0, arg1);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
createFunction(
|
||||||
|
functionName: 'lexo_rank_reorder_after',
|
||||||
|
argumentCount: const i6.AllowedArgumentCount(2),
|
||||||
|
function: (args) {
|
||||||
|
final arg0 = args[0] as String?;
|
||||||
|
final arg1 = args[1] as String?;
|
||||||
|
return lexoRankReorderAfter(arg0, arg1);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
createFunction(
|
||||||
|
functionName: 'lexo_rank_reorder_before',
|
||||||
|
argumentCount: const i6.AllowedArgumentCount(2),
|
||||||
|
function: (args) {
|
||||||
|
final arg0 = args[0] as String?;
|
||||||
|
final arg1 = args[1] as String?;
|
||||||
|
return lexoRankReorderBefore(arg0, arg1);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -21,8 +21,7 @@ import 'package:copy_with_extension/copy_with_extension.dart';
|
|||||||
import 'package:drift/drift.dart' show Expression, Insertable, Value;
|
import 'package:drift/drift.dart' show Expression, Insertable, Value;
|
||||||
import 'package:fast_equatable/fast_equatable.dart';
|
import 'package:fast_equatable/fast_equatable.dart';
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
import 'package:weblibre/features/bangs/data/database/database.dart'
|
import 'package:weblibre/features/bangs/data/database/definitions.drift.dart';
|
||||||
show BangCompanion;
|
|
||||||
import 'package:weblibre/features/bangs/data/models/bang_group.dart';
|
import 'package:weblibre/features/bangs/data/models/bang_group.dart';
|
||||||
|
|
||||||
part 'bang.g.dart';
|
part 'bang.g.dart';
|
||||||
|
|||||||
@@ -23,12 +23,13 @@ abstract class _$BangCWProxy {
|
|||||||
|
|
||||||
Bang format(Set<BangFormat>? format);
|
Bang format(Set<BangFormat>? format);
|
||||||
|
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `Bang(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `Bang(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// Bang(...).copyWith(id: 12, name: "My name")
|
/// Bang(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
Bang call({
|
Bang call({
|
||||||
String websiteName,
|
String websiteName,
|
||||||
String domain,
|
String domain,
|
||||||
@@ -41,43 +42,45 @@ abstract class _$BangCWProxy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfBang.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfBang.copyWith.fieldName(...)`
|
/// Callable proxy for `copyWith` functionality.
|
||||||
|
/// Use as `instanceOfBang.copyWith(...)` or call `instanceOfBang.copyWith.fieldName(value)` for a single field.
|
||||||
class _$BangCWProxyImpl implements _$BangCWProxy {
|
class _$BangCWProxyImpl implements _$BangCWProxy {
|
||||||
const _$BangCWProxyImpl(this._value);
|
const _$BangCWProxyImpl(this._value);
|
||||||
|
|
||||||
final Bang _value;
|
final Bang _value;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Bang websiteName(String websiteName) => this(websiteName: websiteName);
|
Bang websiteName(String websiteName) => call(websiteName: websiteName);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Bang domain(String domain) => this(domain: domain);
|
Bang domain(String domain) => call(domain: domain);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Bang trigger(String trigger) => this(trigger: trigger);
|
Bang trigger(String trigger) => call(trigger: trigger);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Bang urlTemplate(String urlTemplate) => this(urlTemplate: urlTemplate);
|
Bang urlTemplate(String urlTemplate) => call(urlTemplate: urlTemplate);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Bang group(BangGroup? group) => this(group: group);
|
Bang group(BangGroup? group) => call(group: group);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Bang category(String? category) => this(category: category);
|
Bang category(String? category) => call(category: category);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Bang subCategory(String? subCategory) => this(subCategory: subCategory);
|
Bang subCategory(String? subCategory) => call(subCategory: subCategory);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Bang format(Set<BangFormat>? format) => this(format: format);
|
Bang format(Set<BangFormat>? format) => call(format: format);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `Bang(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `Bang(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// Bang(...).copyWith(id: 12, name: "My name")
|
/// Bang(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
Bang call({
|
Bang call({
|
||||||
Object? websiteName = const $CopyWithPlaceholder(),
|
Object? websiteName = const $CopyWithPlaceholder(),
|
||||||
Object? domain = const $CopyWithPlaceholder(),
|
Object? domain = const $CopyWithPlaceholder(),
|
||||||
@@ -89,19 +92,21 @@ class _$BangCWProxyImpl implements _$BangCWProxy {
|
|||||||
Object? format = const $CopyWithPlaceholder(),
|
Object? format = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return Bang(
|
return Bang(
|
||||||
websiteName: websiteName == const $CopyWithPlaceholder()
|
websiteName:
|
||||||
|
websiteName == const $CopyWithPlaceholder() || websiteName == null
|
||||||
? _value.websiteName
|
? _value.websiteName
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: websiteName as String,
|
: websiteName as String,
|
||||||
domain: domain == const $CopyWithPlaceholder()
|
domain: domain == const $CopyWithPlaceholder() || domain == null
|
||||||
? _value.domain
|
? _value.domain
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: domain as String,
|
: domain as String,
|
||||||
trigger: trigger == const $CopyWithPlaceholder()
|
trigger: trigger == const $CopyWithPlaceholder() || trigger == null
|
||||||
? _value.trigger
|
? _value.trigger
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: trigger as String,
|
: trigger as String,
|
||||||
urlTemplate: urlTemplate == const $CopyWithPlaceholder()
|
urlTemplate:
|
||||||
|
urlTemplate == const $CopyWithPlaceholder() || urlTemplate == null
|
||||||
? _value.urlTemplate
|
? _value.urlTemplate
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: urlTemplate as String,
|
: urlTemplate as String,
|
||||||
@@ -126,7 +131,8 @@ class _$BangCWProxyImpl implements _$BangCWProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension $BangCopyWith on Bang {
|
extension $BangCopyWith on Bang {
|
||||||
/// Returns a callable class that can be used as follows: `instanceOfBang.copyWith(...)` or like so:`instanceOfBang.copyWith.fieldName(...)`.
|
/// Returns a callable class used to build a new instance with modified fields.
|
||||||
|
/// Example: `instanceOfBang.copyWith(...)` or `instanceOfBang.copyWith.fieldName(...)`.
|
||||||
// ignore: library_private_types_in_public_api
|
// ignore: library_private_types_in_public_api
|
||||||
_$BangCWProxy get copyWith => _$BangCWProxyImpl(this);
|
_$BangCWProxy get copyWith => _$BangCWProxyImpl(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,12 +27,13 @@ abstract class _$BangDataCWProxy {
|
|||||||
|
|
||||||
BangData icon(BrowserIcon? icon);
|
BangData icon(BrowserIcon? icon);
|
||||||
|
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `BangData(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `BangData(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// BangData(...).copyWith(id: 12, name: "My name")
|
/// BangData(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
BangData call({
|
BangData call({
|
||||||
String websiteName,
|
String websiteName,
|
||||||
String domain,
|
String domain,
|
||||||
@@ -47,49 +48,51 @@ abstract class _$BangDataCWProxy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfBangData.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfBangData.copyWith.fieldName(...)`
|
/// Callable proxy for `copyWith` functionality.
|
||||||
|
/// Use as `instanceOfBangData.copyWith(...)` or call `instanceOfBangData.copyWith.fieldName(value)` for a single field.
|
||||||
class _$BangDataCWProxyImpl implements _$BangDataCWProxy {
|
class _$BangDataCWProxyImpl implements _$BangDataCWProxy {
|
||||||
const _$BangDataCWProxyImpl(this._value);
|
const _$BangDataCWProxyImpl(this._value);
|
||||||
|
|
||||||
final BangData _value;
|
final BangData _value;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
BangData websiteName(String websiteName) => this(websiteName: websiteName);
|
BangData websiteName(String websiteName) => call(websiteName: websiteName);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
BangData domain(String domain) => this(domain: domain);
|
BangData domain(String domain) => call(domain: domain);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
BangData trigger(String trigger) => this(trigger: trigger);
|
BangData trigger(String trigger) => call(trigger: trigger);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
BangData urlTemplate(String urlTemplate) => this(urlTemplate: urlTemplate);
|
BangData urlTemplate(String urlTemplate) => call(urlTemplate: urlTemplate);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
BangData category(String? category) => this(category: category);
|
BangData category(String? category) => call(category: category);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
BangData subCategory(String? subCategory) => this(subCategory: subCategory);
|
BangData subCategory(String? subCategory) => call(subCategory: subCategory);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
BangData format(Set<BangFormat>? format) => this(format: format);
|
BangData format(Set<BangFormat>? format) => call(format: format);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
BangData frequency(int? frequency) => this(frequency: frequency);
|
BangData frequency(int? frequency) => call(frequency: frequency);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
BangData lastUsed(DateTime? lastUsed) => this(lastUsed: lastUsed);
|
BangData lastUsed(DateTime? lastUsed) => call(lastUsed: lastUsed);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
BangData icon(BrowserIcon? icon) => this(icon: icon);
|
BangData icon(BrowserIcon? icon) => call(icon: icon);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `BangData(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `BangData(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// BangData(...).copyWith(id: 12, name: "My name")
|
/// BangData(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
BangData call({
|
BangData call({
|
||||||
Object? websiteName = const $CopyWithPlaceholder(),
|
Object? websiteName = const $CopyWithPlaceholder(),
|
||||||
Object? domain = const $CopyWithPlaceholder(),
|
Object? domain = const $CopyWithPlaceholder(),
|
||||||
@@ -103,19 +106,21 @@ class _$BangDataCWProxyImpl implements _$BangDataCWProxy {
|
|||||||
Object? icon = const $CopyWithPlaceholder(),
|
Object? icon = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return BangData(
|
return BangData(
|
||||||
websiteName: websiteName == const $CopyWithPlaceholder()
|
websiteName:
|
||||||
|
websiteName == const $CopyWithPlaceholder() || websiteName == null
|
||||||
? _value.websiteName
|
? _value.websiteName
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: websiteName as String,
|
: websiteName as String,
|
||||||
domain: domain == const $CopyWithPlaceholder()
|
domain: domain == const $CopyWithPlaceholder() || domain == null
|
||||||
? _value.domain
|
? _value.domain
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: domain as String,
|
: domain as String,
|
||||||
trigger: trigger == const $CopyWithPlaceholder()
|
trigger: trigger == const $CopyWithPlaceholder() || trigger == null
|
||||||
? _value.trigger
|
? _value.trigger
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: trigger as String,
|
: trigger as String,
|
||||||
urlTemplate: urlTemplate == const $CopyWithPlaceholder()
|
urlTemplate:
|
||||||
|
urlTemplate == const $CopyWithPlaceholder() || urlTemplate == null
|
||||||
? _value.urlTemplate
|
? _value.urlTemplate
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: urlTemplate as String,
|
: urlTemplate as String,
|
||||||
@@ -148,7 +153,8 @@ class _$BangDataCWProxyImpl implements _$BangDataCWProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension $BangDataCopyWith on BangData {
|
extension $BangDataCopyWith on BangData {
|
||||||
/// Returns a callable class that can be used as follows: `instanceOfBangData.copyWith(...)` or like so:`instanceOfBangData.copyWith.fieldName(...)`.
|
/// Returns a callable class used to build a new instance with modified fields.
|
||||||
|
/// Example: `instanceOfBangData.copyWith(...)` or `instanceOfBangData.copyWith.fieldName(...)`.
|
||||||
// ignore: library_private_types_in_public_api
|
// ignore: library_private_types_in_public_api
|
||||||
_$BangDataCWProxy get copyWith => _$BangDataCWProxyImpl(this);
|
_$BangDataCWProxy get copyWith => _$BangDataCWProxyImpl(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,22 +6,46 @@ part of 'providers.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$bangDatabaseHash() => r'e31cf4b499300aff65174a16fb74c7dd8ec3d6f0';
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// See also [bangDatabase].
|
|
||||||
@ProviderFor(bangDatabase)
|
@ProviderFor(bangDatabase)
|
||||||
final bangDatabaseProvider = Provider<BangDatabase>.internal(
|
const bangDatabaseProvider = BangDatabaseProvider._();
|
||||||
bangDatabase,
|
|
||||||
name: r'bangDatabaseProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$bangDatabaseHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
final class BangDatabaseProvider
|
||||||
// ignore: unused_element
|
extends $FunctionalProvider<BangDatabase, BangDatabase, BangDatabase>
|
||||||
typedef BangDatabaseRef = ProviderRef<BangDatabase>;
|
with $Provider<BangDatabase> {
|
||||||
// ignore_for_file: type=lint
|
const BangDatabaseProvider._()
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'bangDatabaseProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$bangDatabaseHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<BangDatabase> $createElement($ProviderPointer pointer) =>
|
||||||
|
$ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
BangDatabase create(Ref ref) {
|
||||||
|
return bangDatabase(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(BangDatabase value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<BangDatabase>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$bangDatabaseHash() => r'e31cf4b499300aff65174a16fb74c7dd8ec3d6f0';
|
||||||
|
|||||||
@@ -6,22 +6,59 @@ part of 'data_source.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(BangDataSourceService)
|
||||||
|
const bangDataSourceServiceProvider = BangDataSourceServiceProvider._();
|
||||||
|
|
||||||
|
final class BangDataSourceServiceProvider
|
||||||
|
extends $NotifierProvider<BangDataSourceService, void> {
|
||||||
|
const BangDataSourceServiceProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'bangDataSourceServiceProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$bangDataSourceServiceHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
BangDataSourceService create() => BangDataSourceService();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(void value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<void>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$bangDataSourceServiceHash() =>
|
String _$bangDataSourceServiceHash() =>
|
||||||
r'2ff811ece417ae498dacc04a2fa963cffb34c8a9';
|
r'2ff811ece417ae498dacc04a2fa963cffb34c8a9';
|
||||||
|
|
||||||
/// See also [BangDataSourceService].
|
abstract class _$BangDataSourceService extends $Notifier<void> {
|
||||||
@ProviderFor(BangDataSourceService)
|
void build();
|
||||||
final bangDataSourceServiceProvider =
|
@$mustCallSuper
|
||||||
NotifierProvider<BangDataSourceService, void>.internal(
|
@override
|
||||||
BangDataSourceService.new,
|
void runBuild() {
|
||||||
name: r'bangDataSourceServiceProvider',
|
build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref = this.ref as $Ref<void, void>;
|
||||||
? null
|
final element =
|
||||||
: _$bangDataSourceServiceHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<void, void>,
|
||||||
);
|
void,
|
||||||
|
Object?,
|
||||||
typedef _$BangDataSourceService = Notifier<void>;
|
Object?
|
||||||
// ignore_for_file: type=lint
|
>;
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
element.handleValue(ref, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -6,40 +6,108 @@ part of 'search.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(BangSearch)
|
||||||
|
const bangSearchProvider = BangSearchProvider._();
|
||||||
|
|
||||||
|
final class BangSearchProvider
|
||||||
|
extends $StreamNotifierProvider<BangSearch, List<BangData>> {
|
||||||
|
const BangSearchProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'bangSearchProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$bangSearchHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
BangSearch create() => BangSearch();
|
||||||
|
}
|
||||||
|
|
||||||
String _$bangSearchHash() => r'6b7452d48698c01870c5c75f0c10cadaafc481c8';
|
String _$bangSearchHash() => r'6b7452d48698c01870c5c75f0c10cadaafc481c8';
|
||||||
|
|
||||||
/// See also [BangSearch].
|
abstract class _$BangSearch extends $StreamNotifier<List<BangData>> {
|
||||||
@ProviderFor(BangSearch)
|
Stream<List<BangData>> build();
|
||||||
final bangSearchProvider =
|
@$mustCallSuper
|
||||||
AutoDisposeStreamNotifierProvider<BangSearch, List<BangData>>.internal(
|
@override
|
||||||
BangSearch.new,
|
void runBuild() {
|
||||||
name: r'bangSearchProvider',
|
final created = build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref = this.ref as $Ref<AsyncValue<List<BangData>>, List<BangData>>;
|
||||||
? null
|
final element =
|
||||||
: _$bangSearchHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<AsyncValue<List<BangData>>, List<BangData>>,
|
||||||
);
|
AsyncValue<List<BangData>>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ProviderFor(SeamlessBang)
|
||||||
|
const seamlessBangProvider = SeamlessBangProvider._();
|
||||||
|
|
||||||
|
final class SeamlessBangProvider
|
||||||
|
extends $NotifierProvider<SeamlessBang, AsyncValue<List<BangData>>> {
|
||||||
|
const SeamlessBangProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'seamlessBangProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$seamlessBangHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
SeamlessBang create() => SeamlessBang();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(AsyncValue<List<BangData>> value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<AsyncValue<List<BangData>>>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
typedef _$BangSearch = AutoDisposeStreamNotifier<List<BangData>>;
|
|
||||||
String _$seamlessBangHash() => r'8bd7a2cbe4c302ae08f85167290666a7437f8b9b';
|
String _$seamlessBangHash() => r'8bd7a2cbe4c302ae08f85167290666a7437f8b9b';
|
||||||
|
|
||||||
/// See also [SeamlessBang].
|
abstract class _$SeamlessBang extends $Notifier<AsyncValue<List<BangData>>> {
|
||||||
@ProviderFor(SeamlessBang)
|
AsyncValue<List<BangData>> build();
|
||||||
final seamlessBangProvider =
|
@$mustCallSuper
|
||||||
AutoDisposeNotifierProvider<
|
@override
|
||||||
SeamlessBang,
|
void runBuild() {
|
||||||
AsyncValue<List<BangData>>
|
final created = build();
|
||||||
>.internal(
|
final ref =
|
||||||
SeamlessBang.new,
|
this.ref
|
||||||
name: r'seamlessBangProvider',
|
as $Ref<AsyncValue<List<BangData>>, AsyncValue<List<BangData>>>;
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final element =
|
||||||
? null
|
ref.element
|
||||||
: _$seamlessBangHash,
|
as $ClassProviderElement<
|
||||||
dependencies: null,
|
AnyNotifier<
|
||||||
allTransitiveDependencies: null,
|
AsyncValue<List<BangData>>,
|
||||||
);
|
AsyncValue<List<BangData>>
|
||||||
|
>,
|
||||||
typedef _$SeamlessBang = AutoDisposeNotifier<AsyncValue<List<BangData>>>;
|
AsyncValue<List<BangData>>,
|
||||||
// ignore_for_file: type=lint
|
Object?,
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -46,14 +46,17 @@ class BangDataRepository extends _$BangDataRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Stream<Map<String, List<String>>> watchCategories() {
|
Stream<Map<String, List<String>>> watchCategories() {
|
||||||
return ref.read(bangDatabaseProvider).categoriesJson().watchSingle().map((
|
return ref
|
||||||
json,
|
.read(bangDatabaseProvider)
|
||||||
) {
|
.definitionsDrift
|
||||||
final decoded = jsonDecode(json) as Map<String, dynamic>;
|
.categoriesJson()
|
||||||
return decoded.map(
|
.watchSingle()
|
||||||
(key, value) => MapEntry(key, (value as List<dynamic>).cast()),
|
.map((json) {
|
||||||
);
|
final decoded = jsonDecode(json) as Map<String, dynamic>;
|
||||||
});
|
return decoded.map(
|
||||||
|
(key, value) => MapEntry(key, (value as List<dynamic>).cast()),
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Stream<int> watchBangCount(BangGroup group) {
|
Stream<int> watchBangCount(BangGroup group) {
|
||||||
@@ -96,6 +99,7 @@ class BangDataRepository extends _$BangDataRepository {
|
|||||||
Stream<List<SearchHistoryEntry>> watchSearchHistory({required int limit}) {
|
Stream<List<SearchHistoryEntry>> watchSearchHistory({required int limit}) {
|
||||||
return ref
|
return ref
|
||||||
.read(bangDatabaseProvider)
|
.read(bangDatabaseProvider)
|
||||||
|
.definitionsDrift
|
||||||
.searchHistoryEntries(limit: limit)
|
.searchHistoryEntries(limit: limit)
|
||||||
.watch();
|
.watch();
|
||||||
}
|
}
|
||||||
@@ -116,7 +120,7 @@ class BangDataRepository extends _$BangDataRepository {
|
|||||||
//Pack in a transaction to bundle rebuilds of watch() queries
|
//Pack in a transaction to bundle rebuilds of watch() queries
|
||||||
return db.transaction(() async {
|
return db.transaction(() async {
|
||||||
await db.bangDao.addSearchEntry(trigger, searchQuery);
|
await db.bangDao.addSearchEntry(trigger, searchQuery);
|
||||||
await db.evictHistoryEntries(limit: maxEntryCount);
|
await db.definitionsDrift.evictHistoryEntries(limit: maxEntryCount);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,22 +6,59 @@ part of 'data.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$bangDataRepositoryHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'095708cfffe8d0fb604dc02f69e77ae1c050a893';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// See also [BangDataRepository].
|
|
||||||
@ProviderFor(BangDataRepository)
|
@ProviderFor(BangDataRepository)
|
||||||
final bangDataRepositoryProvider =
|
const bangDataRepositoryProvider = BangDataRepositoryProvider._();
|
||||||
NotifierProvider<BangDataRepository, void>.internal(
|
|
||||||
BangDataRepository.new,
|
|
||||||
name: r'bangDataRepositoryProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$bangDataRepositoryHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef _$BangDataRepository = Notifier<void>;
|
final class BangDataRepositoryProvider
|
||||||
// ignore_for_file: type=lint
|
extends $NotifierProvider<BangDataRepository, void> {
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
const BangDataRepositoryProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'bangDataRepositoryProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$bangDataRepositoryHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
BangDataRepository create() => BangDataRepository();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(void value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<void>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$bangDataRepositoryHash() =>
|
||||||
|
r'5e25ce123d4667a0b12316f5b771b6776c40f280';
|
||||||
|
|
||||||
|
abstract class _$BangDataRepository extends $Notifier<void> {
|
||||||
|
void build();
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
build();
|
||||||
|
final ref = this.ref as $Ref<void, void>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<void, void>,
|
||||||
|
void,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class BangSyncRepository extends _$BangSyncRepository {
|
|||||||
remoteBangs: remoteBangs,
|
remoteBangs: remoteBangs,
|
||||||
syncTime: DateTime.now(),
|
syncTime: DateTime.now(),
|
||||||
);
|
);
|
||||||
await db.optimizeFtsIndex();
|
await db.definitionsDrift.optimizeFtsIndex();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ class BangSyncRepository extends _$BangSyncRepository {
|
|||||||
remoteBangs: remoteBangs,
|
remoteBangs: remoteBangs,
|
||||||
syncTime: sourceDate,
|
syncTime: sourceDate,
|
||||||
);
|
);
|
||||||
await db.optimizeFtsIndex();
|
await db.definitionsDrift.optimizeFtsIndex();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,22 +6,59 @@ part of 'sync.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$bangSyncRepositoryHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'0b83cd341c7a6b84cc59a4b077274e0cb0dd495a';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// See also [BangSyncRepository].
|
|
||||||
@ProviderFor(BangSyncRepository)
|
@ProviderFor(BangSyncRepository)
|
||||||
final bangSyncRepositoryProvider =
|
const bangSyncRepositoryProvider = BangSyncRepositoryProvider._();
|
||||||
NotifierProvider<BangSyncRepository, void>.internal(
|
|
||||||
BangSyncRepository.new,
|
|
||||||
name: r'bangSyncRepositoryProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$bangSyncRepositoryHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef _$BangSyncRepository = Notifier<void>;
|
final class BangSyncRepositoryProvider
|
||||||
// ignore_for_file: type=lint
|
extends $NotifierProvider<BangSyncRepository, void> {
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
const BangSyncRepositoryProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'bangSyncRepositoryProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$bangSyncRepositoryHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
BangSyncRepository create() => BangSyncRepository();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(void value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<void>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$bangSyncRepositoryHash() =>
|
||||||
|
r'bb977652087d2ff2cb75b093adcfc45dafa21d2a';
|
||||||
|
|
||||||
|
abstract class _$BangSyncRepository extends $Notifier<void> {
|
||||||
|
void build();
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
build();
|
||||||
|
final ref = this.ref as $Ref<void, void>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<void, void>,
|
||||||
|
void,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class SiteSearch extends HookConsumerWidget {
|
|||||||
|
|
||||||
final selectedBang = ref.watch(selectedBangDataProvider(domain: domain));
|
final selectedBang = ref.watch(selectedBangDataProvider(domain: domain));
|
||||||
final defaultSearchBang = ref.watch(
|
final defaultSearchBang = ref.watch(
|
||||||
defaultSearchBangDataProvider.select((value) => value.valueOrNull),
|
defaultSearchBangDataProvider.select((value) => value.value),
|
||||||
);
|
);
|
||||||
|
|
||||||
Future<void> submitSearch(String value) async {
|
Future<void> submitSearch(String value) async {
|
||||||
|
|||||||
@@ -6,38 +6,104 @@ part of 'bottom_sheet.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(BottomSheetController)
|
||||||
|
const bottomSheetControllerProvider = BottomSheetControllerProvider._();
|
||||||
|
|
||||||
|
final class BottomSheetControllerProvider
|
||||||
|
extends $NotifierProvider<BottomSheetController, Sheet?> {
|
||||||
|
const BottomSheetControllerProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'bottomSheetControllerProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$bottomSheetControllerHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
BottomSheetController create() => BottomSheetController();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(Sheet? value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<Sheet?>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$bottomSheetControllerHash() =>
|
String _$bottomSheetControllerHash() =>
|
||||||
r'0b0ea53a96b80b8c1cba79b1d5913274b7127d5b';
|
r'0b0ea53a96b80b8c1cba79b1d5913274b7127d5b';
|
||||||
|
|
||||||
/// See also [BottomSheetController].
|
abstract class _$BottomSheetController extends $Notifier<Sheet?> {
|
||||||
@ProviderFor(BottomSheetController)
|
Sheet? build();
|
||||||
final bottomSheetControllerProvider =
|
@$mustCallSuper
|
||||||
AutoDisposeNotifierProvider<BottomSheetController, Sheet?>.internal(
|
@override
|
||||||
BottomSheetController.new,
|
void runBuild() {
|
||||||
name: r'bottomSheetControllerProvider',
|
final created = build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref = this.ref as $Ref<Sheet?, Sheet?>;
|
||||||
? null
|
final element =
|
||||||
: _$bottomSheetControllerHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<Sheet?, Sheet?>,
|
||||||
);
|
Sheet?,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ProviderFor(BottomSheetExtend)
|
||||||
|
const bottomSheetExtendProvider = BottomSheetExtendProvider._();
|
||||||
|
|
||||||
|
final class BottomSheetExtendProvider
|
||||||
|
extends $StreamNotifierProvider<BottomSheetExtend, double> {
|
||||||
|
const BottomSheetExtendProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'bottomSheetExtendProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$bottomSheetExtendHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
BottomSheetExtend create() => BottomSheetExtend();
|
||||||
|
}
|
||||||
|
|
||||||
typedef _$BottomSheetController = AutoDisposeNotifier<Sheet?>;
|
|
||||||
String _$bottomSheetExtendHash() => r'7e11b9047c15bdeb4dfcb488a8573daadb64e25c';
|
String _$bottomSheetExtendHash() => r'7e11b9047c15bdeb4dfcb488a8573daadb64e25c';
|
||||||
|
|
||||||
/// See also [BottomSheetExtend].
|
abstract class _$BottomSheetExtend extends $StreamNotifier<double> {
|
||||||
@ProviderFor(BottomSheetExtend)
|
Stream<double> build();
|
||||||
final bottomSheetExtendProvider =
|
@$mustCallSuper
|
||||||
StreamNotifierProvider<BottomSheetExtend, double>.internal(
|
@override
|
||||||
BottomSheetExtend.new,
|
void runBuild() {
|
||||||
name: r'bottomSheetExtendProvider',
|
final created = build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref = this.ref as $Ref<AsyncValue<double>, double>;
|
||||||
? null
|
final element =
|
||||||
: _$bottomSheetExtendHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<AsyncValue<double>, double>,
|
||||||
);
|
AsyncValue<double>,
|
||||||
|
Object?,
|
||||||
typedef _$BottomSheetExtend = StreamNotifier<double>;
|
Object?
|
||||||
// ignore_for_file: type=lint
|
>;
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,21 +6,58 @@ part of 'overlay.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(OverlayController)
|
||||||
|
const overlayControllerProvider = OverlayControllerProvider._();
|
||||||
|
|
||||||
|
final class OverlayControllerProvider
|
||||||
|
extends $NotifierProvider<OverlayController, WidgetBuilder?> {
|
||||||
|
const OverlayControllerProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'overlayControllerProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$overlayControllerHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
OverlayController create() => OverlayController();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(WidgetBuilder? value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<WidgetBuilder?>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$overlayControllerHash() => r'7b7885e07ae557c14199b6942b5d6392592ab747';
|
String _$overlayControllerHash() => r'7b7885e07ae557c14199b6942b5d6392592ab747';
|
||||||
|
|
||||||
/// See also [OverlayController].
|
abstract class _$OverlayController extends $Notifier<WidgetBuilder?> {
|
||||||
@ProviderFor(OverlayController)
|
WidgetBuilder? build();
|
||||||
final overlayControllerProvider =
|
@$mustCallSuper
|
||||||
AutoDisposeNotifierProvider<OverlayController, WidgetBuilder?>.internal(
|
@override
|
||||||
OverlayController.new,
|
void runBuild() {
|
||||||
name: r'overlayControllerProvider',
|
final created = build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref = this.ref as $Ref<WidgetBuilder?, WidgetBuilder?>;
|
||||||
? null
|
final element =
|
||||||
: _$overlayControllerHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<WidgetBuilder?, WidgetBuilder?>,
|
||||||
);
|
WidgetBuilder?,
|
||||||
|
Object?,
|
||||||
typedef _$OverlayController = AutoDisposeNotifier<WidgetBuilder?>;
|
Object?
|
||||||
// ignore_for_file: type=lint
|
>;
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -35,12 +35,13 @@ abstract class _$TabStateCWProxy {
|
|||||||
|
|
||||||
TabState findResultState(FindResultState findResultState);
|
TabState findResultState(FindResultState findResultState);
|
||||||
|
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `TabState(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `TabState(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// TabState(...).copyWith(id: 12, name: "My name")
|
/// TabState(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
TabState call({
|
TabState call({
|
||||||
String? parentId,
|
String? parentId,
|
||||||
String? contextId,
|
String? contextId,
|
||||||
@@ -59,65 +60,67 @@ abstract class _$TabStateCWProxy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfTabState.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfTabState.copyWith.fieldName(...)`
|
/// Callable proxy for `copyWith` functionality.
|
||||||
|
/// Use as `instanceOfTabState.copyWith(...)` or call `instanceOfTabState.copyWith.fieldName(value)` for a single field.
|
||||||
class _$TabStateCWProxyImpl implements _$TabStateCWProxy {
|
class _$TabStateCWProxyImpl implements _$TabStateCWProxy {
|
||||||
const _$TabStateCWProxyImpl(this._value);
|
const _$TabStateCWProxyImpl(this._value);
|
||||||
|
|
||||||
final TabState _value;
|
final TabState _value;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TabState parentId(String? parentId) => this(parentId: parentId);
|
TabState parentId(String? parentId) => call(parentId: parentId);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TabState contextId(String? contextId) => this(contextId: contextId);
|
TabState contextId(String? contextId) => call(contextId: contextId);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TabState url(Uri url) => this(url: url);
|
TabState url(Uri url) => call(url: url);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TabState title(String title) => this(title: title);
|
TabState title(String title) => call(title: title);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TabState icon(EquatableImage? icon) => this(icon: icon);
|
TabState icon(EquatableImage? icon) => call(icon: icon);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TabState thumbnail(EquatableImage? thumbnail) => this(thumbnail: thumbnail);
|
TabState thumbnail(EquatableImage? thumbnail) => call(thumbnail: thumbnail);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TabState progress(int progress) => this(progress: progress);
|
TabState progress(int progress) => call(progress: progress);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TabState isPrivate(bool isPrivate) => this(isPrivate: isPrivate);
|
TabState isPrivate(bool isPrivate) => call(isPrivate: isPrivate);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TabState isFullScreen(bool isFullScreen) => this(isFullScreen: isFullScreen);
|
TabState isFullScreen(bool isFullScreen) => call(isFullScreen: isFullScreen);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TabState isLoading(bool isLoading) => this(isLoading: isLoading);
|
TabState isLoading(bool isLoading) => call(isLoading: isLoading);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TabState securityInfoState(SecurityState securityInfoState) =>
|
TabState securityInfoState(SecurityState securityInfoState) =>
|
||||||
this(securityInfoState: securityInfoState);
|
call(securityInfoState: securityInfoState);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TabState historyState(HistoryState historyState) =>
|
TabState historyState(HistoryState historyState) =>
|
||||||
this(historyState: historyState);
|
call(historyState: historyState);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TabState readerableState(ReaderableState readerableState) =>
|
TabState readerableState(ReaderableState readerableState) =>
|
||||||
this(readerableState: readerableState);
|
call(readerableState: readerableState);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TabState findResultState(FindResultState findResultState) =>
|
TabState findResultState(FindResultState findResultState) =>
|
||||||
this(findResultState: findResultState);
|
call(findResultState: findResultState);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `TabState(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `TabState(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// TabState(...).copyWith(id: 12, name: "My name")
|
/// TabState(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
TabState call({
|
TabState call({
|
||||||
Object? parentId = const $CopyWithPlaceholder(),
|
Object? parentId = const $CopyWithPlaceholder(),
|
||||||
Object? contextId = const $CopyWithPlaceholder(),
|
Object? contextId = const $CopyWithPlaceholder(),
|
||||||
@@ -144,11 +147,11 @@ class _$TabStateCWProxyImpl implements _$TabStateCWProxy {
|
|||||||
? _value.contextId
|
? _value.contextId
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: contextId as String?,
|
: contextId as String?,
|
||||||
url: url == const $CopyWithPlaceholder()
|
url: url == const $CopyWithPlaceholder() || url == null
|
||||||
? _value.url
|
? _value.url
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: url as Uri,
|
: url as Uri,
|
||||||
title: title == const $CopyWithPlaceholder()
|
title: title == const $CopyWithPlaceholder() || title == null
|
||||||
? _value.title
|
? _value.title
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: title as String,
|
: title as String,
|
||||||
@@ -160,35 +163,43 @@ class _$TabStateCWProxyImpl implements _$TabStateCWProxy {
|
|||||||
? _value.thumbnail
|
? _value.thumbnail
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: thumbnail as EquatableImage?,
|
: thumbnail as EquatableImage?,
|
||||||
progress: progress == const $CopyWithPlaceholder()
|
progress: progress == const $CopyWithPlaceholder() || progress == null
|
||||||
? _value.progress
|
? _value.progress
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: progress as int,
|
: progress as int,
|
||||||
isPrivate: isPrivate == const $CopyWithPlaceholder()
|
isPrivate: isPrivate == const $CopyWithPlaceholder() || isPrivate == null
|
||||||
? _value.isPrivate
|
? _value.isPrivate
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: isPrivate as bool,
|
: isPrivate as bool,
|
||||||
isFullScreen: isFullScreen == const $CopyWithPlaceholder()
|
isFullScreen:
|
||||||
|
isFullScreen == const $CopyWithPlaceholder() || isFullScreen == null
|
||||||
? _value.isFullScreen
|
? _value.isFullScreen
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: isFullScreen as bool,
|
: isFullScreen as bool,
|
||||||
isLoading: isLoading == const $CopyWithPlaceholder()
|
isLoading: isLoading == const $CopyWithPlaceholder() || isLoading == null
|
||||||
? _value.isLoading
|
? _value.isLoading
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: isLoading as bool,
|
: isLoading as bool,
|
||||||
securityInfoState: securityInfoState == const $CopyWithPlaceholder()
|
securityInfoState:
|
||||||
|
securityInfoState == const $CopyWithPlaceholder() ||
|
||||||
|
securityInfoState == null
|
||||||
? _value.securityInfoState
|
? _value.securityInfoState
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: securityInfoState as SecurityState,
|
: securityInfoState as SecurityState,
|
||||||
historyState: historyState == const $CopyWithPlaceholder()
|
historyState:
|
||||||
|
historyState == const $CopyWithPlaceholder() || historyState == null
|
||||||
? _value.historyState
|
? _value.historyState
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: historyState as HistoryState,
|
: historyState as HistoryState,
|
||||||
readerableState: readerableState == const $CopyWithPlaceholder()
|
readerableState:
|
||||||
|
readerableState == const $CopyWithPlaceholder() ||
|
||||||
|
readerableState == null
|
||||||
? _value.readerableState
|
? _value.readerableState
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: readerableState as ReaderableState,
|
: readerableState as ReaderableState,
|
||||||
findResultState: findResultState == const $CopyWithPlaceholder()
|
findResultState:
|
||||||
|
findResultState == const $CopyWithPlaceholder() ||
|
||||||
|
findResultState == null
|
||||||
? _value.findResultState
|
? _value.findResultState
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: findResultState as FindResultState,
|
: findResultState as FindResultState,
|
||||||
@@ -197,7 +208,8 @@ class _$TabStateCWProxyImpl implements _$TabStateCWProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension $TabStateCopyWith on TabState {
|
extension $TabStateCopyWith on TabState {
|
||||||
/// Returns a callable class that can be used as follows: `instanceOfTabState.copyWith(...)` or like so:`instanceOfTabState.copyWith.fieldName(...)`.
|
/// Returns a callable class used to build a new instance with modified fields.
|
||||||
|
/// Example: `instanceOfTabState.copyWith(...)` or `instanceOfTabState.copyWith.fieldName(...)`.
|
||||||
// ignore: library_private_types_in_public_api
|
// ignore: library_private_types_in_public_api
|
||||||
_$TabStateCWProxy get copyWith => _$TabStateCWProxyImpl(this);
|
_$TabStateCWProxy get copyWith => _$TabStateCWProxyImpl(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,12 +21,13 @@ abstract class _$WebExtensionStateCWProxy {
|
|||||||
|
|
||||||
WebExtensionState icon(EquatableImage? icon);
|
WebExtensionState icon(EquatableImage? icon);
|
||||||
|
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `WebExtensionState(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `WebExtensionState(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// WebExtensionState(...).copyWith(id: 12, name: "My name")
|
/// WebExtensionState(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
WebExtensionState call({
|
WebExtensionState call({
|
||||||
String extensionId,
|
String extensionId,
|
||||||
bool enabled,
|
bool enabled,
|
||||||
@@ -38,7 +39,8 @@ abstract class _$WebExtensionStateCWProxy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfWebExtensionState.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfWebExtensionState.copyWith.fieldName(...)`
|
/// Callable proxy for `copyWith` functionality.
|
||||||
|
/// Use as `instanceOfWebExtensionState.copyWith(...)` or call `instanceOfWebExtensionState.copyWith.fieldName(value)` for a single field.
|
||||||
class _$WebExtensionStateCWProxyImpl implements _$WebExtensionStateCWProxy {
|
class _$WebExtensionStateCWProxyImpl implements _$WebExtensionStateCWProxy {
|
||||||
const _$WebExtensionStateCWProxyImpl(this._value);
|
const _$WebExtensionStateCWProxyImpl(this._value);
|
||||||
|
|
||||||
@@ -46,35 +48,36 @@ class _$WebExtensionStateCWProxyImpl implements _$WebExtensionStateCWProxy {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
WebExtensionState extensionId(String extensionId) =>
|
WebExtensionState extensionId(String extensionId) =>
|
||||||
this(extensionId: extensionId);
|
call(extensionId: extensionId);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
WebExtensionState enabled(bool enabled) => this(enabled: enabled);
|
WebExtensionState enabled(bool enabled) => call(enabled: enabled);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
WebExtensionState title(String? title) => this(title: title);
|
WebExtensionState title(String? title) => call(title: title);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
WebExtensionState badgeText(String? badgeText) => this(badgeText: badgeText);
|
WebExtensionState badgeText(String? badgeText) => call(badgeText: badgeText);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
WebExtensionState badgeTextColor(Color? badgeTextColor) =>
|
WebExtensionState badgeTextColor(Color? badgeTextColor) =>
|
||||||
this(badgeTextColor: badgeTextColor);
|
call(badgeTextColor: badgeTextColor);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
WebExtensionState badgeBackgroundColor(Color? badgeBackgroundColor) =>
|
WebExtensionState badgeBackgroundColor(Color? badgeBackgroundColor) =>
|
||||||
this(badgeBackgroundColor: badgeBackgroundColor);
|
call(badgeBackgroundColor: badgeBackgroundColor);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
WebExtensionState icon(EquatableImage? icon) => this(icon: icon);
|
WebExtensionState icon(EquatableImage? icon) => call(icon: icon);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `WebExtensionState(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `WebExtensionState(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// WebExtensionState(...).copyWith(id: 12, name: "My name")
|
/// WebExtensionState(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
WebExtensionState call({
|
WebExtensionState call({
|
||||||
Object? extensionId = const $CopyWithPlaceholder(),
|
Object? extensionId = const $CopyWithPlaceholder(),
|
||||||
Object? enabled = const $CopyWithPlaceholder(),
|
Object? enabled = const $CopyWithPlaceholder(),
|
||||||
@@ -85,11 +88,12 @@ class _$WebExtensionStateCWProxyImpl implements _$WebExtensionStateCWProxy {
|
|||||||
Object? icon = const $CopyWithPlaceholder(),
|
Object? icon = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return WebExtensionState(
|
return WebExtensionState(
|
||||||
extensionId: extensionId == const $CopyWithPlaceholder()
|
extensionId:
|
||||||
|
extensionId == const $CopyWithPlaceholder() || extensionId == null
|
||||||
? _value.extensionId
|
? _value.extensionId
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: extensionId as String,
|
: extensionId as String,
|
||||||
enabled: enabled == const $CopyWithPlaceholder()
|
enabled: enabled == const $CopyWithPlaceholder() || enabled == null
|
||||||
? _value.enabled
|
? _value.enabled
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: enabled as bool,
|
: enabled as bool,
|
||||||
@@ -118,7 +122,8 @@ class _$WebExtensionStateCWProxyImpl implements _$WebExtensionStateCWProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension $WebExtensionStateCopyWith on WebExtensionState {
|
extension $WebExtensionStateCopyWith on WebExtensionState {
|
||||||
/// Returns a callable class that can be used as follows: `instanceOfWebExtensionState.copyWith(...)` or like so:`instanceOfWebExtensionState.copyWith.fieldName(...)`.
|
/// Returns a callable class used to build a new instance with modified fields.
|
||||||
|
/// Example: `instanceOfWebExtensionState.copyWith(...)` or `instanceOfWebExtensionState.copyWith.fieldName(...)`.
|
||||||
// ignore: library_private_types_in_public_api
|
// ignore: library_private_types_in_public_api
|
||||||
_$WebExtensionStateCWProxy get copyWith =>
|
_$WebExtensionStateCWProxy get copyWith =>
|
||||||
_$WebExtensionStateCWProxyImpl(this);
|
_$WebExtensionStateCWProxyImpl(this);
|
||||||
|
|||||||
@@ -6,110 +6,295 @@ part of 'providers.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(selectionActionService)
|
||||||
|
const selectionActionServiceProvider = SelectionActionServiceProvider._();
|
||||||
|
|
||||||
|
final class SelectionActionServiceProvider
|
||||||
|
extends
|
||||||
|
$FunctionalProvider<
|
||||||
|
GeckoSelectionActionService,
|
||||||
|
GeckoSelectionActionService,
|
||||||
|
GeckoSelectionActionService
|
||||||
|
>
|
||||||
|
with $Provider<GeckoSelectionActionService> {
|
||||||
|
const SelectionActionServiceProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'selectionActionServiceProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$selectionActionServiceHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<GeckoSelectionActionService> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
GeckoSelectionActionService create(Ref ref) {
|
||||||
|
return selectionActionService(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(GeckoSelectionActionService value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<GeckoSelectionActionService>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$selectionActionServiceHash() =>
|
String _$selectionActionServiceHash() =>
|
||||||
r'c89d981c2ba253ed940887fa59c11ad93d8589a8';
|
r'c89d981c2ba253ed940887fa59c11ad93d8589a8';
|
||||||
|
|
||||||
/// See also [selectionActionService].
|
@ProviderFor(eventService)
|
||||||
@ProviderFor(selectionActionService)
|
const eventServiceProvider = EventServiceProvider._();
|
||||||
final selectionActionServiceProvider =
|
|
||||||
Provider<GeckoSelectionActionService>.internal(
|
final class EventServiceProvider
|
||||||
selectionActionService,
|
extends
|
||||||
name: r'selectionActionServiceProvider',
|
$FunctionalProvider<
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
GeckoEventService,
|
||||||
? null
|
GeckoEventService,
|
||||||
: _$selectionActionServiceHash,
|
GeckoEventService
|
||||||
dependencies: null,
|
>
|
||||||
allTransitiveDependencies: null,
|
with $Provider<GeckoEventService> {
|
||||||
);
|
const EventServiceProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'eventServiceProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$eventServiceHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<GeckoEventService> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
GeckoEventService create(Ref ref) {
|
||||||
|
return eventService(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(GeckoEventService value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<GeckoEventService>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef SelectionActionServiceRef = ProviderRef<GeckoSelectionActionService>;
|
|
||||||
String _$eventServiceHash() => r'166b01f636fbdd4355dbc55a18ca4f83e0006de8';
|
String _$eventServiceHash() => r'166b01f636fbdd4355dbc55a18ca4f83e0006de8';
|
||||||
|
|
||||||
/// See also [eventService].
|
@ProviderFor(addonService)
|
||||||
@ProviderFor(eventService)
|
const addonServiceProvider = AddonServiceProvider._();
|
||||||
final eventServiceProvider = Provider<GeckoEventService>.internal(
|
|
||||||
eventService,
|
final class AddonServiceProvider
|
||||||
name: r'eventServiceProvider',
|
extends
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
$FunctionalProvider<
|
||||||
? null
|
GeckoAddonService,
|
||||||
: _$eventServiceHash,
|
GeckoAddonService,
|
||||||
dependencies: null,
|
GeckoAddonService
|
||||||
allTransitiveDependencies: null,
|
>
|
||||||
);
|
with $Provider<GeckoAddonService> {
|
||||||
|
const AddonServiceProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'addonServiceProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$addonServiceHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<GeckoAddonService> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
GeckoAddonService create(Ref ref) {
|
||||||
|
return addonService(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(GeckoAddonService value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<GeckoAddonService>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef EventServiceRef = ProviderRef<GeckoEventService>;
|
|
||||||
String _$addonServiceHash() => r'c7aca09b99c3810908176f3464f5f90a185aa5e7';
|
String _$addonServiceHash() => r'c7aca09b99c3810908176f3464f5f90a185aa5e7';
|
||||||
|
|
||||||
/// See also [addonService].
|
@ProviderFor(tabContentService)
|
||||||
@ProviderFor(addonService)
|
const tabContentServiceProvider = TabContentServiceProvider._();
|
||||||
final addonServiceProvider = Provider<GeckoAddonService>.internal(
|
|
||||||
addonService,
|
final class TabContentServiceProvider
|
||||||
name: r'addonServiceProvider',
|
extends
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
$FunctionalProvider<
|
||||||
? null
|
GeckoTabContentService,
|
||||||
: _$addonServiceHash,
|
GeckoTabContentService,
|
||||||
dependencies: null,
|
GeckoTabContentService
|
||||||
allTransitiveDependencies: null,
|
>
|
||||||
);
|
with $Provider<GeckoTabContentService> {
|
||||||
|
const TabContentServiceProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'tabContentServiceProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$tabContentServiceHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<GeckoTabContentService> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
GeckoTabContentService create(Ref ref) {
|
||||||
|
return tabContentService(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(GeckoTabContentService value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<GeckoTabContentService>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef AddonServiceRef = ProviderRef<GeckoAddonService>;
|
|
||||||
String _$tabContentServiceHash() => r'd9a991add907ecc138c62790883e59d8e9aa9266';
|
String _$tabContentServiceHash() => r'd9a991add907ecc138c62790883e59d8e9aa9266';
|
||||||
|
|
||||||
/// See also [tabContentService].
|
@ProviderFor(engineSuggestionsService)
|
||||||
@ProviderFor(tabContentService)
|
const engineSuggestionsServiceProvider = EngineSuggestionsServiceProvider._();
|
||||||
final tabContentServiceProvider = Provider<GeckoTabContentService>.internal(
|
|
||||||
tabContentService,
|
final class EngineSuggestionsServiceProvider
|
||||||
name: r'tabContentServiceProvider',
|
extends
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
$FunctionalProvider<
|
||||||
? null
|
GeckoSuggestionsService,
|
||||||
: _$tabContentServiceHash,
|
GeckoSuggestionsService,
|
||||||
dependencies: null,
|
GeckoSuggestionsService
|
||||||
allTransitiveDependencies: null,
|
>
|
||||||
);
|
with $Provider<GeckoSuggestionsService> {
|
||||||
|
const EngineSuggestionsServiceProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'engineSuggestionsServiceProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$engineSuggestionsServiceHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<GeckoSuggestionsService> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
GeckoSuggestionsService create(Ref ref) {
|
||||||
|
return engineSuggestionsService(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(GeckoSuggestionsService value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<GeckoSuggestionsService>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef TabContentServiceRef = ProviderRef<GeckoTabContentService>;
|
|
||||||
String _$engineSuggestionsServiceHash() =>
|
String _$engineSuggestionsServiceHash() =>
|
||||||
r'f7414b335564578b2c7f6a86baf8bf13f2d5ba2d';
|
r'f7414b335564578b2c7f6a86baf8bf13f2d5ba2d';
|
||||||
|
|
||||||
/// See also [engineSuggestionsService].
|
@ProviderFor(EngineReadyState)
|
||||||
@ProviderFor(engineSuggestionsService)
|
const engineReadyStateProvider = EngineReadyStateProvider._();
|
||||||
final engineSuggestionsServiceProvider =
|
|
||||||
Provider<GeckoSuggestionsService>.internal(
|
final class EngineReadyStateProvider
|
||||||
engineSuggestionsService,
|
extends $NotifierProvider<EngineReadyState, bool> {
|
||||||
name: r'engineSuggestionsServiceProvider',
|
const EngineReadyStateProvider._()
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
: super(
|
||||||
? null
|
from: null,
|
||||||
: _$engineSuggestionsServiceHash,
|
argument: null,
|
||||||
dependencies: null,
|
retry: null,
|
||||||
allTransitiveDependencies: null,
|
name: r'engineReadyStateProvider',
|
||||||
);
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$engineReadyStateHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
EngineReadyState create() => EngineReadyState();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(bool value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<bool>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef EngineSuggestionsServiceRef = ProviderRef<GeckoSuggestionsService>;
|
|
||||||
String _$engineReadyStateHash() => r'a892c48ffc29e3414de12e66d9bfec522e4f40a8';
|
String _$engineReadyStateHash() => r'a892c48ffc29e3414de12e66d9bfec522e4f40a8';
|
||||||
|
|
||||||
/// See also [EngineReadyState].
|
abstract class _$EngineReadyState extends $Notifier<bool> {
|
||||||
@ProviderFor(EngineReadyState)
|
bool build();
|
||||||
final engineReadyStateProvider =
|
@$mustCallSuper
|
||||||
NotifierProvider<EngineReadyState, bool>.internal(
|
@override
|
||||||
EngineReadyState.new,
|
void runBuild() {
|
||||||
name: r'engineReadyStateProvider',
|
final created = build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref = this.ref as $Ref<bool, bool>;
|
||||||
? null
|
final element =
|
||||||
: _$engineReadyStateHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<bool, bool>,
|
||||||
);
|
bool,
|
||||||
|
Object?,
|
||||||
typedef _$EngineReadyState = Notifier<bool>;
|
Object?
|
||||||
// ignore_for_file: type=lint
|
>;
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,41 +6,86 @@ part of 'browser_extension.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(browserExtensionService)
|
||||||
|
const browserExtensionServiceProvider = BrowserExtensionServiceProvider._();
|
||||||
|
|
||||||
|
final class BrowserExtensionServiceProvider
|
||||||
|
extends
|
||||||
|
$FunctionalProvider<
|
||||||
|
GeckoBrowserExtensionService,
|
||||||
|
GeckoBrowserExtensionService,
|
||||||
|
GeckoBrowserExtensionService
|
||||||
|
>
|
||||||
|
with $Provider<GeckoBrowserExtensionService> {
|
||||||
|
const BrowserExtensionServiceProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'browserExtensionServiceProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$browserExtensionServiceHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<GeckoBrowserExtensionService> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
GeckoBrowserExtensionService create(Ref ref) {
|
||||||
|
return browserExtensionService(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(GeckoBrowserExtensionService value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<GeckoBrowserExtensionService>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$browserExtensionServiceHash() =>
|
String _$browserExtensionServiceHash() =>
|
||||||
r'c3f67763e0abb10039b407fced6e175e5ec7c6c3';
|
r'c3f67763e0abb10039b407fced6e175e5ec7c6c3';
|
||||||
|
|
||||||
/// See also [browserExtensionService].
|
|
||||||
@ProviderFor(browserExtensionService)
|
|
||||||
final browserExtensionServiceProvider =
|
|
||||||
Provider<GeckoBrowserExtensionService>.internal(
|
|
||||||
browserExtensionService,
|
|
||||||
name: r'browserExtensionServiceProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$browserExtensionServiceHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef BrowserExtensionServiceRef = ProviderRef<GeckoBrowserExtensionService>;
|
|
||||||
String _$feedRequestedHash() => r'4f179d0878072a77a87422ff6afdac53a3d57c04';
|
|
||||||
|
|
||||||
/// See also [feedRequested].
|
|
||||||
@ProviderFor(feedRequested)
|
@ProviderFor(feedRequested)
|
||||||
final feedRequestedProvider = AutoDisposeStreamProvider<String>.internal(
|
const feedRequestedProvider = FeedRequestedProvider._();
|
||||||
feedRequested,
|
|
||||||
name: r'feedRequestedProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$feedRequestedHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
final class FeedRequestedProvider
|
||||||
// ignore: unused_element
|
extends $FunctionalProvider<AsyncValue<String>, String, Stream<String>>
|
||||||
typedef FeedRequestedRef = AutoDisposeStreamProviderRef<String>;
|
with $FutureModifier<String>, $StreamProvider<String> {
|
||||||
// ignore_for_file: type=lint
|
const FeedRequestedProvider._()
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'feedRequestedProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$feedRequestedHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$StreamProviderElement<String> $createElement($ProviderPointer pointer) =>
|
||||||
|
$StreamProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Stream<String> create(Ref ref) {
|
||||||
|
return feedRequested(ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$feedRequestedHash() => r'4f179d0878072a77a87422ff6afdac53a3d57c04';
|
||||||
|
|||||||
@@ -6,20 +6,58 @@ part of 'selected_tab.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(SelectedTab)
|
||||||
|
const selectedTabProvider = SelectedTabProvider._();
|
||||||
|
|
||||||
|
final class SelectedTabProvider
|
||||||
|
extends $NotifierProvider<SelectedTab, String?> {
|
||||||
|
const SelectedTabProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'selectedTabProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$selectedTabHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
SelectedTab create() => SelectedTab();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(String? value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<String?>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$selectedTabHash() => r'26d1bb90c777d7011f4f27f7b962584a4a62a0a7';
|
String _$selectedTabHash() => r'26d1bb90c777d7011f4f27f7b962584a4a62a0a7';
|
||||||
|
|
||||||
/// See also [SelectedTab].
|
abstract class _$SelectedTab extends $Notifier<String?> {
|
||||||
@ProviderFor(SelectedTab)
|
String? build();
|
||||||
final selectedTabProvider = NotifierProvider<SelectedTab, String?>.internal(
|
@$mustCallSuper
|
||||||
SelectedTab.new,
|
@override
|
||||||
name: r'selectedTabProvider',
|
void runBuild() {
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final created = build();
|
||||||
? null
|
final ref = this.ref as $Ref<String?, String?>;
|
||||||
: _$selectedTabHash,
|
final element =
|
||||||
dependencies: null,
|
ref.element
|
||||||
allTransitiveDependencies: null,
|
as $ClassProviderElement<
|
||||||
);
|
AnyNotifier<String?, String?>,
|
||||||
|
String?,
|
||||||
typedef _$SelectedTab = Notifier<String?>;
|
Object?,
|
||||||
// ignore_for_file: type=lint
|
Object?
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,21 +6,63 @@ part of 'tab_list.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(TabList)
|
||||||
|
const tabListProvider = TabListProvider._();
|
||||||
|
|
||||||
|
final class TabListProvider
|
||||||
|
extends $NotifierProvider<TabList, EquatableValue<List<String>>> {
|
||||||
|
const TabListProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'tabListProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$tabListHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
TabList create() => TabList();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(EquatableValue<List<String>> value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<EquatableValue<List<String>>>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$tabListHash() => r'0b9ca1e089a59895df4cbf28691c2849a7004f08';
|
String _$tabListHash() => r'0b9ca1e089a59895df4cbf28691c2849a7004f08';
|
||||||
|
|
||||||
/// See also [TabList].
|
abstract class _$TabList extends $Notifier<EquatableValue<List<String>>> {
|
||||||
@ProviderFor(TabList)
|
EquatableValue<List<String>> build();
|
||||||
final tabListProvider =
|
@$mustCallSuper
|
||||||
NotifierProvider<TabList, EquatableValue<List<String>>>.internal(
|
@override
|
||||||
TabList.new,
|
void runBuild() {
|
||||||
name: r'tabListProvider',
|
final created = build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref =
|
||||||
? null
|
this.ref
|
||||||
: _$tabListHash,
|
as $Ref<EquatableValue<List<String>>, EquatableValue<List<String>>>;
|
||||||
dependencies: null,
|
final element =
|
||||||
allTransitiveDependencies: null,
|
ref.element
|
||||||
);
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<
|
||||||
typedef _$TabList = Notifier<EquatableValue<List<String>>>;
|
EquatableValue<List<String>>,
|
||||||
// ignore_for_file: type=lint
|
EquatableValue<List<String>>
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
>,
|
||||||
|
EquatableValue<List<String>>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,174 +6,138 @@ part of 'tab_session.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$selectedTabSessionNotifierHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'aef19991d5b05a2bb28e8a6ccb57dc75c2f3148f';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// See also [selectedTabSessionNotifier].
|
|
||||||
@ProviderFor(selectedTabSessionNotifier)
|
|
||||||
final selectedTabSessionNotifierProvider =
|
|
||||||
AutoDisposeProvider<Raw<TabSession>>.internal(
|
|
||||||
selectedTabSessionNotifier,
|
|
||||||
name: r'selectedTabSessionNotifierProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$selectedTabSessionNotifierHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef SelectedTabSessionNotifierRef = AutoDisposeProviderRef<Raw<TabSession>>;
|
|
||||||
String _$tabSessionHash() => r'33d68f3860b3bc9a92db386535c7482bf4416008';
|
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
|
||||||
class _SystemHash {
|
|
||||||
_SystemHash._();
|
|
||||||
|
|
||||||
static int combine(int hash, int value) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + value);
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
|
||||||
return hash ^ (hash >> 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int finish(int hash) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = hash ^ (hash >> 11);
|
|
||||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class _$TabSession extends BuildlessAutoDisposeNotifier<void> {
|
|
||||||
late final String? tabId;
|
|
||||||
|
|
||||||
void build({required String? tabId});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [TabSession].
|
|
||||||
@ProviderFor(TabSession)
|
@ProviderFor(TabSession)
|
||||||
const tabSessionProvider = TabSessionFamily();
|
const tabSessionProvider = TabSessionFamily._();
|
||||||
|
|
||||||
/// See also [TabSession].
|
final class TabSessionProvider extends $NotifierProvider<TabSession, void> {
|
||||||
class TabSessionFamily extends Family<void> {
|
const TabSessionProvider._({
|
||||||
/// See also [TabSession].
|
required TabSessionFamily super.from,
|
||||||
const TabSessionFamily();
|
required String? super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'tabSessionProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
/// See also [TabSession].
|
@override
|
||||||
TabSessionProvider call({required String? tabId}) {
|
String debugGetCreateSourceHash() => _$tabSessionHash();
|
||||||
return TabSessionProvider(tabId: tabId);
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'tabSessionProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
TabSessionProvider getProviderOverride(
|
TabSession create() => TabSession();
|
||||||
covariant TabSessionProvider provider,
|
|
||||||
) {
|
|
||||||
return call(tabId: provider.tabId);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(void value) {
|
||||||
@override
|
return $ProviderOverride(
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'tabSessionProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [TabSession].
|
|
||||||
class TabSessionProvider
|
|
||||||
extends AutoDisposeNotifierProviderImpl<TabSession, void> {
|
|
||||||
/// See also [TabSession].
|
|
||||||
TabSessionProvider({required String? tabId})
|
|
||||||
: this._internal(
|
|
||||||
() => TabSession()..tabId = tabId,
|
|
||||||
from: tabSessionProvider,
|
|
||||||
name: r'tabSessionProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$tabSessionHash,
|
|
||||||
dependencies: TabSessionFamily._dependencies,
|
|
||||||
allTransitiveDependencies: TabSessionFamily._allTransitiveDependencies,
|
|
||||||
tabId: tabId,
|
|
||||||
);
|
|
||||||
|
|
||||||
TabSessionProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.tabId,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final String? tabId;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void runNotifierBuild(covariant TabSession notifier) {
|
|
||||||
return notifier.build(tabId: tabId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(TabSession Function() create) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
origin: this,
|
||||||
override: TabSessionProvider._internal(
|
providerOverride: $SyncValueProvider<void>(value),
|
||||||
() => create()..tabId = tabId,
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
tabId: tabId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
AutoDisposeNotifierProviderElement<TabSession, void> createElement() {
|
|
||||||
return _TabSessionProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is TabSessionProvider && other.tabId == tabId;
|
return other is TabSessionProvider && other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, tabId.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$tabSessionHash() => r'33d68f3860b3bc9a92db386535c7482bf4416008';
|
||||||
// ignore: unused_element
|
|
||||||
mixin TabSessionRef on AutoDisposeNotifierProviderRef<void> {
|
|
||||||
/// The parameter `tabId` of this provider.
|
|
||||||
String? get tabId;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _TabSessionProviderElement
|
final class TabSessionFamily extends $Family
|
||||||
extends AutoDisposeNotifierProviderElement<TabSession, void>
|
with $ClassFamilyOverride<TabSession, void, void, void, String?> {
|
||||||
with TabSessionRef {
|
const TabSessionFamily._()
|
||||||
_TabSessionProviderElement(super.provider);
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'tabSessionProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
TabSessionProvider call({required String? tabId}) =>
|
||||||
|
TabSessionProvider._(argument: tabId, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String? get tabId => (origin as TabSessionProvider).tabId;
|
String toString() => r'tabSessionProvider';
|
||||||
}
|
}
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
abstract class _$TabSession extends $Notifier<void> {
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
late final _$args = ref.$arg as String?;
|
||||||
|
String? get tabId => _$args;
|
||||||
|
|
||||||
|
void build({required String? tabId});
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
build(tabId: _$args);
|
||||||
|
final ref = this.ref as $Ref<void, void>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<void, void>,
|
||||||
|
void,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ProviderFor(selectedTabSessionNotifier)
|
||||||
|
const selectedTabSessionProvider = SelectedTabSessionNotifierProvider._();
|
||||||
|
|
||||||
|
final class SelectedTabSessionNotifierProvider
|
||||||
|
extends
|
||||||
|
$FunctionalProvider<Raw<TabSession>, Raw<TabSession>, Raw<TabSession>>
|
||||||
|
with $Provider<Raw<TabSession>> {
|
||||||
|
const SelectedTabSessionNotifierProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'selectedTabSessionProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$selectedTabSessionNotifierHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<Raw<TabSession>> $createElement($ProviderPointer pointer) =>
|
||||||
|
$ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Raw<TabSession> create(Ref ref) {
|
||||||
|
return selectedTabSessionNotifier(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(Raw<TabSession> value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<Raw<TabSession>>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$selectedTabSessionNotifierHash() =>
|
||||||
|
r'aef19991d5b05a2bb28e8a6ccb57dc75c2f3148f';
|
||||||
|
|||||||
@@ -6,336 +6,334 @@ part of 'tab_state.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$tabStateHash() => r'f57b2353acc99ca73670d504b45ea5ff19df38c7';
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
@ProviderFor(TabStates)
|
||||||
class _SystemHash {
|
const tabStatesProvider = TabStatesProvider._();
|
||||||
_SystemHash._();
|
|
||||||
|
|
||||||
static int combine(int hash, int value) {
|
final class TabStatesProvider
|
||||||
// ignore: parameter_assignments
|
extends $NotifierProvider<TabStates, Map<String, TabState>> {
|
||||||
hash = 0x1fffffff & (hash + value);
|
const TabStatesProvider._()
|
||||||
// ignore: parameter_assignments
|
: super(
|
||||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
from: null,
|
||||||
return hash ^ (hash >> 6);
|
argument: null,
|
||||||
}
|
retry: null,
|
||||||
|
name: r'tabStatesProvider',
|
||||||
static int finish(int hash) {
|
isAutoDispose: false,
|
||||||
// ignore: parameter_assignments
|
dependencies: null,
|
||||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
$allTransitiveDependencies: null,
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = hash ^ (hash >> 11);
|
|
||||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [tabState].
|
|
||||||
@ProviderFor(tabState)
|
|
||||||
const tabStateProvider = TabStateFamily();
|
|
||||||
|
|
||||||
/// See also [tabState].
|
|
||||||
class TabStateFamily extends Family<TabState?> {
|
|
||||||
/// See also [tabState].
|
|
||||||
const TabStateFamily();
|
|
||||||
|
|
||||||
/// See also [tabState].
|
|
||||||
TabStateProvider call(String? tabId) {
|
|
||||||
return TabStateProvider(tabId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
TabStateProvider getProviderOverride(covariant TabStateProvider provider) {
|
|
||||||
return call(provider.tabId);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'tabStateProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [tabState].
|
|
||||||
class TabStateProvider extends AutoDisposeProvider<TabState?> {
|
|
||||||
/// See also [tabState].
|
|
||||||
TabStateProvider(String? tabId)
|
|
||||||
: this._internal(
|
|
||||||
(ref) => tabState(ref as TabStateRef, tabId),
|
|
||||||
from: tabStateProvider,
|
|
||||||
name: r'tabStateProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$tabStateHash,
|
|
||||||
dependencies: TabStateFamily._dependencies,
|
|
||||||
allTransitiveDependencies: TabStateFamily._allTransitiveDependencies,
|
|
||||||
tabId: tabId,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
TabStateProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.tabId,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final String? tabId;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Override overrideWith(TabState? Function(TabStateRef provider) create) {
|
String debugGetCreateSourceHash() => _$tabStatesHash();
|
||||||
return ProviderOverride(
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
TabStates create() => TabStates();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(Map<String, TabState> value) {
|
||||||
|
return $ProviderOverride(
|
||||||
origin: this,
|
origin: this,
|
||||||
override: TabStateProvider._internal(
|
providerOverride: $SyncValueProvider<Map<String, TabState>>(value),
|
||||||
(ref) => create(ref as TabStateRef),
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
tabId: tabId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
AutoDisposeProviderElement<TabState?> createElement() {
|
|
||||||
return _TabStateProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) {
|
|
||||||
return other is TabStateProvider && other.tabId == tabId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode {
|
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
|
||||||
hash = _SystemHash.combine(hash, tabId.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
mixin TabStateRef on AutoDisposeProviderRef<TabState?> {
|
|
||||||
/// The parameter `tabId` of this provider.
|
|
||||||
String? get tabId;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _TabStateProviderElement extends AutoDisposeProviderElement<TabState?>
|
|
||||||
with TabStateRef {
|
|
||||||
_TabStateProviderElement(super.provider);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get tabId => (origin as TabStateProvider).tabId;
|
|
||||||
}
|
|
||||||
|
|
||||||
String _$selectedTabStateHash() => r'dbd36af7af286bd9d079f30e8e11bbda23bf7728';
|
|
||||||
|
|
||||||
/// See also [selectedTabState].
|
|
||||||
@ProviderFor(selectedTabState)
|
|
||||||
final selectedTabStateProvider = AutoDisposeProvider<TabState?>.internal(
|
|
||||||
selectedTabState,
|
|
||||||
name: r'selectedTabStateProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$selectedTabStateHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef SelectedTabStateRef = AutoDisposeProviderRef<TabState?>;
|
|
||||||
String _$selectedTabTypeHash() => r'53093fc6db8becde7500163661e087fb0a2eb955';
|
|
||||||
|
|
||||||
/// See also [selectedTabType].
|
|
||||||
@ProviderFor(selectedTabType)
|
|
||||||
final selectedTabTypeProvider = AutoDisposeProvider<TabType?>.internal(
|
|
||||||
selectedTabType,
|
|
||||||
name: r'selectedTabTypeProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$selectedTabTypeHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef SelectedTabTypeRef = AutoDisposeProviderRef<TabType?>;
|
|
||||||
String _$selectedTabContainerIdHash() =>
|
|
||||||
r'9f0246a02a069b1a66211a3924f32e9d75f0f344';
|
|
||||||
|
|
||||||
/// See also [selectedTabContainerId].
|
|
||||||
@ProviderFor(selectedTabContainerId)
|
|
||||||
final selectedTabContainerIdProvider = Provider<AsyncValue<String?>>.internal(
|
|
||||||
selectedTabContainerId,
|
|
||||||
name: r'selectedTabContainerIdProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$selectedTabContainerIdHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef SelectedTabContainerIdRef = ProviderRef<AsyncValue<String?>>;
|
|
||||||
String _$tabScrollYHash() => r'dcb1e82b42bab98c4fc2ee4c7a22f37a28b8ce9e';
|
|
||||||
|
|
||||||
/// See also [tabScrollY].
|
|
||||||
@ProviderFor(tabScrollY)
|
|
||||||
const tabScrollYProvider = TabScrollYFamily();
|
|
||||||
|
|
||||||
/// See also [tabScrollY].
|
|
||||||
class TabScrollYFamily extends Family<AsyncValue<int>> {
|
|
||||||
/// See also [tabScrollY].
|
|
||||||
const TabScrollYFamily();
|
|
||||||
|
|
||||||
/// See also [tabScrollY].
|
|
||||||
TabScrollYProvider call(String? tabId, Duration sampleTime) {
|
|
||||||
return TabScrollYProvider(tabId, sampleTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
TabScrollYProvider getProviderOverride(
|
|
||||||
covariant TabScrollYProvider provider,
|
|
||||||
) {
|
|
||||||
return call(provider.tabId, provider.sampleTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'tabScrollYProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [tabScrollY].
|
|
||||||
class TabScrollYProvider extends AutoDisposeStreamProvider<int> {
|
|
||||||
/// See also [tabScrollY].
|
|
||||||
TabScrollYProvider(String? tabId, Duration sampleTime)
|
|
||||||
: this._internal(
|
|
||||||
(ref) => tabScrollY(ref as TabScrollYRef, tabId, sampleTime),
|
|
||||||
from: tabScrollYProvider,
|
|
||||||
name: r'tabScrollYProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$tabScrollYHash,
|
|
||||||
dependencies: TabScrollYFamily._dependencies,
|
|
||||||
allTransitiveDependencies: TabScrollYFamily._allTransitiveDependencies,
|
|
||||||
tabId: tabId,
|
|
||||||
sampleTime: sampleTime,
|
|
||||||
);
|
|
||||||
|
|
||||||
TabScrollYProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.tabId,
|
|
||||||
required this.sampleTime,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final String? tabId;
|
|
||||||
final Duration sampleTime;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(Stream<int> Function(TabScrollYRef provider) create) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: TabScrollYProvider._internal(
|
|
||||||
(ref) => create(ref as TabScrollYRef),
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
tabId: tabId,
|
|
||||||
sampleTime: sampleTime,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
AutoDisposeStreamProviderElement<int> createElement() {
|
|
||||||
return _TabScrollYProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) {
|
|
||||||
return other is TabScrollYProvider &&
|
|
||||||
other.tabId == tabId &&
|
|
||||||
other.sampleTime == sampleTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode {
|
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
|
||||||
hash = _SystemHash.combine(hash, tabId.hashCode);
|
|
||||||
hash = _SystemHash.combine(hash, sampleTime.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
mixin TabScrollYRef on AutoDisposeStreamProviderRef<int> {
|
|
||||||
/// The parameter `tabId` of this provider.
|
|
||||||
String? get tabId;
|
|
||||||
|
|
||||||
/// The parameter `sampleTime` of this provider.
|
|
||||||
Duration get sampleTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _TabScrollYProviderElement extends AutoDisposeStreamProviderElement<int>
|
|
||||||
with TabScrollYRef {
|
|
||||||
_TabScrollYProviderElement(super.provider);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get tabId => (origin as TabScrollYProvider).tabId;
|
|
||||||
@override
|
|
||||||
Duration get sampleTime => (origin as TabScrollYProvider).sampleTime;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$tabStatesHash() => r'66cff6a7b36328ee23b89fdd53046987b346bfcd';
|
String _$tabStatesHash() => r'66cff6a7b36328ee23b89fdd53046987b346bfcd';
|
||||||
|
|
||||||
/// See also [TabStates].
|
abstract class _$TabStates extends $Notifier<Map<String, TabState>> {
|
||||||
@ProviderFor(TabStates)
|
Map<String, TabState> build();
|
||||||
final tabStatesProvider =
|
@$mustCallSuper
|
||||||
NotifierProvider<TabStates, Map<String, TabState>>.internal(
|
@override
|
||||||
TabStates.new,
|
void runBuild() {
|
||||||
name: r'tabStatesProvider',
|
final created = build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref = this.ref as $Ref<Map<String, TabState>, Map<String, TabState>>;
|
||||||
? null
|
final element =
|
||||||
: _$tabStatesHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<Map<String, TabState>, Map<String, TabState>>,
|
||||||
);
|
Map<String, TabState>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
typedef _$TabStates = Notifier<Map<String, TabState>>;
|
@ProviderFor(tabState)
|
||||||
// ignore_for_file: type=lint
|
const tabStateProvider = TabStateFamily._();
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
|
||||||
|
final class TabStateProvider
|
||||||
|
extends $FunctionalProvider<TabState?, TabState?, TabState?>
|
||||||
|
with $Provider<TabState?> {
|
||||||
|
const TabStateProvider._({
|
||||||
|
required TabStateFamily super.from,
|
||||||
|
required String? super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'tabStateProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$tabStateHash();
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'tabStateProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<TabState?> $createElement($ProviderPointer pointer) =>
|
||||||
|
$ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
TabState? create(Ref ref) {
|
||||||
|
final argument = this.argument as String?;
|
||||||
|
return tabState(ref, argument);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(TabState? value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<TabState?>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return other is TabStateProvider && other.argument == argument;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return argument.hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$tabStateHash() => r'f57b2353acc99ca73670d504b45ea5ff19df38c7';
|
||||||
|
|
||||||
|
final class TabStateFamily extends $Family
|
||||||
|
with $FunctionalFamilyOverride<TabState?, String?> {
|
||||||
|
const TabStateFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'tabStateProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
TabStateProvider call(String? tabId) =>
|
||||||
|
TabStateProvider._(argument: tabId, from: this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => r'tabStateProvider';
|
||||||
|
}
|
||||||
|
|
||||||
|
@ProviderFor(selectedTabState)
|
||||||
|
const selectedTabStateProvider = SelectedTabStateProvider._();
|
||||||
|
|
||||||
|
final class SelectedTabStateProvider
|
||||||
|
extends $FunctionalProvider<TabState?, TabState?, TabState?>
|
||||||
|
with $Provider<TabState?> {
|
||||||
|
const SelectedTabStateProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'selectedTabStateProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$selectedTabStateHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<TabState?> $createElement($ProviderPointer pointer) =>
|
||||||
|
$ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
TabState? create(Ref ref) {
|
||||||
|
return selectedTabState(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(TabState? value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<TabState?>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$selectedTabStateHash() => r'dbd36af7af286bd9d079f30e8e11bbda23bf7728';
|
||||||
|
|
||||||
|
@ProviderFor(selectedTabType)
|
||||||
|
const selectedTabTypeProvider = SelectedTabTypeProvider._();
|
||||||
|
|
||||||
|
final class SelectedTabTypeProvider
|
||||||
|
extends $FunctionalProvider<TabType?, TabType?, TabType?>
|
||||||
|
with $Provider<TabType?> {
|
||||||
|
const SelectedTabTypeProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'selectedTabTypeProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$selectedTabTypeHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<TabType?> $createElement($ProviderPointer pointer) =>
|
||||||
|
$ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
TabType? create(Ref ref) {
|
||||||
|
return selectedTabType(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(TabType? value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<TabType?>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$selectedTabTypeHash() => r'53093fc6db8becde7500163661e087fb0a2eb955';
|
||||||
|
|
||||||
|
@ProviderFor(selectedTabContainerId)
|
||||||
|
const selectedTabContainerIdProvider = SelectedTabContainerIdProvider._();
|
||||||
|
|
||||||
|
final class SelectedTabContainerIdProvider
|
||||||
|
extends
|
||||||
|
$FunctionalProvider<
|
||||||
|
AsyncValue<String?>,
|
||||||
|
AsyncValue<String?>,
|
||||||
|
AsyncValue<String?>
|
||||||
|
>
|
||||||
|
with $Provider<AsyncValue<String?>> {
|
||||||
|
const SelectedTabContainerIdProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'selectedTabContainerIdProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$selectedTabContainerIdHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<AsyncValue<String?>> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
AsyncValue<String?> create(Ref ref) {
|
||||||
|
return selectedTabContainerId(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(AsyncValue<String?> value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<AsyncValue<String?>>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$selectedTabContainerIdHash() =>
|
||||||
|
r'9f0246a02a069b1a66211a3924f32e9d75f0f344';
|
||||||
|
|
||||||
|
@ProviderFor(tabScrollY)
|
||||||
|
const tabScrollYProvider = TabScrollYFamily._();
|
||||||
|
|
||||||
|
final class TabScrollYProvider
|
||||||
|
extends $FunctionalProvider<AsyncValue<int>, int, Stream<int>>
|
||||||
|
with $FutureModifier<int>, $StreamProvider<int> {
|
||||||
|
const TabScrollYProvider._({
|
||||||
|
required TabScrollYFamily super.from,
|
||||||
|
required (String?, Duration) super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'tabScrollYProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$tabScrollYHash();
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'tabScrollYProvider'
|
||||||
|
''
|
||||||
|
'$argument';
|
||||||
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$StreamProviderElement<int> $createElement($ProviderPointer pointer) =>
|
||||||
|
$StreamProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Stream<int> create(Ref ref) {
|
||||||
|
final argument = this.argument as (String?, Duration);
|
||||||
|
return tabScrollY(ref, argument.$1, argument.$2);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return other is TabScrollYProvider && other.argument == argument;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return argument.hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$tabScrollYHash() => r'dcb1e82b42bab98c4fc2ee4c7a22f37a28b8ce9e';
|
||||||
|
|
||||||
|
final class TabScrollYFamily extends $Family
|
||||||
|
with $FunctionalFamilyOverride<Stream<int>, (String?, Duration)> {
|
||||||
|
const TabScrollYFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'tabScrollYProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
TabScrollYProvider call(String? tabId, Duration sampleTime) =>
|
||||||
|
TabScrollYProvider._(argument: (tabId, sampleTime), from: this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => r'tabScrollYProvider';
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,172 +6,116 @@ part of 'web_extensions_state.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$webExtensionsStateHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'6fb44ab543250f2b2554e410ee749fdd035cd4e7';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
|
||||||
class _SystemHash {
|
|
||||||
_SystemHash._();
|
|
||||||
|
|
||||||
static int combine(int hash, int value) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + value);
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
|
||||||
return hash ^ (hash >> 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int finish(int hash) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = hash ^ (hash >> 11);
|
|
||||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class _$WebExtensionsState
|
|
||||||
extends BuildlessNotifier<Map<String, WebExtensionState>> {
|
|
||||||
late final WebExtensionActionType actionType;
|
|
||||||
|
|
||||||
Map<String, WebExtensionState> build(WebExtensionActionType actionType);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [WebExtensionsState].
|
|
||||||
@ProviderFor(WebExtensionsState)
|
@ProviderFor(WebExtensionsState)
|
||||||
const webExtensionsStateProvider = WebExtensionsStateFamily();
|
const webExtensionsStateProvider = WebExtensionsStateFamily._();
|
||||||
|
|
||||||
/// See also [WebExtensionsState].
|
final class WebExtensionsStateProvider
|
||||||
class WebExtensionsStateFamily extends Family<Map<String, WebExtensionState>> {
|
|
||||||
/// See also [WebExtensionsState].
|
|
||||||
const WebExtensionsStateFamily();
|
|
||||||
|
|
||||||
/// See also [WebExtensionsState].
|
|
||||||
WebExtensionsStateProvider call(WebExtensionActionType actionType) {
|
|
||||||
return WebExtensionsStateProvider(actionType);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
WebExtensionsStateProvider getProviderOverride(
|
|
||||||
covariant WebExtensionsStateProvider provider,
|
|
||||||
) {
|
|
||||||
return call(provider.actionType);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'webExtensionsStateProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [WebExtensionsState].
|
|
||||||
class WebExtensionsStateProvider
|
|
||||||
extends
|
extends
|
||||||
NotifierProviderImpl<
|
$NotifierProvider<WebExtensionsState, Map<String, WebExtensionState>> {
|
||||||
WebExtensionsState,
|
const WebExtensionsStateProvider._({
|
||||||
Map<String, WebExtensionState>
|
required WebExtensionsStateFamily super.from,
|
||||||
> {
|
required WebExtensionActionType super.argument,
|
||||||
/// See also [WebExtensionsState].
|
}) : super(
|
||||||
WebExtensionsStateProvider(WebExtensionActionType actionType)
|
retry: null,
|
||||||
: this._internal(
|
name: r'webExtensionsStateProvider',
|
||||||
() => WebExtensionsState()..actionType = actionType,
|
isAutoDispose: false,
|
||||||
from: webExtensionsStateProvider,
|
dependencies: null,
|
||||||
name: r'webExtensionsStateProvider',
|
$allTransitiveDependencies: null,
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
);
|
||||||
? null
|
|
||||||
: _$webExtensionsStateHash,
|
|
||||||
dependencies: WebExtensionsStateFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
WebExtensionsStateFamily._allTransitiveDependencies,
|
|
||||||
actionType: actionType,
|
|
||||||
);
|
|
||||||
|
|
||||||
WebExtensionsStateProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.actionType,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final WebExtensionActionType actionType;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Map<String, WebExtensionState> runNotifierBuild(
|
String debugGetCreateSourceHash() => _$webExtensionsStateHash();
|
||||||
covariant WebExtensionsState notifier,
|
|
||||||
) {
|
@override
|
||||||
return notifier.build(actionType);
|
String toString() {
|
||||||
|
return r'webExtensionsStateProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
Override overrideWith(WebExtensionsState Function() create) {
|
WebExtensionsState create() => WebExtensionsState();
|
||||||
return ProviderOverride(
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(Map<String, WebExtensionState> value) {
|
||||||
|
return $ProviderOverride(
|
||||||
origin: this,
|
origin: this,
|
||||||
override: WebExtensionsStateProvider._internal(
|
providerOverride: $SyncValueProvider<Map<String, WebExtensionState>>(
|
||||||
() => create()..actionType = actionType,
|
value,
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
actionType: actionType,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
NotifierProviderElement<WebExtensionsState, Map<String, WebExtensionState>>
|
|
||||||
createElement() {
|
|
||||||
return _WebExtensionsStateProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is WebExtensionsStateProvider &&
|
return other is WebExtensionsStateProvider && other.argument == argument;
|
||||||
other.actionType == actionType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, actionType.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$webExtensionsStateHash() =>
|
||||||
// ignore: unused_element
|
r'6fb44ab543250f2b2554e410ee749fdd035cd4e7';
|
||||||
mixin WebExtensionsStateRef
|
|
||||||
on NotifierProviderRef<Map<String, WebExtensionState>> {
|
|
||||||
/// The parameter `actionType` of this provider.
|
|
||||||
WebExtensionActionType get actionType;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _WebExtensionsStateProviderElement
|
final class WebExtensionsStateFamily extends $Family
|
||||||
extends
|
with
|
||||||
NotifierProviderElement<
|
$ClassFamilyOverride<
|
||||||
WebExtensionsState,
|
WebExtensionsState,
|
||||||
Map<String, WebExtensionState>
|
Map<String, WebExtensionState>,
|
||||||
>
|
Map<String, WebExtensionState>,
|
||||||
with WebExtensionsStateRef {
|
Map<String, WebExtensionState>,
|
||||||
_WebExtensionsStateProviderElement(super.provider);
|
WebExtensionActionType
|
||||||
|
> {
|
||||||
|
const WebExtensionsStateFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'webExtensionsStateProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: false,
|
||||||
|
);
|
||||||
|
|
||||||
|
WebExtensionsStateProvider call(WebExtensionActionType actionType) =>
|
||||||
|
WebExtensionsStateProvider._(argument: actionType, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
WebExtensionActionType get actionType =>
|
String toString() => r'webExtensionsStateProvider';
|
||||||
(origin as WebExtensionsStateProvider).actionType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
abstract class _$WebExtensionsState
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
extends $Notifier<Map<String, WebExtensionState>> {
|
||||||
|
late final _$args = ref.$arg as WebExtensionActionType;
|
||||||
|
WebExtensionActionType get actionType => _$args;
|
||||||
|
|
||||||
|
Map<String, WebExtensionState> build(WebExtensionActionType actionType);
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build(_$args);
|
||||||
|
final ref =
|
||||||
|
this.ref
|
||||||
|
as $Ref<
|
||||||
|
Map<String, WebExtensionState>,
|
||||||
|
Map<String, WebExtensionState>
|
||||||
|
>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<
|
||||||
|
Map<String, WebExtensionState>,
|
||||||
|
Map<String, WebExtensionState>
|
||||||
|
>,
|
||||||
|
Map<String, WebExtensionState>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ class TabRepository extends _$TabRepository {
|
|||||||
Future<bool> selectPreviouslyOpenedTab(String tabId) async {
|
Future<bool> selectPreviouslyOpenedTab(String tabId) async {
|
||||||
final previousTabId = await ref
|
final previousTabId = await ref
|
||||||
.read(tabDatabaseProvider)
|
.read(tabDatabaseProvider)
|
||||||
|
.definitionsDrift
|
||||||
.previousTabByTimestamp(tabId: tabId)
|
.previousTabByTimestamp(tabId: tabId)
|
||||||
.getSingleOrNull();
|
.getSingleOrNull();
|
||||||
|
|
||||||
@@ -144,6 +145,7 @@ class TabRepository extends _$TabRepository {
|
|||||||
Future<bool> selectPreviousTab(String tabId) async {
|
Future<bool> selectPreviousTab(String tabId) async {
|
||||||
final previousTabId = await ref
|
final previousTabId = await ref
|
||||||
.read(tabDatabaseProvider)
|
.read(tabDatabaseProvider)
|
||||||
|
.definitionsDrift
|
||||||
.previousTabByOrderKey(tabId: tabId)
|
.previousTabByOrderKey(tabId: tabId)
|
||||||
.getSingleOrNull();
|
.getSingleOrNull();
|
||||||
|
|
||||||
@@ -157,6 +159,7 @@ class TabRepository extends _$TabRepository {
|
|||||||
Future<bool> selectNextTab(String tabId) async {
|
Future<bool> selectNextTab(String tabId) async {
|
||||||
final previousTabId = await ref
|
final previousTabId = await ref
|
||||||
.read(tabDatabaseProvider)
|
.read(tabDatabaseProvider)
|
||||||
|
.definitionsDrift
|
||||||
.nextTabByOrderKey(tabId: tabId)
|
.nextTabByOrderKey(tabId: tabId)
|
||||||
.getSingleOrNull();
|
.getSingleOrNull();
|
||||||
|
|
||||||
|
|||||||
@@ -6,20 +6,58 @@ part of 'tab.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$tabRepositoryHash() => r'45af26417881bca38973cf702073b1c7857f1cfa';
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// See also [TabRepository].
|
|
||||||
@ProviderFor(TabRepository)
|
@ProviderFor(TabRepository)
|
||||||
final tabRepositoryProvider = NotifierProvider<TabRepository, void>.internal(
|
const tabRepositoryProvider = TabRepositoryProvider._();
|
||||||
TabRepository.new,
|
|
||||||
name: r'tabRepositoryProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$tabRepositoryHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef _$TabRepository = Notifier<void>;
|
final class TabRepositoryProvider
|
||||||
// ignore_for_file: type=lint
|
extends $NotifierProvider<TabRepository, void> {
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
const TabRepositoryProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'tabRepositoryProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$tabRepositoryHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
TabRepository create() => TabRepository();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(void value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<void>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$tabRepositoryHash() => r'7cb56001fbb038321197d237148c9ebf35740521';
|
||||||
|
|
||||||
|
abstract class _$TabRepository extends $Notifier<void> {
|
||||||
|
void build();
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
build();
|
||||||
|
final ref = this.ref as $Ref<void, void>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<void, void>,
|
||||||
|
void,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -83,9 +83,7 @@ EquatableValue<List<String>> availableTabIds(
|
|||||||
ContainerFilter containerFilter,
|
ContainerFilter containerFilter,
|
||||||
) {
|
) {
|
||||||
final containerTabs = ref.watch(
|
final containerTabs = ref.watch(
|
||||||
containerTabIdsProvider(
|
containerTabIdsProvider(containerFilter).select((value) => value.value),
|
||||||
containerFilter,
|
|
||||||
).select((value) => value.valueOrNull),
|
|
||||||
);
|
);
|
||||||
final tabList = ref.watch(tabListProvider);
|
final tabList = ref.watch(tabListProvider);
|
||||||
|
|
||||||
@@ -118,13 +116,13 @@ EquatableValue<List<TabEntity>> suggestedTabEntities(
|
|||||||
containerTabIdsProvider(
|
containerTabIdsProvider(
|
||||||
// ignore: provider_parameters
|
// ignore: provider_parameters
|
||||||
ContainerFilterById(containerId: containerId),
|
ContainerFilterById(containerId: containerId),
|
||||||
).select((value) => EquatableValue(value.valueOrNull)),
|
).select((value) => EquatableValue(value.value)),
|
||||||
);
|
);
|
||||||
|
|
||||||
final suggestions = ref.watch(
|
final suggestions = ref.watch(
|
||||||
containerTabSuggestionsProvider(containerId).select(
|
containerTabSuggestionsProvider(containerId).select(
|
||||||
(value) => EquatableValue(
|
(value) => EquatableValue(
|
||||||
value.valueOrNull.mapNotNull(
|
value.value.mapNotNull(
|
||||||
(result) => result
|
(result) => result
|
||||||
.whereNot(
|
.whereNot(
|
||||||
(tabId) => excludedTabIds.value?.contains(tabId) ?? false,
|
(tabId) => excludedTabIds.value?.contains(tabId) ?? false,
|
||||||
@@ -151,7 +149,7 @@ EquatableValue<List<TabEntity>> seamlessFilteredTabEntities(
|
|||||||
.watch(
|
.watch(
|
||||||
tabSearchRepositoryProvider(searchPartition).select(
|
tabSearchRepositoryProvider(searchPartition).select(
|
||||||
(value) => EquatableValue(
|
(value) => EquatableValue(
|
||||||
value.valueOrNull.mapNotNull(
|
value.value.mapNotNull(
|
||||||
(result) => result.results
|
(result) => result.results
|
||||||
.map(
|
.map(
|
||||||
(tab) => SearchResultTabEntity(
|
(tab) => SearchResultTabEntity(
|
||||||
@@ -179,7 +177,7 @@ EquatableValue<List<TabEntity>> seamlessFilteredTabEntities(
|
|||||||
final trees = ref.watch(
|
final trees = ref.watch(
|
||||||
tabTreesProvider.select(
|
tabTreesProvider.select(
|
||||||
(value) => EquatableValue(
|
(value) => EquatableValue(
|
||||||
value.valueOrNull
|
value.value
|
||||||
?.map(
|
?.map(
|
||||||
(tree) => TabTreeEntity(
|
(tree) => TabTreeEntity(
|
||||||
tabId: tree.latestTabId,
|
tabId: tree.latestTabId,
|
||||||
@@ -228,7 +226,7 @@ EquatableValue<List<TabPreview>> seamlessFilteredTabPreviews(
|
|||||||
.watch(
|
.watch(
|
||||||
tabSearchRepositoryProvider(
|
tabSearchRepositoryProvider(
|
||||||
searchPartition,
|
searchPartition,
|
||||||
).select((value) => EquatableValue(value.valueOrNull)),
|
).select((value) => EquatableValue(value.value)),
|
||||||
)
|
)
|
||||||
.value;
|
.value;
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -6,25 +6,52 @@ part of 'intent.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(EngineBoundIntentStream)
|
||||||
|
const engineBoundIntentStreamProvider = EngineBoundIntentStreamProvider._();
|
||||||
|
|
||||||
|
final class EngineBoundIntentStreamProvider
|
||||||
|
extends $StreamNotifierProvider<EngineBoundIntentStream, SharedContent> {
|
||||||
|
const EngineBoundIntentStreamProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'engineBoundIntentStreamProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$engineBoundIntentStreamHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
EngineBoundIntentStream create() => EngineBoundIntentStream();
|
||||||
|
}
|
||||||
|
|
||||||
String _$engineBoundIntentStreamHash() =>
|
String _$engineBoundIntentStreamHash() =>
|
||||||
r'860e39a7b608d579f7383e2199719067ad26f268';
|
r'860e39a7b608d579f7383e2199719067ad26f268';
|
||||||
|
|
||||||
/// See also [EngineBoundIntentStream].
|
abstract class _$EngineBoundIntentStream
|
||||||
@ProviderFor(EngineBoundIntentStream)
|
extends $StreamNotifier<SharedContent> {
|
||||||
final engineBoundIntentStreamProvider =
|
Stream<SharedContent> build();
|
||||||
AutoDisposeStreamNotifierProvider<
|
@$mustCallSuper
|
||||||
EngineBoundIntentStream,
|
@override
|
||||||
SharedContent
|
void runBuild() {
|
||||||
>.internal(
|
final created = build();
|
||||||
EngineBoundIntentStream.new,
|
final ref = this.ref as $Ref<AsyncValue<SharedContent>, SharedContent>;
|
||||||
name: r'engineBoundIntentStreamProvider',
|
final element =
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
ref.element
|
||||||
? null
|
as $ClassProviderElement<
|
||||||
: _$engineBoundIntentStreamHash,
|
AnyNotifier<AsyncValue<SharedContent>, SharedContent>,
|
||||||
dependencies: null,
|
AsyncValue<SharedContent>,
|
||||||
allTransitiveDependencies: null,
|
Object?,
|
||||||
);
|
Object?
|
||||||
|
>;
|
||||||
typedef _$EngineBoundIntentStream = AutoDisposeStreamNotifier<SharedContent>;
|
element.handleValue(ref, created);
|
||||||
// ignore_for_file: type=lint
|
}
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
}
|
||||||
|
|||||||
@@ -6,22 +6,59 @@ part of 'lifecycle.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(BrowserViewLifecycle)
|
||||||
|
const browserViewLifecycleProvider = BrowserViewLifecycleProvider._();
|
||||||
|
|
||||||
|
final class BrowserViewLifecycleProvider
|
||||||
|
extends $NotifierProvider<BrowserViewLifecycle, AppLifecycleState?> {
|
||||||
|
const BrowserViewLifecycleProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'browserViewLifecycleProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$browserViewLifecycleHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
BrowserViewLifecycle create() => BrowserViewLifecycle();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(AppLifecycleState? value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<AppLifecycleState?>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$browserViewLifecycleHash() =>
|
String _$browserViewLifecycleHash() =>
|
||||||
r'9082d058611aaaae268b60b8ce130150f73d453d';
|
r'9082d058611aaaae268b60b8ce130150f73d453d';
|
||||||
|
|
||||||
/// See also [BrowserViewLifecycle].
|
abstract class _$BrowserViewLifecycle extends $Notifier<AppLifecycleState?> {
|
||||||
@ProviderFor(BrowserViewLifecycle)
|
AppLifecycleState? build();
|
||||||
final browserViewLifecycleProvider =
|
@$mustCallSuper
|
||||||
NotifierProvider<BrowserViewLifecycle, AppLifecycleState?>.internal(
|
@override
|
||||||
BrowserViewLifecycle.new,
|
void runBuild() {
|
||||||
name: r'browserViewLifecycleProvider',
|
final created = build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref = this.ref as $Ref<AppLifecycleState?, AppLifecycleState?>;
|
||||||
? null
|
final element =
|
||||||
: _$browserViewLifecycleHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<AppLifecycleState?, AppLifecycleState?>,
|
||||||
);
|
AppLifecycleState?,
|
||||||
|
Object?,
|
||||||
typedef _$BrowserViewLifecycle = Notifier<AppLifecycleState?>;
|
Object?
|
||||||
// ignore_for_file: type=lint
|
>;
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,22 +6,59 @@ part of 'browser_addon.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(BrowserAddonService)
|
||||||
|
const browserAddonServiceProvider = BrowserAddonServiceProvider._();
|
||||||
|
|
||||||
|
final class BrowserAddonServiceProvider
|
||||||
|
extends $NotifierProvider<BrowserAddonService, void> {
|
||||||
|
const BrowserAddonServiceProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'browserAddonServiceProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$browserAddonServiceHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
BrowserAddonService create() => BrowserAddonService();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(void value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<void>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$browserAddonServiceHash() =>
|
String _$browserAddonServiceHash() =>
|
||||||
r'1dd73c322e712e1492d74f1af844d5b5cc8f81bb';
|
r'1dd73c322e712e1492d74f1af844d5b5cc8f81bb';
|
||||||
|
|
||||||
/// See also [BrowserAddonService].
|
abstract class _$BrowserAddonService extends $Notifier<void> {
|
||||||
@ProviderFor(BrowserAddonService)
|
void build();
|
||||||
final browserAddonServiceProvider =
|
@$mustCallSuper
|
||||||
AutoDisposeNotifierProvider<BrowserAddonService, void>.internal(
|
@override
|
||||||
BrowserAddonService.new,
|
void runBuild() {
|
||||||
name: r'browserAddonServiceProvider',
|
build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref = this.ref as $Ref<void, void>;
|
||||||
? null
|
final element =
|
||||||
: _$browserAddonServiceHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<void, void>,
|
||||||
);
|
void,
|
||||||
|
Object?,
|
||||||
typedef _$BrowserAddonService = AutoDisposeNotifier<void>;
|
Object?
|
||||||
// ignore_for_file: type=lint
|
>;
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
element.handleValue(ref, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,22 +6,59 @@ part of 'browser_data.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(BrowserDataService)
|
||||||
|
const browserDataServiceProvider = BrowserDataServiceProvider._();
|
||||||
|
|
||||||
|
final class BrowserDataServiceProvider
|
||||||
|
extends $NotifierProvider<BrowserDataService, void> {
|
||||||
|
const BrowserDataServiceProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'browserDataServiceProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$browserDataServiceHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
BrowserDataService create() => BrowserDataService();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(void value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<void>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$browserDataServiceHash() =>
|
String _$browserDataServiceHash() =>
|
||||||
r'0a00db5b143d3851f2c171f4f939940f959b67bb';
|
r'0a00db5b143d3851f2c171f4f939940f959b67bb';
|
||||||
|
|
||||||
/// See also [BrowserDataService].
|
abstract class _$BrowserDataService extends $Notifier<void> {
|
||||||
@ProviderFor(BrowserDataService)
|
void build();
|
||||||
final browserDataServiceProvider =
|
@$mustCallSuper
|
||||||
NotifierProvider<BrowserDataService, void>.internal(
|
@override
|
||||||
BrowserDataService.new,
|
void runBuild() {
|
||||||
name: r'browserDataServiceProvider',
|
build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref = this.ref as $Ref<void, void>;
|
||||||
? null
|
final element =
|
||||||
: _$browserDataServiceHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<void, void>,
|
||||||
);
|
void,
|
||||||
|
Object?,
|
||||||
typedef _$BrowserDataService = Notifier<void>;
|
Object?
|
||||||
// ignore_for_file: type=lint
|
>;
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
element.handleValue(ref, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+13
-15
@@ -19,6 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
import 'package:flutter/material.dart' show ThemeMode;
|
import 'package:flutter/material.dart' show ThemeMode;
|
||||||
import 'package:flutter_mozilla_components/flutter_mozilla_components.dart';
|
import 'package:flutter_mozilla_components/flutter_mozilla_components.dart';
|
||||||
|
import 'package:riverpod/riverpod.dart';
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
import 'package:weblibre/core/logger.dart';
|
import 'package:weblibre/core/logger.dart';
|
||||||
import 'package:weblibre/features/user/domain/repositories/engine_settings.dart';
|
import 'package:weblibre/features/user/domain/repositories/engine_settings.dart';
|
||||||
@@ -62,69 +63,66 @@ class EngineSettingsReplicationService
|
|||||||
fireImmediately: true,
|
fireImmediately: true,
|
||||||
engineSettingsRepositoryProvider,
|
engineSettingsRepositoryProvider,
|
||||||
(previous, next) async {
|
(previous, next) async {
|
||||||
final settings = next.valueOrNull;
|
final settings = next.value;
|
||||||
|
|
||||||
if (settings != null) {
|
if (settings != null) {
|
||||||
if (initialSettingsSent && previous != null) {
|
if (initialSettingsSent && previous != null) {
|
||||||
if (previous.valueOrNull?.javascriptEnabled !=
|
if (previous.value?.javascriptEnabled !=
|
||||||
settings.javascriptEnabled) {
|
settings.javascriptEnabled) {
|
||||||
await _service.javascriptEnabled(settings.javascriptEnabled);
|
await _service.javascriptEnabled(settings.javascriptEnabled);
|
||||||
}
|
}
|
||||||
if (previous.valueOrNull?.trackingProtectionPolicy !=
|
if (previous.value?.trackingProtectionPolicy !=
|
||||||
settings.trackingProtectionPolicy) {
|
settings.trackingProtectionPolicy) {
|
||||||
await _service.trackingProtectionPolicy(
|
await _service.trackingProtectionPolicy(
|
||||||
settings.trackingProtectionPolicy,
|
settings.trackingProtectionPolicy,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (previous.valueOrNull?.httpsOnlyMode != settings.httpsOnlyMode) {
|
if (previous.value?.httpsOnlyMode != settings.httpsOnlyMode) {
|
||||||
await _service.httpsOnlyMode(settings.httpsOnlyMode);
|
await _service.httpsOnlyMode(settings.httpsOnlyMode);
|
||||||
}
|
}
|
||||||
if (previous.valueOrNull?.globalPrivacyControlEnabled !=
|
if (previous.value?.globalPrivacyControlEnabled !=
|
||||||
settings.globalPrivacyControlEnabled) {
|
settings.globalPrivacyControlEnabled) {
|
||||||
await _service.globalPrivacyControlEnabled(
|
await _service.globalPrivacyControlEnabled(
|
||||||
settings.globalPrivacyControlEnabled,
|
settings.globalPrivacyControlEnabled,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (previous.valueOrNull?.preferredColorScheme !=
|
if (previous.value?.preferredColorScheme !=
|
||||||
settings.preferredColorScheme) {
|
settings.preferredColorScheme) {
|
||||||
await _service.preferredColorScheme(
|
await _service.preferredColorScheme(
|
||||||
settings.preferredColorScheme,
|
settings.preferredColorScheme,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (previous.valueOrNull?.cookieBannerHandlingMode !=
|
if (previous.value?.cookieBannerHandlingMode !=
|
||||||
settings.cookieBannerHandlingMode) {
|
settings.cookieBannerHandlingMode) {
|
||||||
await _service.cookieBannerHandlingMode(
|
await _service.cookieBannerHandlingMode(
|
||||||
settings.cookieBannerHandlingMode,
|
settings.cookieBannerHandlingMode,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (previous.valueOrNull?.cookieBannerHandlingModePrivateBrowsing !=
|
if (previous.value?.cookieBannerHandlingModePrivateBrowsing !=
|
||||||
settings.cookieBannerHandlingModePrivateBrowsing) {
|
settings.cookieBannerHandlingModePrivateBrowsing) {
|
||||||
await _service.cookieBannerHandlingModePrivateBrowsing(
|
await _service.cookieBannerHandlingModePrivateBrowsing(
|
||||||
settings.cookieBannerHandlingModePrivateBrowsing,
|
settings.cookieBannerHandlingModePrivateBrowsing,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (previous.valueOrNull?.cookieBannerHandlingGlobalRules !=
|
if (previous.value?.cookieBannerHandlingGlobalRules !=
|
||||||
settings.cookieBannerHandlingGlobalRules) {
|
settings.cookieBannerHandlingGlobalRules) {
|
||||||
await _service.cookieBannerHandlingGlobalRules(
|
await _service.cookieBannerHandlingGlobalRules(
|
||||||
settings.cookieBannerHandlingGlobalRules,
|
settings.cookieBannerHandlingGlobalRules,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (previous
|
if (previous.value?.cookieBannerHandlingGlobalRulesSubFrames !=
|
||||||
.valueOrNull
|
|
||||||
?.cookieBannerHandlingGlobalRulesSubFrames !=
|
|
||||||
settings.cookieBannerHandlingGlobalRulesSubFrames) {
|
settings.cookieBannerHandlingGlobalRulesSubFrames) {
|
||||||
await _service.cookieBannerHandlingGlobalRulesSubFrames(
|
await _service.cookieBannerHandlingGlobalRulesSubFrames(
|
||||||
settings.cookieBannerHandlingGlobalRulesSubFrames,
|
settings.cookieBannerHandlingGlobalRulesSubFrames,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (previous.valueOrNull?.webContentIsolationStrategy !=
|
if (previous.value?.webContentIsolationStrategy !=
|
||||||
settings.webContentIsolationStrategy) {
|
settings.webContentIsolationStrategy) {
|
||||||
await _service.webContentIsolationStrategy(
|
await _service.webContentIsolationStrategy(
|
||||||
settings.webContentIsolationStrategy,
|
settings.webContentIsolationStrategy,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (previous.valueOrNull?.contentBlocking !=
|
if (previous.value?.contentBlocking != settings.contentBlocking) {
|
||||||
settings.contentBlocking) {
|
|
||||||
await _service.contentBlocking(settings.contentBlocking);
|
await _service.contentBlocking(settings.contentBlocking);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+55
-16
@@ -6,22 +6,61 @@ part of 'engine_settings_replication.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$engineSettingsReplicationServiceHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'be3001c952dac6c7c6be3927f6834dae57280601';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// See also [EngineSettingsReplicationService].
|
|
||||||
@ProviderFor(EngineSettingsReplicationService)
|
@ProviderFor(EngineSettingsReplicationService)
|
||||||
final engineSettingsReplicationServiceProvider =
|
const engineSettingsReplicationServiceProvider =
|
||||||
NotifierProvider<EngineSettingsReplicationService, void>.internal(
|
EngineSettingsReplicationServiceProvider._();
|
||||||
EngineSettingsReplicationService.new,
|
|
||||||
name: r'engineSettingsReplicationServiceProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$engineSettingsReplicationServiceHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef _$EngineSettingsReplicationService = Notifier<void>;
|
final class EngineSettingsReplicationServiceProvider
|
||||||
// ignore_for_file: type=lint
|
extends $NotifierProvider<EngineSettingsReplicationService, void> {
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
const EngineSettingsReplicationServiceProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'engineSettingsReplicationServiceProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$engineSettingsReplicationServiceHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
EngineSettingsReplicationService create() =>
|
||||||
|
EngineSettingsReplicationService();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(void value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<void>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$engineSettingsReplicationServiceHash() =>
|
||||||
|
r'015bd9c923de0c09109d0fd489967f52a35ee944';
|
||||||
|
|
||||||
|
abstract class _$EngineSettingsReplicationService extends $Notifier<void> {
|
||||||
|
void build();
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
build();
|
||||||
|
final ref = this.ref as $Ref<void, void>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<void, void>,
|
||||||
|
void,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+3
-2
@@ -20,6 +20,7 @@
|
|||||||
import 'package:fast_equatable/fast_equatable.dart';
|
import 'package:fast_equatable/fast_equatable.dart';
|
||||||
import 'package:flutter_mozilla_components/flutter_mozilla_components.dart';
|
import 'package:flutter_mozilla_components/flutter_mozilla_components.dart';
|
||||||
import 'package:nullability/nullability.dart';
|
import 'package:nullability/nullability.dart';
|
||||||
|
import 'package:riverpod/riverpod.dart';
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
import 'package:weblibre/core/logger.dart';
|
import 'package:weblibre/core/logger.dart';
|
||||||
import 'package:weblibre/features/geckoview/features/tabs/domain/providers.dart';
|
import 'package:weblibre/features/geckoview/features/tabs/domain/providers.dart';
|
||||||
@@ -36,7 +37,7 @@ class ProxySettingsReplication extends _$ProxySettingsReplication {
|
|||||||
void build() {
|
void build() {
|
||||||
ref.listen(
|
ref.listen(
|
||||||
fireImmediately: true,
|
fireImmediately: true,
|
||||||
torProxyServiceProvider.select((data) => data.valueOrNull),
|
torProxyServiceProvider.select((data) => data.value),
|
||||||
(previous, next) async {
|
(previous, next) async {
|
||||||
if (next != null) {
|
if (next != null) {
|
||||||
await _service.setProxyPort(next);
|
await _service.setProxyPort(next);
|
||||||
@@ -54,7 +55,7 @@ class ProxySettingsReplication extends _$ProxySettingsReplication {
|
|||||||
ref.listen(
|
ref.listen(
|
||||||
fireImmediately: true,
|
fireImmediately: true,
|
||||||
containersWithCountProvider.select(
|
containersWithCountProvider.select(
|
||||||
(value) => EquatableValue(value.valueOrNull),
|
(value) => EquatableValue(value.value),
|
||||||
),
|
),
|
||||||
(previous, next) async {
|
(previous, next) async {
|
||||||
if (next.value != null) {
|
if (next.value != null) {
|
||||||
|
|||||||
+53
-16
@@ -6,22 +6,59 @@ part of 'proxy_settings_replication.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$proxySettingsReplicationHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'95e68c06df280d11730ec35f0cd93cf2b1e3c02d';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// See also [ProxySettingsReplication].
|
|
||||||
@ProviderFor(ProxySettingsReplication)
|
@ProviderFor(ProxySettingsReplication)
|
||||||
final proxySettingsReplicationProvider =
|
const proxySettingsReplicationProvider = ProxySettingsReplicationProvider._();
|
||||||
NotifierProvider<ProxySettingsReplication, void>.internal(
|
|
||||||
ProxySettingsReplication.new,
|
|
||||||
name: r'proxySettingsReplicationProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$proxySettingsReplicationHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef _$ProxySettingsReplication = Notifier<void>;
|
final class ProxySettingsReplicationProvider
|
||||||
// ignore_for_file: type=lint
|
extends $NotifierProvider<ProxySettingsReplication, void> {
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
const ProxySettingsReplicationProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'proxySettingsReplicationProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$proxySettingsReplicationHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
ProxySettingsReplication create() => ProxySettingsReplication();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(void value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<void>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$proxySettingsReplicationHash() =>
|
||||||
|
r'787545f882b97274dc67007a6404f170d40bdb64';
|
||||||
|
|
||||||
|
abstract class _$ProxySettingsReplication extends $Notifier<void> {
|
||||||
|
void build();
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
build();
|
||||||
|
final ref = this.ref as $Ref<void, void>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<void, void>,
|
||||||
|
void,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+53
-16
@@ -6,22 +6,59 @@ part of 'tab_suggestions.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(TabSuggestionsController)
|
||||||
|
const tabSuggestionsControllerProvider = TabSuggestionsControllerProvider._();
|
||||||
|
|
||||||
|
final class TabSuggestionsControllerProvider
|
||||||
|
extends $NotifierProvider<TabSuggestionsController, bool> {
|
||||||
|
const TabSuggestionsControllerProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'tabSuggestionsControllerProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$tabSuggestionsControllerHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
TabSuggestionsController create() => TabSuggestionsController();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(bool value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<bool>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$tabSuggestionsControllerHash() =>
|
String _$tabSuggestionsControllerHash() =>
|
||||||
r'5ce7f385b8aba14d432912cf0acb06aad04433fc';
|
r'5ce7f385b8aba14d432912cf0acb06aad04433fc';
|
||||||
|
|
||||||
/// See also [TabSuggestionsController].
|
abstract class _$TabSuggestionsController extends $Notifier<bool> {
|
||||||
@ProviderFor(TabSuggestionsController)
|
bool build();
|
||||||
final tabSuggestionsControllerProvider =
|
@$mustCallSuper
|
||||||
NotifierProvider<TabSuggestionsController, bool>.internal(
|
@override
|
||||||
TabSuggestionsController.new,
|
void runBuild() {
|
||||||
name: r'tabSuggestionsControllerProvider',
|
final created = build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref = this.ref as $Ref<bool, bool>;
|
||||||
? null
|
final element =
|
||||||
: _$tabSuggestionsControllerHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<bool, bool>,
|
||||||
);
|
bool,
|
||||||
|
Object?,
|
||||||
typedef _$TabSuggestionsController = Notifier<bool>;
|
Object?
|
||||||
// ignore_for_file: type=lint
|
>;
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+53
-16
@@ -6,22 +6,59 @@ part of 'tree_view.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(TreeViewController)
|
||||||
|
const treeViewControllerProvider = TreeViewControllerProvider._();
|
||||||
|
|
||||||
|
final class TreeViewControllerProvider
|
||||||
|
extends $NotifierProvider<TreeViewController, bool> {
|
||||||
|
const TreeViewControllerProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'treeViewControllerProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$treeViewControllerHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
TreeViewController create() => TreeViewController();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(bool value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<bool>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$treeViewControllerHash() =>
|
String _$treeViewControllerHash() =>
|
||||||
r'1fac2a133d369e3bd3f8f75cdd2d0c862a6ab942';
|
r'1fac2a133d369e3bd3f8f75cdd2d0c862a6ab942';
|
||||||
|
|
||||||
/// See also [TreeViewController].
|
abstract class _$TreeViewController extends $Notifier<bool> {
|
||||||
@ProviderFor(TreeViewController)
|
bool build();
|
||||||
final treeViewControllerProvider =
|
@$mustCallSuper
|
||||||
NotifierProvider<TreeViewController, bool>.internal(
|
@override
|
||||||
TreeViewController.new,
|
void runBuild() {
|
||||||
name: r'treeViewControllerProvider',
|
final created = build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref = this.ref as $Ref<bool, bool>;
|
||||||
? null
|
final element =
|
||||||
: _$treeViewControllerHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<bool, bool>,
|
||||||
);
|
bool,
|
||||||
|
Object?,
|
||||||
typedef _$TreeViewController = Notifier<bool>;
|
Object?
|
||||||
// ignore_for_file: type=lint
|
>;
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ class TabTreeDialog extends HookConsumerWidget {
|
|||||||
final graph = Graph()..isTree = true;
|
final graph = Graph()..isTree = true;
|
||||||
|
|
||||||
if (tabs.hasValue) {
|
if (tabs.hasValue) {
|
||||||
for (final MapEntry(:key, :value) in tabs.valueOrNull!.entries) {
|
for (final MapEntry(:key, :value) in tabs.value!.entries) {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
final current = Node.Id(key);
|
final current = Node.Id(key);
|
||||||
final parent = Node.Id(value);
|
final parent = Node.Id(value);
|
||||||
@@ -113,7 +113,7 @@ class TabTreeDialog extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return graph;
|
return graph;
|
||||||
}, [EquatableValue(tabs.valueOrNull), selectedTabId]);
|
}, [EquatableValue(tabs.value), selectedTabId]);
|
||||||
|
|
||||||
final graphAlgo = useMemoized(() {
|
final graphAlgo = useMemoized(() {
|
||||||
final config = BuchheimWalkerConfiguration()
|
final config = BuchheimWalkerConfiguration()
|
||||||
@@ -168,7 +168,7 @@ class TabTreeDialog extends HookConsumerWidget {
|
|||||||
minScale: 0.1,
|
minScale: 0.1,
|
||||||
maxScale: 5.0,
|
maxScale: 5.0,
|
||||||
child: Skeletonizer(
|
child: Skeletonizer(
|
||||||
enabled: !tabs.hasValue || tabs.valueOrNull?.isEmpty == true,
|
enabled: !tabs.hasValue || tabs.value?.isEmpty == true,
|
||||||
child: Skeleton.replace(
|
child: Skeleton.replace(
|
||||||
replacement: const Bone.square(),
|
replacement: const Bone.square(),
|
||||||
child: GraphView(
|
child: GraphView(
|
||||||
|
|||||||
@@ -180,8 +180,7 @@ class BrowserScreen extends HookConsumerWidget {
|
|||||||
ref.listen(
|
ref.listen(
|
||||||
tabScrollYProvider(tabId, const Duration(milliseconds: 50)),
|
tabScrollYProvider(tabId, const Duration(milliseconds: 50)),
|
||||||
(previous, next) {
|
(previous, next) {
|
||||||
if (previous?.valueOrNull != null &&
|
if (previous?.value != null && next.value != null) {
|
||||||
next.valueOrNull != null) {
|
|
||||||
final diff = previous!.value! - next.value!;
|
final diff = previous!.value! - next.value!;
|
||||||
if (diff < 0) {
|
if (diff < 0) {
|
||||||
if (diffAcc.value > 0) {
|
if (diffAcc.value > 0) {
|
||||||
@@ -279,7 +278,7 @@ class BrowserScreen extends HookConsumerWidget {
|
|||||||
|
|
||||||
if (tabState?.isFullScreen == true) {
|
if (tabState?.isFullScreen == true) {
|
||||||
await ref
|
await ref
|
||||||
.read(selectedTabSessionNotifierProvider)
|
.read(selectedTabSessionProvider)
|
||||||
.exitFullscreen();
|
.exitFullscreen();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -288,7 +287,7 @@ class BrowserScreen extends HookConsumerWidget {
|
|||||||
lastBackButtonPress.value = null;
|
lastBackButtonPress.value = null;
|
||||||
|
|
||||||
final controller = ref.read(
|
final controller = ref.read(
|
||||||
selectedTabSessionNotifierProvider,
|
selectedTabSessionProvider,
|
||||||
);
|
);
|
||||||
|
|
||||||
await controller.stopLoading();
|
await controller.stopLoading();
|
||||||
@@ -305,7 +304,7 @@ class BrowserScreen extends HookConsumerWidget {
|
|||||||
lastBackButtonPress.value = null;
|
lastBackButtonPress.value = null;
|
||||||
|
|
||||||
final controller = ref.read(
|
final controller = ref.read(
|
||||||
selectedTabSessionNotifierProvider,
|
selectedTabSessionProvider,
|
||||||
);
|
);
|
||||||
|
|
||||||
await controller.goBack();
|
await controller.goBack();
|
||||||
|
|||||||
+2
-2
@@ -72,7 +72,7 @@ class _BrowserViewState extends ConsumerState<BrowserView>
|
|||||||
|
|
||||||
Future<void> _timerTick(Timer timer) async {
|
Future<void> _timerTick(Timer timer) async {
|
||||||
await ref
|
await ref
|
||||||
.read(selectedTabSessionNotifierProvider)
|
.read(selectedTabSessionProvider)
|
||||||
.requestScreenshot(requireImageResult: false)
|
.requestScreenshot(requireImageResult: false)
|
||||||
.onError((error, stackTrace) {
|
.onError((error, stackTrace) {
|
||||||
logger.e(error, stackTrace: stackTrace);
|
logger.e(error, stackTrace: stackTrace);
|
||||||
@@ -129,7 +129,7 @@ class _BrowserViewState extends ConsumerState<BrowserView>
|
|||||||
);
|
);
|
||||||
|
|
||||||
ref.listen(feedRequestedProvider, (previous, next) async {
|
ref.listen(feedRequestedProvider, (previous, next) async {
|
||||||
if (next.valueOrNull.mapNotNull(Uri.tryParse) case final Uri url) {
|
if (next.value.mapNotNull(Uri.tryParse) case final Uri url) {
|
||||||
if (GoRouterState.of(context).topRoute?.name != FeedAddRoute.name) {
|
if (GoRouterState.of(context).topRoute?.name != FeedAddRoute.name) {
|
||||||
if (ref.read(addFeedDialogBlockingProvider.notifier).canPush(url)) {
|
if (ref.read(addFeedDialogBlockingProvider.notifier).canPush(url)) {
|
||||||
await FeedAddRoute($extra: url).push(context);
|
await FeedAddRoute($extra: url).push(context);
|
||||||
|
|||||||
+3
-3
@@ -80,7 +80,7 @@ class ViewTabSheetWidget extends HookConsumerWidget {
|
|||||||
bangListProvider(
|
bangListProvider(
|
||||||
domain: initialTabState.url.host,
|
domain: initialTabState.url.host,
|
||||||
orderMostFrequentFirst: true,
|
orderMostFrequentFirst: true,
|
||||||
).select((value) => value.valueOrNull ?? const []),
|
).select((value) => value.value ?? const []),
|
||||||
);
|
);
|
||||||
|
|
||||||
final scrolledTo = useRef(0.0);
|
final scrolledTo = useRef(0.0);
|
||||||
@@ -306,7 +306,7 @@ class ViewTabSheetWidget extends HookConsumerWidget {
|
|||||||
final containerId = ref.watch(
|
final containerId = ref.watch(
|
||||||
watchContainerTabIdProvider(
|
watchContainerTabIdProvider(
|
||||||
initialTabState.id,
|
initialTabState.id,
|
||||||
).select((value) => value.valueOrNull),
|
).select((value) => value.value),
|
||||||
);
|
);
|
||||||
|
|
||||||
return Visibility(
|
return Visibility(
|
||||||
@@ -332,7 +332,7 @@ class ViewTabSheetWidget extends HookConsumerWidget {
|
|||||||
title: const Text('Share screenshot'),
|
title: const Text('Share screenshot'),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final screenshot = await ref
|
final screenshot = await ref
|
||||||
.read(selectedTabSessionNotifierProvider)
|
.read(selectedTabSessionProvider)
|
||||||
.requestScreenshot();
|
.requestScreenshot();
|
||||||
|
|
||||||
if (screenshot != null) {
|
if (screenshot != null) {
|
||||||
|
|||||||
+1
-1
@@ -272,7 +272,7 @@ class _TabSheetHeader extends HookConsumerWidget {
|
|||||||
builder: (context, ref, child) {
|
builder: (context, ref, child) {
|
||||||
final selectedContainer = ref.watch(
|
final selectedContainer = ref.watch(
|
||||||
selectedContainerDataProvider.select(
|
selectedContainerDataProvider.select(
|
||||||
(value) => value.valueOrNull,
|
(value) => value.value,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
+15
-11
@@ -11,41 +11,44 @@ abstract class _$FindInPageStateCWProxy {
|
|||||||
|
|
||||||
FindInPageState lastSearchText(String? lastSearchText);
|
FindInPageState lastSearchText(String? lastSearchText);
|
||||||
|
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `FindInPageState(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `FindInPageState(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// FindInPageState(...).copyWith(id: 12, name: "My name")
|
/// FindInPageState(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
FindInPageState call({bool visible, String? lastSearchText});
|
FindInPageState call({bool visible, String? lastSearchText});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfFindInPageState.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfFindInPageState.copyWith.fieldName(...)`
|
/// Callable proxy for `copyWith` functionality.
|
||||||
|
/// Use as `instanceOfFindInPageState.copyWith(...)` or call `instanceOfFindInPageState.copyWith.fieldName(value)` for a single field.
|
||||||
class _$FindInPageStateCWProxyImpl implements _$FindInPageStateCWProxy {
|
class _$FindInPageStateCWProxyImpl implements _$FindInPageStateCWProxy {
|
||||||
const _$FindInPageStateCWProxyImpl(this._value);
|
const _$FindInPageStateCWProxyImpl(this._value);
|
||||||
|
|
||||||
final FindInPageState _value;
|
final FindInPageState _value;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
FindInPageState visible(bool visible) => this(visible: visible);
|
FindInPageState visible(bool visible) => call(visible: visible);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
FindInPageState lastSearchText(String? lastSearchText) =>
|
FindInPageState lastSearchText(String? lastSearchText) =>
|
||||||
this(lastSearchText: lastSearchText);
|
call(lastSearchText: lastSearchText);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `FindInPageState(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `FindInPageState(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// FindInPageState(...).copyWith(id: 12, name: "My name")
|
/// FindInPageState(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
FindInPageState call({
|
FindInPageState call({
|
||||||
Object? visible = const $CopyWithPlaceholder(),
|
Object? visible = const $CopyWithPlaceholder(),
|
||||||
Object? lastSearchText = const $CopyWithPlaceholder(),
|
Object? lastSearchText = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return FindInPageState(
|
return FindInPageState(
|
||||||
visible: visible == const $CopyWithPlaceholder()
|
visible: visible == const $CopyWithPlaceholder() || visible == null
|
||||||
? _value.visible
|
? _value.visible
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: visible as bool,
|
: visible as bool,
|
||||||
@@ -58,7 +61,8 @@ class _$FindInPageStateCWProxyImpl implements _$FindInPageStateCWProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension $FindInPageStateCopyWith on FindInPageState {
|
extension $FindInPageStateCopyWith on FindInPageState {
|
||||||
/// Returns a callable class that can be used as follows: `instanceOfFindInPageState.copyWith(...)` or like so:`instanceOfFindInPageState.copyWith.fieldName(...)`.
|
/// Returns a callable class used to build a new instance with modified fields.
|
||||||
|
/// Example: `instanceOfFindInPageState.copyWith(...)` or `instanceOfFindInPageState.copyWith.fieldName(...)`.
|
||||||
// ignore: library_private_types_in_public_api
|
// ignore: library_private_types_in_public_api
|
||||||
_$FindInPageStateCWProxy get copyWith => _$FindInPageStateCWProxyImpl(this);
|
_$FindInPageStateCWProxy get copyWith => _$FindInPageStateCWProxyImpl(this);
|
||||||
}
|
}
|
||||||
|
|||||||
+75
-128
@@ -6,157 +6,104 @@ part of 'find_in_page.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$findInPageRepositoryHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'c289f136c27a22978f15668a13d7044eb39c3355';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
|
||||||
class _SystemHash {
|
|
||||||
_SystemHash._();
|
|
||||||
|
|
||||||
static int combine(int hash, int value) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + value);
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
|
||||||
return hash ^ (hash >> 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int finish(int hash) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = hash ^ (hash >> 11);
|
|
||||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class _$FindInPageRepository extends BuildlessNotifier<String?> {
|
|
||||||
late final String? tabId;
|
|
||||||
|
|
||||||
String? build(String? tabId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [FindInPageRepository].
|
|
||||||
@ProviderFor(FindInPageRepository)
|
@ProviderFor(FindInPageRepository)
|
||||||
const findInPageRepositoryProvider = FindInPageRepositoryFamily();
|
const findInPageRepositoryProvider = FindInPageRepositoryFamily._();
|
||||||
|
|
||||||
/// See also [FindInPageRepository].
|
final class FindInPageRepositoryProvider
|
||||||
class FindInPageRepositoryFamily extends Family<String?> {
|
extends $NotifierProvider<FindInPageRepository, String?> {
|
||||||
/// See also [FindInPageRepository].
|
const FindInPageRepositoryProvider._({
|
||||||
const FindInPageRepositoryFamily();
|
required FindInPageRepositoryFamily super.from,
|
||||||
|
required String? super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'findInPageRepositoryProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
/// See also [FindInPageRepository].
|
@override
|
||||||
FindInPageRepositoryProvider call(String? tabId) {
|
String debugGetCreateSourceHash() => _$findInPageRepositoryHash();
|
||||||
return FindInPageRepositoryProvider(tabId);
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'findInPageRepositoryProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
FindInPageRepositoryProvider getProviderOverride(
|
FindInPageRepository create() => FindInPageRepository();
|
||||||
covariant FindInPageRepositoryProvider provider,
|
|
||||||
) {
|
|
||||||
return call(provider.tabId);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(String? value) {
|
||||||
@override
|
return $ProviderOverride(
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'findInPageRepositoryProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [FindInPageRepository].
|
|
||||||
class FindInPageRepositoryProvider
|
|
||||||
extends NotifierProviderImpl<FindInPageRepository, String?> {
|
|
||||||
/// See also [FindInPageRepository].
|
|
||||||
FindInPageRepositoryProvider(String? tabId)
|
|
||||||
: this._internal(
|
|
||||||
() => FindInPageRepository()..tabId = tabId,
|
|
||||||
from: findInPageRepositoryProvider,
|
|
||||||
name: r'findInPageRepositoryProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$findInPageRepositoryHash,
|
|
||||||
dependencies: FindInPageRepositoryFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
FindInPageRepositoryFamily._allTransitiveDependencies,
|
|
||||||
tabId: tabId,
|
|
||||||
);
|
|
||||||
|
|
||||||
FindInPageRepositoryProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.tabId,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final String? tabId;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? runNotifierBuild(covariant FindInPageRepository notifier) {
|
|
||||||
return notifier.build(tabId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(FindInPageRepository Function() create) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
origin: this,
|
||||||
override: FindInPageRepositoryProvider._internal(
|
providerOverride: $SyncValueProvider<String?>(value),
|
||||||
() => create()..tabId = tabId,
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
tabId: tabId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
NotifierProviderElement<FindInPageRepository, String?> createElement() {
|
|
||||||
return _FindInPageRepositoryProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is FindInPageRepositoryProvider && other.tabId == tabId;
|
return other is FindInPageRepositoryProvider && other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, tabId.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$findInPageRepositoryHash() =>
|
||||||
// ignore: unused_element
|
r'c289f136c27a22978f15668a13d7044eb39c3355';
|
||||||
mixin FindInPageRepositoryRef on NotifierProviderRef<String?> {
|
|
||||||
/// The parameter `tabId` of this provider.
|
|
||||||
String? get tabId;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _FindInPageRepositoryProviderElement
|
final class FindInPageRepositoryFamily extends $Family
|
||||||
extends NotifierProviderElement<FindInPageRepository, String?>
|
with
|
||||||
with FindInPageRepositoryRef {
|
$ClassFamilyOverride<
|
||||||
_FindInPageRepositoryProviderElement(super.provider);
|
FindInPageRepository,
|
||||||
|
String?,
|
||||||
|
String?,
|
||||||
|
String?,
|
||||||
|
String?
|
||||||
|
> {
|
||||||
|
const FindInPageRepositoryFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'findInPageRepositoryProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: false,
|
||||||
|
);
|
||||||
|
|
||||||
|
FindInPageRepositoryProvider call(String? tabId) =>
|
||||||
|
FindInPageRepositoryProvider._(argument: tabId, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String? get tabId => (origin as FindInPageRepositoryProvider).tabId;
|
String toString() => r'findInPageRepositoryProvider';
|
||||||
}
|
}
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
abstract class _$FindInPageRepository extends $Notifier<String?> {
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
late final _$args = ref.$arg as String?;
|
||||||
|
String? get tabId => _$args;
|
||||||
|
|
||||||
|
String? build(String? tabId);
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build(_$args);
|
||||||
|
final ref = this.ref as $Ref<String?, String?>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<String?, String?>,
|
||||||
|
String?,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+75
-130
@@ -6,159 +6,104 @@ part of 'find_in_page.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$findInPageControllerHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'da72e38225809af5c78a372e949a80207d7ce7c9';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
|
||||||
class _SystemHash {
|
|
||||||
_SystemHash._();
|
|
||||||
|
|
||||||
static int combine(int hash, int value) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + value);
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
|
||||||
return hash ^ (hash >> 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int finish(int hash) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = hash ^ (hash >> 11);
|
|
||||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class _$FindInPageController
|
|
||||||
extends BuildlessNotifier<FindInPageState> {
|
|
||||||
late final String tabId;
|
|
||||||
|
|
||||||
FindInPageState build(String tabId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [FindInPageController].
|
|
||||||
@ProviderFor(FindInPageController)
|
@ProviderFor(FindInPageController)
|
||||||
const findInPageControllerProvider = FindInPageControllerFamily();
|
const findInPageControllerProvider = FindInPageControllerFamily._();
|
||||||
|
|
||||||
/// See also [FindInPageController].
|
final class FindInPageControllerProvider
|
||||||
class FindInPageControllerFamily extends Family<FindInPageState> {
|
extends $NotifierProvider<FindInPageController, FindInPageState> {
|
||||||
/// See also [FindInPageController].
|
const FindInPageControllerProvider._({
|
||||||
const FindInPageControllerFamily();
|
required FindInPageControllerFamily super.from,
|
||||||
|
required String super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'findInPageControllerProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
/// See also [FindInPageController].
|
@override
|
||||||
FindInPageControllerProvider call(String tabId) {
|
String debugGetCreateSourceHash() => _$findInPageControllerHash();
|
||||||
return FindInPageControllerProvider(tabId);
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'findInPageControllerProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
FindInPageControllerProvider getProviderOverride(
|
FindInPageController create() => FindInPageController();
|
||||||
covariant FindInPageControllerProvider provider,
|
|
||||||
) {
|
|
||||||
return call(provider.tabId);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(FindInPageState value) {
|
||||||
@override
|
return $ProviderOverride(
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'findInPageControllerProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [FindInPageController].
|
|
||||||
class FindInPageControllerProvider
|
|
||||||
extends NotifierProviderImpl<FindInPageController, FindInPageState> {
|
|
||||||
/// See also [FindInPageController].
|
|
||||||
FindInPageControllerProvider(String tabId)
|
|
||||||
: this._internal(
|
|
||||||
() => FindInPageController()..tabId = tabId,
|
|
||||||
from: findInPageControllerProvider,
|
|
||||||
name: r'findInPageControllerProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$findInPageControllerHash,
|
|
||||||
dependencies: FindInPageControllerFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
FindInPageControllerFamily._allTransitiveDependencies,
|
|
||||||
tabId: tabId,
|
|
||||||
);
|
|
||||||
|
|
||||||
FindInPageControllerProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.tabId,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final String tabId;
|
|
||||||
|
|
||||||
@override
|
|
||||||
FindInPageState runNotifierBuild(covariant FindInPageController notifier) {
|
|
||||||
return notifier.build(tabId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(FindInPageController Function() create) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
origin: this,
|
||||||
override: FindInPageControllerProvider._internal(
|
providerOverride: $SyncValueProvider<FindInPageState>(value),
|
||||||
() => create()..tabId = tabId,
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
tabId: tabId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
NotifierProviderElement<FindInPageController, FindInPageState>
|
|
||||||
createElement() {
|
|
||||||
return _FindInPageControllerProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is FindInPageControllerProvider && other.tabId == tabId;
|
return other is FindInPageControllerProvider && other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, tabId.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$findInPageControllerHash() =>
|
||||||
// ignore: unused_element
|
r'da72e38225809af5c78a372e949a80207d7ce7c9';
|
||||||
mixin FindInPageControllerRef on NotifierProviderRef<FindInPageState> {
|
|
||||||
/// The parameter `tabId` of this provider.
|
|
||||||
String get tabId;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _FindInPageControllerProviderElement
|
final class FindInPageControllerFamily extends $Family
|
||||||
extends NotifierProviderElement<FindInPageController, FindInPageState>
|
with
|
||||||
with FindInPageControllerRef {
|
$ClassFamilyOverride<
|
||||||
_FindInPageControllerProviderElement(super.provider);
|
FindInPageController,
|
||||||
|
FindInPageState,
|
||||||
|
FindInPageState,
|
||||||
|
FindInPageState,
|
||||||
|
String
|
||||||
|
> {
|
||||||
|
const FindInPageControllerFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'findInPageControllerProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: false,
|
||||||
|
);
|
||||||
|
|
||||||
|
FindInPageControllerProvider call(String tabId) =>
|
||||||
|
FindInPageControllerProvider._(argument: tabId, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get tabId => (origin as FindInPageControllerProvider).tabId;
|
String toString() => r'findInPageControllerProvider';
|
||||||
}
|
}
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
abstract class _$FindInPageController extends $Notifier<FindInPageState> {
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
late final _$args = ref.$arg as String;
|
||||||
|
String get tabId => _$args;
|
||||||
|
|
||||||
|
FindInPageState build(String tabId);
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build(_$args);
|
||||||
|
final ref = this.ref as $Ref<FindInPageState, FindInPageState>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<FindInPageState, FindInPageState>,
|
||||||
|
FindInPageState,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+16
-11
@@ -11,19 +11,21 @@ abstract class _$HistoryFilterOptionsCWProxy {
|
|||||||
|
|
||||||
HistoryFilterOptions visitTypes(Set<VisitType> visitTypes);
|
HistoryFilterOptions visitTypes(Set<VisitType> visitTypes);
|
||||||
|
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `HistoryFilterOptions(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `HistoryFilterOptions(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// HistoryFilterOptions(...).copyWith(id: 12, name: "My name")
|
/// HistoryFilterOptions(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
HistoryFilterOptions call({
|
HistoryFilterOptions call({
|
||||||
DateTimeRange<DateTime>? dateRange,
|
DateTimeRange<DateTime>? dateRange,
|
||||||
Set<VisitType> visitTypes,
|
Set<VisitType> visitTypes,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfHistoryFilterOptions.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfHistoryFilterOptions.copyWith.fieldName(...)`
|
/// Callable proxy for `copyWith` functionality.
|
||||||
|
/// Use as `instanceOfHistoryFilterOptions.copyWith(...)` or call `instanceOfHistoryFilterOptions.copyWith.fieldName(value)` for a single field.
|
||||||
class _$HistoryFilterOptionsCWProxyImpl
|
class _$HistoryFilterOptionsCWProxyImpl
|
||||||
implements _$HistoryFilterOptionsCWProxy {
|
implements _$HistoryFilterOptionsCWProxy {
|
||||||
const _$HistoryFilterOptionsCWProxyImpl(this._value);
|
const _$HistoryFilterOptionsCWProxyImpl(this._value);
|
||||||
@@ -32,19 +34,20 @@ class _$HistoryFilterOptionsCWProxyImpl
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
HistoryFilterOptions dateRange(DateTimeRange<DateTime>? dateRange) =>
|
HistoryFilterOptions dateRange(DateTimeRange<DateTime>? dateRange) =>
|
||||||
this(dateRange: dateRange);
|
call(dateRange: dateRange);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
HistoryFilterOptions visitTypes(Set<VisitType> visitTypes) =>
|
HistoryFilterOptions visitTypes(Set<VisitType> visitTypes) =>
|
||||||
this(visitTypes: visitTypes);
|
call(visitTypes: visitTypes);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `HistoryFilterOptions(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `HistoryFilterOptions(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// HistoryFilterOptions(...).copyWith(id: 12, name: "My name")
|
/// HistoryFilterOptions(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
HistoryFilterOptions call({
|
HistoryFilterOptions call({
|
||||||
Object? dateRange = const $CopyWithPlaceholder(),
|
Object? dateRange = const $CopyWithPlaceholder(),
|
||||||
Object? visitTypes = const $CopyWithPlaceholder(),
|
Object? visitTypes = const $CopyWithPlaceholder(),
|
||||||
@@ -54,7 +57,8 @@ class _$HistoryFilterOptionsCWProxyImpl
|
|||||||
? _value.dateRange
|
? _value.dateRange
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: dateRange as DateTimeRange<DateTime>?,
|
: dateRange as DateTimeRange<DateTime>?,
|
||||||
visitTypes: visitTypes == const $CopyWithPlaceholder()
|
visitTypes:
|
||||||
|
visitTypes == const $CopyWithPlaceholder() || visitTypes == null
|
||||||
? _value.visitTypes
|
? _value.visitTypes
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: visitTypes as Set<VisitType>,
|
: visitTypes as Set<VisitType>,
|
||||||
@@ -63,7 +67,8 @@ class _$HistoryFilterOptionsCWProxyImpl
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension $HistoryFilterOptionsCopyWith on HistoryFilterOptions {
|
extension $HistoryFilterOptionsCopyWith on HistoryFilterOptions {
|
||||||
/// Returns a callable class that can be used as follows: `instanceOfHistoryFilterOptions.copyWith(...)` or like so:`instanceOfHistoryFilterOptions.copyWith.fieldName(...)`.
|
/// Returns a callable class used to build a new instance with modified fields.
|
||||||
|
/// Example: `instanceOfHistoryFilterOptions.copyWith(...)` or `instanceOfHistoryFilterOptions.copyWith.fieldName(...)`.
|
||||||
// ignore: library_private_types_in_public_api
|
// ignore: library_private_types_in_public_api
|
||||||
_$HistoryFilterOptionsCWProxy get copyWith =>
|
_$HistoryFilterOptionsCWProxy get copyWith =>
|
||||||
_$HistoryFilterOptionsCWProxyImpl(this);
|
_$HistoryFilterOptionsCWProxyImpl(this);
|
||||||
|
|||||||
@@ -6,39 +6,97 @@ part of 'providers.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$browsingHistoryHash() => r'6447fd4d8209c3befb07f2d82fa41a24bd3accb1';
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// See also [browsingHistory].
|
@ProviderFor(HistoryFilter)
|
||||||
@ProviderFor(browsingHistory)
|
const historyFilterProvider = HistoryFilterProvider._();
|
||||||
final browsingHistoryProvider =
|
|
||||||
AutoDisposeFutureProvider<List<VisitInfo>>.internal(
|
final class HistoryFilterProvider
|
||||||
browsingHistory,
|
extends $NotifierProvider<HistoryFilter, HistoryFilterOptions> {
|
||||||
name: r'browsingHistoryProvider',
|
const HistoryFilterProvider._()
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
: super(
|
||||||
? null
|
from: null,
|
||||||
: _$browsingHistoryHash,
|
argument: null,
|
||||||
dependencies: null,
|
retry: null,
|
||||||
allTransitiveDependencies: null,
|
name: r'historyFilterProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$historyFilterHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
HistoryFilter create() => HistoryFilter();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(HistoryFilterOptions value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<HistoryFilterOptions>(value),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef BrowsingHistoryRef = AutoDisposeFutureProviderRef<List<VisitInfo>>;
|
|
||||||
String _$historyFilterHash() => r'68a604fe857476f7c15be89352a7b10bc456c3d6';
|
String _$historyFilterHash() => r'68a604fe857476f7c15be89352a7b10bc456c3d6';
|
||||||
|
|
||||||
/// See also [HistoryFilter].
|
abstract class _$HistoryFilter extends $Notifier<HistoryFilterOptions> {
|
||||||
@ProviderFor(HistoryFilter)
|
HistoryFilterOptions build();
|
||||||
final historyFilterProvider =
|
@$mustCallSuper
|
||||||
NotifierProvider<HistoryFilter, HistoryFilterOptions>.internal(
|
@override
|
||||||
HistoryFilter.new,
|
void runBuild() {
|
||||||
name: r'historyFilterProvider',
|
final created = build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref = this.ref as $Ref<HistoryFilterOptions, HistoryFilterOptions>;
|
||||||
? null
|
final element =
|
||||||
: _$historyFilterHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<HistoryFilterOptions, HistoryFilterOptions>,
|
||||||
);
|
HistoryFilterOptions,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
typedef _$HistoryFilter = Notifier<HistoryFilterOptions>;
|
@ProviderFor(browsingHistory)
|
||||||
// ignore_for_file: type=lint
|
const browsingHistoryProvider = BrowsingHistoryProvider._();
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
|
||||||
|
final class BrowsingHistoryProvider
|
||||||
|
extends
|
||||||
|
$FunctionalProvider<
|
||||||
|
AsyncValue<List<VisitInfo>>,
|
||||||
|
List<VisitInfo>,
|
||||||
|
FutureOr<List<VisitInfo>>
|
||||||
|
>
|
||||||
|
with $FutureModifier<List<VisitInfo>>, $FutureProvider<List<VisitInfo>> {
|
||||||
|
const BrowsingHistoryProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'browsingHistoryProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$browsingHistoryHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$FutureProviderElement<List<VisitInfo>> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $FutureProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<List<VisitInfo>> create(Ref ref) {
|
||||||
|
return browsingHistory(ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$browsingHistoryHash() => r'6447fd4d8209c3befb07f2d82fa41a24bd3accb1';
|
||||||
|
|||||||
+40
-28
@@ -11,19 +11,21 @@ abstract class _$PreferenceSettingGroupCWProxy {
|
|||||||
|
|
||||||
PreferenceSettingGroup settings(Map<String, PreferenceSetting> settings);
|
PreferenceSettingGroup settings(Map<String, PreferenceSetting> settings);
|
||||||
|
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `PreferenceSettingGroup(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `PreferenceSettingGroup(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// PreferenceSettingGroup(...).copyWith(id: 12, name: "My name")
|
/// PreferenceSettingGroup(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
PreferenceSettingGroup call({
|
PreferenceSettingGroup call({
|
||||||
String? description,
|
String? description,
|
||||||
Map<String, PreferenceSetting> settings,
|
Map<String, PreferenceSetting> settings,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfPreferenceSettingGroup.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfPreferenceSettingGroup.copyWith.fieldName(...)`
|
/// Callable proxy for `copyWith` functionality.
|
||||||
|
/// Use as `instanceOfPreferenceSettingGroup.copyWith(...)` or call `instanceOfPreferenceSettingGroup.copyWith.fieldName(value)` for a single field.
|
||||||
class _$PreferenceSettingGroupCWProxyImpl
|
class _$PreferenceSettingGroupCWProxyImpl
|
||||||
implements _$PreferenceSettingGroupCWProxy {
|
implements _$PreferenceSettingGroupCWProxy {
|
||||||
const _$PreferenceSettingGroupCWProxyImpl(this._value);
|
const _$PreferenceSettingGroupCWProxyImpl(this._value);
|
||||||
@@ -32,19 +34,20 @@ class _$PreferenceSettingGroupCWProxyImpl
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
PreferenceSettingGroup description(String? description) =>
|
PreferenceSettingGroup description(String? description) =>
|
||||||
this(description: description);
|
call(description: description);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
PreferenceSettingGroup settings(Map<String, PreferenceSetting> settings) =>
|
PreferenceSettingGroup settings(Map<String, PreferenceSetting> settings) =>
|
||||||
this(settings: settings);
|
call(settings: settings);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `PreferenceSettingGroup(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `PreferenceSettingGroup(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// PreferenceSettingGroup(...).copyWith(id: 12, name: "My name")
|
/// PreferenceSettingGroup(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
PreferenceSettingGroup call({
|
PreferenceSettingGroup call({
|
||||||
Object? description = const $CopyWithPlaceholder(),
|
Object? description = const $CopyWithPlaceholder(),
|
||||||
Object? settings = const $CopyWithPlaceholder(),
|
Object? settings = const $CopyWithPlaceholder(),
|
||||||
@@ -54,7 +57,7 @@ class _$PreferenceSettingGroupCWProxyImpl
|
|||||||
? _value.description
|
? _value.description
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: description as String?,
|
: description as String?,
|
||||||
settings: settings == const $CopyWithPlaceholder()
|
settings: settings == const $CopyWithPlaceholder() || settings == null
|
||||||
? _value.settings
|
? _value.settings
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: settings as Map<String, PreferenceSetting>,
|
: settings as Map<String, PreferenceSetting>,
|
||||||
@@ -63,7 +66,8 @@ class _$PreferenceSettingGroupCWProxyImpl
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension $PreferenceSettingGroupCopyWith on PreferenceSettingGroup {
|
extension $PreferenceSettingGroupCopyWith on PreferenceSettingGroup {
|
||||||
/// Returns a callable class that can be used as follows: `instanceOfPreferenceSettingGroup.copyWith(...)` or like so:`instanceOfPreferenceSettingGroup.copyWith.fieldName(...)`.
|
/// Returns a callable class used to build a new instance with modified fields.
|
||||||
|
/// Example: `instanceOfPreferenceSettingGroup.copyWith(...)` or `instanceOfPreferenceSettingGroup.copyWith.fieldName(...)`.
|
||||||
// ignore: library_private_types_in_public_api
|
// ignore: library_private_types_in_public_api
|
||||||
_$PreferenceSettingGroupCWProxy get copyWith =>
|
_$PreferenceSettingGroupCWProxy get copyWith =>
|
||||||
_$PreferenceSettingGroupCWProxyImpl(this);
|
_$PreferenceSettingGroupCWProxyImpl(this);
|
||||||
@@ -82,12 +86,13 @@ abstract class _$PreferenceSettingCWProxy {
|
|||||||
|
|
||||||
PreferenceSetting shouldBeDefault(bool shouldBeDefault);
|
PreferenceSetting shouldBeDefault(bool shouldBeDefault);
|
||||||
|
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `PreferenceSetting(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `PreferenceSetting(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// PreferenceSetting(...).copyWith(id: 12, name: "My name")
|
/// PreferenceSetting(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
PreferenceSetting call({
|
PreferenceSetting call({
|
||||||
Object value,
|
Object value,
|
||||||
String? title,
|
String? title,
|
||||||
@@ -98,41 +103,43 @@ abstract class _$PreferenceSettingCWProxy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfPreferenceSetting.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfPreferenceSetting.copyWith.fieldName(...)`
|
/// Callable proxy for `copyWith` functionality.
|
||||||
|
/// Use as `instanceOfPreferenceSetting.copyWith(...)` or call `instanceOfPreferenceSetting.copyWith.fieldName(value)` for a single field.
|
||||||
class _$PreferenceSettingCWProxyImpl implements _$PreferenceSettingCWProxy {
|
class _$PreferenceSettingCWProxyImpl implements _$PreferenceSettingCWProxy {
|
||||||
const _$PreferenceSettingCWProxyImpl(this._value);
|
const _$PreferenceSettingCWProxyImpl(this._value);
|
||||||
|
|
||||||
final PreferenceSetting _value;
|
final PreferenceSetting _value;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
PreferenceSetting value(Object value) => this(value: value);
|
PreferenceSetting value(Object value) => call(value: value);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
PreferenceSetting title(String? title) => this(title: title);
|
PreferenceSetting title(String? title) => call(title: title);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
PreferenceSetting description(String? description) =>
|
PreferenceSetting description(String? description) =>
|
||||||
this(description: description);
|
call(description: description);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
PreferenceSetting actualValue(Object? actualValue) =>
|
PreferenceSetting actualValue(Object? actualValue) =>
|
||||||
this(actualValue: actualValue);
|
call(actualValue: actualValue);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
PreferenceSetting requireUserOptIn(bool requireUserOptIn) =>
|
PreferenceSetting requireUserOptIn(bool requireUserOptIn) =>
|
||||||
this(requireUserOptIn: requireUserOptIn);
|
call(requireUserOptIn: requireUserOptIn);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
PreferenceSetting shouldBeDefault(bool shouldBeDefault) =>
|
PreferenceSetting shouldBeDefault(bool shouldBeDefault) =>
|
||||||
this(shouldBeDefault: shouldBeDefault);
|
call(shouldBeDefault: shouldBeDefault);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `PreferenceSetting(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
/// Creates a new instance with the provided field values.
|
||||||
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `PreferenceSetting(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
/// Usage
|
/// Example:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// PreferenceSetting(...).copyWith(id: 12, name: "My name")
|
/// PreferenceSetting(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ```
|
||||||
PreferenceSetting call({
|
PreferenceSetting call({
|
||||||
Object? value = const $CopyWithPlaceholder(),
|
Object? value = const $CopyWithPlaceholder(),
|
||||||
Object? title = const $CopyWithPlaceholder(),
|
Object? title = const $CopyWithPlaceholder(),
|
||||||
@@ -142,7 +149,7 @@ class _$PreferenceSettingCWProxyImpl implements _$PreferenceSettingCWProxy {
|
|||||||
Object? shouldBeDefault = const $CopyWithPlaceholder(),
|
Object? shouldBeDefault = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return PreferenceSetting(
|
return PreferenceSetting(
|
||||||
value: value == const $CopyWithPlaceholder()
|
value: value == const $CopyWithPlaceholder() || value == null
|
||||||
? _value.value
|
? _value.value
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: value as Object,
|
: value as Object,
|
||||||
@@ -158,11 +165,15 @@ class _$PreferenceSettingCWProxyImpl implements _$PreferenceSettingCWProxy {
|
|||||||
? _value.actualValue
|
? _value.actualValue
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: actualValue as Object?,
|
: actualValue as Object?,
|
||||||
requireUserOptIn: requireUserOptIn == const $CopyWithPlaceholder()
|
requireUserOptIn:
|
||||||
|
requireUserOptIn == const $CopyWithPlaceholder() ||
|
||||||
|
requireUserOptIn == null
|
||||||
? _value.requireUserOptIn
|
? _value.requireUserOptIn
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: requireUserOptIn as bool,
|
: requireUserOptIn as bool,
|
||||||
shouldBeDefault: shouldBeDefault == const $CopyWithPlaceholder()
|
shouldBeDefault:
|
||||||
|
shouldBeDefault == const $CopyWithPlaceholder() ||
|
||||||
|
shouldBeDefault == null
|
||||||
? _value.shouldBeDefault
|
? _value.shouldBeDefault
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: shouldBeDefault as bool,
|
: shouldBeDefault as bool,
|
||||||
@@ -171,7 +182,8 @@ class _$PreferenceSettingCWProxyImpl implements _$PreferenceSettingCWProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension $PreferenceSettingCopyWith on PreferenceSetting {
|
extension $PreferenceSettingCopyWith on PreferenceSetting {
|
||||||
/// Returns a callable class that can be used as follows: `instanceOfPreferenceSetting.copyWith(...)` or like so:`instanceOfPreferenceSetting.copyWith.fieldName(...)`.
|
/// Returns a callable class used to build a new instance with modified fields.
|
||||||
|
/// Example: `instanceOfPreferenceSetting.copyWith(...)` or `instanceOfPreferenceSetting.copyWith.fieldName(...)`.
|
||||||
// ignore: library_private_types_in_public_api
|
// ignore: library_private_types_in_public_api
|
||||||
_$PreferenceSettingCWProxy get copyWith =>
|
_$PreferenceSettingCWProxy get copyWith =>
|
||||||
_$PreferenceSettingCWProxyImpl(this);
|
_$PreferenceSettingCWProxyImpl(this);
|
||||||
|
|||||||
+426
-594
File diff suppressed because it is too large
Load Diff
@@ -6,41 +6,87 @@ part of 'readerable.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(readerableService)
|
||||||
|
const readerableServiceProvider = ReaderableServiceProvider._();
|
||||||
|
|
||||||
|
final class ReaderableServiceProvider
|
||||||
|
extends
|
||||||
|
$FunctionalProvider<
|
||||||
|
GeckoReaderableService,
|
||||||
|
GeckoReaderableService,
|
||||||
|
GeckoReaderableService
|
||||||
|
>
|
||||||
|
with $Provider<GeckoReaderableService> {
|
||||||
|
const ReaderableServiceProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'readerableServiceProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$readerableServiceHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<GeckoReaderableService> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
GeckoReaderableService create(Ref ref) {
|
||||||
|
return readerableService(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(GeckoReaderableService value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<GeckoReaderableService>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$readerableServiceHash() => r'03182c8afc41f5184322a3206473cbfa96df5819';
|
String _$readerableServiceHash() => r'03182c8afc41f5184322a3206473cbfa96df5819';
|
||||||
|
|
||||||
/// See also [readerableService].
|
@ProviderFor(appearanceButtonVisibility)
|
||||||
@ProviderFor(readerableService)
|
const appearanceButtonVisibilityProvider =
|
||||||
final readerableServiceProvider = Provider<GeckoReaderableService>.internal(
|
AppearanceButtonVisibilityProvider._();
|
||||||
readerableService,
|
|
||||||
name: r'readerableServiceProvider',
|
final class AppearanceButtonVisibilityProvider
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
extends $FunctionalProvider<AsyncValue<bool>, bool, Stream<bool>>
|
||||||
? null
|
with $FutureModifier<bool>, $StreamProvider<bool> {
|
||||||
: _$readerableServiceHash,
|
const AppearanceButtonVisibilityProvider._()
|
||||||
dependencies: null,
|
: super(
|
||||||
allTransitiveDependencies: null,
|
from: null,
|
||||||
);
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'appearanceButtonVisibilityProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$appearanceButtonVisibilityHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$StreamProviderElement<bool> $createElement($ProviderPointer pointer) =>
|
||||||
|
$StreamProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Stream<bool> create(Ref ref) {
|
||||||
|
return appearanceButtonVisibility(ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef ReaderableServiceRef = ProviderRef<GeckoReaderableService>;
|
|
||||||
String _$appearanceButtonVisibilityHash() =>
|
String _$appearanceButtonVisibilityHash() =>
|
||||||
r'e7102b63113937dd5d17028a5ec8dac428c38bbb';
|
r'e7102b63113937dd5d17028a5ec8dac428c38bbb';
|
||||||
|
|
||||||
/// See also [appearanceButtonVisibility].
|
|
||||||
@ProviderFor(appearanceButtonVisibility)
|
|
||||||
final appearanceButtonVisibilityProvider =
|
|
||||||
AutoDisposeStreamProvider<bool>.internal(
|
|
||||||
appearanceButtonVisibility,
|
|
||||||
name: r'appearanceButtonVisibilityProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$appearanceButtonVisibilityHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef AppearanceButtonVisibilityRef = AutoDisposeStreamProviderRef<bool>;
|
|
||||||
// ignore_for_file: type=lint
|
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
|
||||||
|
|||||||
+46
-16
@@ -6,22 +6,52 @@ part of 'readerable.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(ReaderableScreenController)
|
||||||
|
const readerableScreenControllerProvider =
|
||||||
|
ReaderableScreenControllerProvider._();
|
||||||
|
|
||||||
|
final class ReaderableScreenControllerProvider
|
||||||
|
extends $AsyncNotifierProvider<ReaderableScreenController, void> {
|
||||||
|
const ReaderableScreenControllerProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'readerableScreenControllerProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$readerableScreenControllerHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
ReaderableScreenController create() => ReaderableScreenController();
|
||||||
|
}
|
||||||
|
|
||||||
String _$readerableScreenControllerHash() =>
|
String _$readerableScreenControllerHash() =>
|
||||||
r'62b2167ff8f9fe21c3cf3339e135a50aa684160c';
|
r'62b2167ff8f9fe21c3cf3339e135a50aa684160c';
|
||||||
|
|
||||||
/// See also [ReaderableScreenController].
|
abstract class _$ReaderableScreenController extends $AsyncNotifier<void> {
|
||||||
@ProviderFor(ReaderableScreenController)
|
FutureOr<void> build();
|
||||||
final readerableScreenControllerProvider =
|
@$mustCallSuper
|
||||||
AsyncNotifierProvider<ReaderableScreenController, void>.internal(
|
@override
|
||||||
ReaderableScreenController.new,
|
void runBuild() {
|
||||||
name: r'readerableScreenControllerProvider',
|
build();
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref = this.ref as $Ref<AsyncValue<void>, void>;
|
||||||
? null
|
final element =
|
||||||
: _$readerableScreenControllerHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<AsyncValue<void>, void>,
|
||||||
);
|
AsyncValue<void>,
|
||||||
|
Object?,
|
||||||
typedef _$ReaderableScreenController = AsyncNotifier<void>;
|
Object?
|
||||||
// ignore_for_file: type=lint
|
>;
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
element.handleValue(ref, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ class ReaderAppearanceButton extends HookConsumerWidget {
|
|||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final buttonVisible = ref.watch(
|
final buttonVisible = ref.watch(
|
||||||
appearanceButtonVisibilityProvider.select(
|
appearanceButtonVisibilityProvider.select(
|
||||||
(value) => value.valueOrNull ?? false,
|
(value) => value.value ?? false,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
+98
-36
@@ -6,44 +6,106 @@ part of 'engine_suggestions.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$engineHistorySuggestionsHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'7e6c17e6a2df98098ca1a683a438d1c261ccabdf';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// See also [engineHistorySuggestions].
|
@ProviderFor(EngineSuggestions)
|
||||||
@ProviderFor(engineHistorySuggestions)
|
const engineSuggestionsProvider = EngineSuggestionsProvider._();
|
||||||
final engineHistorySuggestionsProvider =
|
|
||||||
AutoDisposeProvider<AsyncValue<List<GeckoSuggestion>>>.internal(
|
final class EngineSuggestionsProvider
|
||||||
engineHistorySuggestions,
|
extends $StreamNotifierProvider<EngineSuggestions, List<GeckoSuggestion>> {
|
||||||
name: r'engineHistorySuggestionsProvider',
|
const EngineSuggestionsProvider._()
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
: super(
|
||||||
? null
|
from: null,
|
||||||
: _$engineHistorySuggestionsHash,
|
argument: null,
|
||||||
dependencies: null,
|
retry: null,
|
||||||
allTransitiveDependencies: null,
|
name: r'engineSuggestionsProvider',
|
||||||
);
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$engineSuggestionsHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
EngineSuggestions create() => EngineSuggestions();
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef EngineHistorySuggestionsRef =
|
|
||||||
AutoDisposeProviderRef<AsyncValue<List<GeckoSuggestion>>>;
|
|
||||||
String _$engineSuggestionsHash() => r'ba2c2d7f0a5e99fd9e639acd020b8cf3016c6126';
|
String _$engineSuggestionsHash() => r'ba2c2d7f0a5e99fd9e639acd020b8cf3016c6126';
|
||||||
|
|
||||||
/// See also [EngineSuggestions].
|
abstract class _$EngineSuggestions
|
||||||
@ProviderFor(EngineSuggestions)
|
extends $StreamNotifier<List<GeckoSuggestion>> {
|
||||||
final engineSuggestionsProvider =
|
Stream<List<GeckoSuggestion>> build();
|
||||||
AutoDisposeStreamNotifierProvider<
|
@$mustCallSuper
|
||||||
EngineSuggestions,
|
@override
|
||||||
List<GeckoSuggestion>
|
void runBuild() {
|
||||||
>.internal(
|
final created = build();
|
||||||
EngineSuggestions.new,
|
final ref =
|
||||||
name: r'engineSuggestionsProvider',
|
this.ref
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
as $Ref<AsyncValue<List<GeckoSuggestion>>, List<GeckoSuggestion>>;
|
||||||
? null
|
final element =
|
||||||
: _$engineSuggestionsHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<
|
||||||
);
|
AsyncValue<List<GeckoSuggestion>>,
|
||||||
|
List<GeckoSuggestion>
|
||||||
|
>,
|
||||||
|
AsyncValue<List<GeckoSuggestion>>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
typedef _$EngineSuggestions = AutoDisposeStreamNotifier<List<GeckoSuggestion>>;
|
@ProviderFor(engineHistorySuggestions)
|
||||||
// ignore_for_file: type=lint
|
const engineHistorySuggestionsProvider = EngineHistorySuggestionsProvider._();
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
|
||||||
|
final class EngineHistorySuggestionsProvider
|
||||||
|
extends
|
||||||
|
$FunctionalProvider<
|
||||||
|
AsyncValue<List<GeckoSuggestion>>,
|
||||||
|
AsyncValue<List<GeckoSuggestion>>,
|
||||||
|
AsyncValue<List<GeckoSuggestion>>
|
||||||
|
>
|
||||||
|
with $Provider<AsyncValue<List<GeckoSuggestion>>> {
|
||||||
|
const EngineHistorySuggestionsProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'engineHistorySuggestionsProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$engineHistorySuggestionsHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<AsyncValue<List<GeckoSuggestion>>> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
AsyncValue<List<GeckoSuggestion>> create(Ref ref) {
|
||||||
|
return engineHistorySuggestions(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(AsyncValue<List<GeckoSuggestion>> value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<AsyncValue<List<GeckoSuggestion>>>(
|
||||||
|
value,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$engineHistorySuggestionsHash() =>
|
||||||
|
r'7e6c17e6a2df98098ca1a683a438d1c261ccabdf';
|
||||||
|
|||||||
+116
-159
@@ -6,187 +6,144 @@ part of 'search_suggestions.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(defaultSearchSuggestions)
|
||||||
|
const defaultSearchSuggestionsProvider = DefaultSearchSuggestionsProvider._();
|
||||||
|
|
||||||
|
final class DefaultSearchSuggestionsProvider
|
||||||
|
extends
|
||||||
|
$FunctionalProvider<
|
||||||
|
ISearchSuggestionProvider,
|
||||||
|
ISearchSuggestionProvider,
|
||||||
|
ISearchSuggestionProvider
|
||||||
|
>
|
||||||
|
with $Provider<ISearchSuggestionProvider> {
|
||||||
|
const DefaultSearchSuggestionsProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'defaultSearchSuggestionsProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$defaultSearchSuggestionsHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<ISearchSuggestionProvider> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
ISearchSuggestionProvider create(Ref ref) {
|
||||||
|
return defaultSearchSuggestions(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(ISearchSuggestionProvider value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<ISearchSuggestionProvider>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$defaultSearchSuggestionsHash() =>
|
String _$defaultSearchSuggestionsHash() =>
|
||||||
r'6d7a387c7daeb790a4c9a5cdc105d2a2bdbacd2b';
|
r'6d7a387c7daeb790a4c9a5cdc105d2a2bdbacd2b';
|
||||||
|
|
||||||
/// See also [defaultSearchSuggestions].
|
|
||||||
@ProviderFor(defaultSearchSuggestions)
|
|
||||||
final defaultSearchSuggestionsProvider =
|
|
||||||
Provider<ISearchSuggestionProvider>.internal(
|
|
||||||
defaultSearchSuggestions,
|
|
||||||
name: r'defaultSearchSuggestionsProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$defaultSearchSuggestionsHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef DefaultSearchSuggestionsRef = ProviderRef<ISearchSuggestionProvider>;
|
|
||||||
String _$searchSuggestionsHash() => r'8d1fb72cab374491a53f7a814f87af6a26356f42';
|
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
|
||||||
class _SystemHash {
|
|
||||||
_SystemHash._();
|
|
||||||
|
|
||||||
static int combine(int hash, int value) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + value);
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
|
||||||
return hash ^ (hash >> 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int finish(int hash) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = hash ^ (hash >> 11);
|
|
||||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class _$SearchSuggestions
|
|
||||||
extends BuildlessAutoDisposeStreamNotifier<List<String>> {
|
|
||||||
late final ISearchSuggestionProvider? suggestionsProvider;
|
|
||||||
|
|
||||||
Stream<List<String>> build({ISearchSuggestionProvider? suggestionsProvider});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [SearchSuggestions].
|
|
||||||
@ProviderFor(SearchSuggestions)
|
@ProviderFor(SearchSuggestions)
|
||||||
const searchSuggestionsProvider = SearchSuggestionsFamily();
|
const searchSuggestionsProvider = SearchSuggestionsFamily._();
|
||||||
|
|
||||||
/// See also [SearchSuggestions].
|
final class SearchSuggestionsProvider
|
||||||
class SearchSuggestionsFamily extends Family<AsyncValue<List<String>>> {
|
extends $StreamNotifierProvider<SearchSuggestions, List<String>> {
|
||||||
/// See also [SearchSuggestions].
|
const SearchSuggestionsProvider._({
|
||||||
const SearchSuggestionsFamily();
|
required SearchSuggestionsFamily super.from,
|
||||||
|
required ISearchSuggestionProvider? super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'searchSuggestionsProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
/// See also [SearchSuggestions].
|
@override
|
||||||
SearchSuggestionsProvider call({
|
String debugGetCreateSourceHash() => _$searchSuggestionsHash();
|
||||||
ISearchSuggestionProvider? suggestionsProvider,
|
|
||||||
}) {
|
@override
|
||||||
return SearchSuggestionsProvider(suggestionsProvider: suggestionsProvider);
|
String toString() {
|
||||||
|
return r'searchSuggestionsProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
SearchSuggestionsProvider getProviderOverride(
|
SearchSuggestions create() => SearchSuggestions();
|
||||||
covariant SearchSuggestionsProvider provider,
|
|
||||||
) {
|
|
||||||
return call(suggestionsProvider: provider.suggestionsProvider);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'searchSuggestionsProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [SearchSuggestions].
|
|
||||||
class SearchSuggestionsProvider
|
|
||||||
extends
|
|
||||||
AutoDisposeStreamNotifierProviderImpl<SearchSuggestions, List<String>> {
|
|
||||||
/// See also [SearchSuggestions].
|
|
||||||
SearchSuggestionsProvider({ISearchSuggestionProvider? suggestionsProvider})
|
|
||||||
: this._internal(
|
|
||||||
() => SearchSuggestions()..suggestionsProvider = suggestionsProvider,
|
|
||||||
from: searchSuggestionsProvider,
|
|
||||||
name: r'searchSuggestionsProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$searchSuggestionsHash,
|
|
||||||
dependencies: SearchSuggestionsFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
SearchSuggestionsFamily._allTransitiveDependencies,
|
|
||||||
suggestionsProvider: suggestionsProvider,
|
|
||||||
);
|
|
||||||
|
|
||||||
SearchSuggestionsProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.suggestionsProvider,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final ISearchSuggestionProvider? suggestionsProvider;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Stream<List<String>> runNotifierBuild(covariant SearchSuggestions notifier) {
|
|
||||||
return notifier.build(suggestionsProvider: suggestionsProvider);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(SearchSuggestions Function() create) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: SearchSuggestionsProvider._internal(
|
|
||||||
() => create()..suggestionsProvider = suggestionsProvider,
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
suggestionsProvider: suggestionsProvider,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
AutoDisposeStreamNotifierProviderElement<SearchSuggestions, List<String>>
|
|
||||||
createElement() {
|
|
||||||
return _SearchSuggestionsProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is SearchSuggestionsProvider &&
|
return other is SearchSuggestionsProvider && other.argument == argument;
|
||||||
other.suggestionsProvider == suggestionsProvider;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, suggestionsProvider.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$searchSuggestionsHash() => r'8d1fb72cab374491a53f7a814f87af6a26356f42';
|
||||||
// ignore: unused_element
|
|
||||||
mixin SearchSuggestionsRef
|
|
||||||
on AutoDisposeStreamNotifierProviderRef<List<String>> {
|
|
||||||
/// The parameter `suggestionsProvider` of this provider.
|
|
||||||
ISearchSuggestionProvider? get suggestionsProvider;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _SearchSuggestionsProviderElement
|
final class SearchSuggestionsFamily extends $Family
|
||||||
extends
|
with
|
||||||
AutoDisposeStreamNotifierProviderElement<
|
$ClassFamilyOverride<
|
||||||
SearchSuggestions,
|
SearchSuggestions,
|
||||||
List<String>
|
AsyncValue<List<String>>,
|
||||||
>
|
List<String>,
|
||||||
with SearchSuggestionsRef {
|
Stream<List<String>>,
|
||||||
_SearchSuggestionsProviderElement(super.provider);
|
ISearchSuggestionProvider?
|
||||||
|
> {
|
||||||
|
const SearchSuggestionsFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'searchSuggestionsProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
SearchSuggestionsProvider call({
|
||||||
|
ISearchSuggestionProvider? suggestionsProvider,
|
||||||
|
}) => SearchSuggestionsProvider._(argument: suggestionsProvider, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ISearchSuggestionProvider? get suggestionsProvider =>
|
String toString() => r'searchSuggestionsProvider';
|
||||||
(origin as SearchSuggestionsProvider).suggestionsProvider;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
abstract class _$SearchSuggestions extends $StreamNotifier<List<String>> {
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
late final _$args = ref.$arg as ISearchSuggestionProvider?;
|
||||||
|
ISearchSuggestionProvider? get suggestionsProvider => _$args;
|
||||||
|
|
||||||
|
Stream<List<String>> build({ISearchSuggestionProvider? suggestionsProvider});
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build(suggestionsProvider: _$args);
|
||||||
|
final ref = this.ref as $Ref<AsyncValue<List<String>>, List<String>>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<AsyncValue<List<String>>, List<String>>,
|
||||||
|
AsyncValue<List<String>>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+83
-148
@@ -6,183 +6,118 @@ part of 'search_suggestions.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$searchSuggestionsRepositoryHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'be75d075c3479c3d5e462211dec8bbd21b106820';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
|
||||||
class _SystemHash {
|
|
||||||
_SystemHash._();
|
|
||||||
|
|
||||||
static int combine(int hash, int value) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + value);
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
|
||||||
return hash ^ (hash >> 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int finish(int hash) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = hash ^ (hash >> 11);
|
|
||||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class _$SearchSuggestionsRepository
|
|
||||||
extends BuildlessNotifier<Raw<Stream<List<String>>>> {
|
|
||||||
late final ISearchSuggestionProvider suggestionsProvider;
|
|
||||||
|
|
||||||
Raw<Stream<List<String>>> build(
|
|
||||||
ISearchSuggestionProvider suggestionsProvider,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [SearchSuggestionsRepository].
|
|
||||||
@ProviderFor(SearchSuggestionsRepository)
|
@ProviderFor(SearchSuggestionsRepository)
|
||||||
const searchSuggestionsRepositoryProvider = SearchSuggestionsRepositoryFamily();
|
const searchSuggestionsRepositoryProvider =
|
||||||
|
SearchSuggestionsRepositoryFamily._();
|
||||||
|
|
||||||
/// See also [SearchSuggestionsRepository].
|
final class SearchSuggestionsRepositoryProvider
|
||||||
class SearchSuggestionsRepositoryFamily
|
|
||||||
extends Family<Raw<Stream<List<String>>>> {
|
|
||||||
/// See also [SearchSuggestionsRepository].
|
|
||||||
const SearchSuggestionsRepositoryFamily();
|
|
||||||
|
|
||||||
/// See also [SearchSuggestionsRepository].
|
|
||||||
SearchSuggestionsRepositoryProvider call(
|
|
||||||
ISearchSuggestionProvider suggestionsProvider,
|
|
||||||
) {
|
|
||||||
return SearchSuggestionsRepositoryProvider(suggestionsProvider);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
SearchSuggestionsRepositoryProvider getProviderOverride(
|
|
||||||
covariant SearchSuggestionsRepositoryProvider provider,
|
|
||||||
) {
|
|
||||||
return call(provider.suggestionsProvider);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'searchSuggestionsRepositoryProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [SearchSuggestionsRepository].
|
|
||||||
class SearchSuggestionsRepositoryProvider
|
|
||||||
extends
|
extends
|
||||||
NotifierProviderImpl<
|
$NotifierProvider<
|
||||||
SearchSuggestionsRepository,
|
SearchSuggestionsRepository,
|
||||||
Raw<Stream<List<String>>>
|
Raw<Stream<List<String>>>
|
||||||
> {
|
> {
|
||||||
/// See also [SearchSuggestionsRepository].
|
const SearchSuggestionsRepositoryProvider._({
|
||||||
SearchSuggestionsRepositoryProvider(
|
required SearchSuggestionsRepositoryFamily super.from,
|
||||||
ISearchSuggestionProvider suggestionsProvider,
|
required ISearchSuggestionProvider super.argument,
|
||||||
) : this._internal(
|
}) : super(
|
||||||
() =>
|
retry: null,
|
||||||
SearchSuggestionsRepository()
|
name: r'searchSuggestionsRepositoryProvider',
|
||||||
..suggestionsProvider = suggestionsProvider,
|
isAutoDispose: false,
|
||||||
from: searchSuggestionsRepositoryProvider,
|
dependencies: null,
|
||||||
name: r'searchSuggestionsRepositoryProvider',
|
$allTransitiveDependencies: null,
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
);
|
||||||
? null
|
|
||||||
: _$searchSuggestionsRepositoryHash,
|
|
||||||
dependencies: SearchSuggestionsRepositoryFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
SearchSuggestionsRepositoryFamily._allTransitiveDependencies,
|
|
||||||
suggestionsProvider: suggestionsProvider,
|
|
||||||
);
|
|
||||||
|
|
||||||
SearchSuggestionsRepositoryProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.suggestionsProvider,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final ISearchSuggestionProvider suggestionsProvider;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Raw<Stream<List<String>>> runNotifierBuild(
|
String debugGetCreateSourceHash() => _$searchSuggestionsRepositoryHash();
|
||||||
covariant SearchSuggestionsRepository notifier,
|
|
||||||
) {
|
@override
|
||||||
return notifier.build(suggestionsProvider);
|
String toString() {
|
||||||
|
return r'searchSuggestionsRepositoryProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
Override overrideWith(SearchSuggestionsRepository Function() create) {
|
SearchSuggestionsRepository create() => SearchSuggestionsRepository();
|
||||||
return ProviderOverride(
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(Raw<Stream<List<String>>> value) {
|
||||||
|
return $ProviderOverride(
|
||||||
origin: this,
|
origin: this,
|
||||||
override: SearchSuggestionsRepositoryProvider._internal(
|
providerOverride: $SyncValueProvider<Raw<Stream<List<String>>>>(value),
|
||||||
() => create()..suggestionsProvider = suggestionsProvider,
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
suggestionsProvider: suggestionsProvider,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
NotifierProviderElement<
|
|
||||||
SearchSuggestionsRepository,
|
|
||||||
Raw<Stream<List<String>>>
|
|
||||||
>
|
|
||||||
createElement() {
|
|
||||||
return _SearchSuggestionsRepositoryProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is SearchSuggestionsRepositoryProvider &&
|
return other is SearchSuggestionsRepositoryProvider &&
|
||||||
other.suggestionsProvider == suggestionsProvider;
|
other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, suggestionsProvider.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$searchSuggestionsRepositoryHash() =>
|
||||||
// ignore: unused_element
|
r'be75d075c3479c3d5e462211dec8bbd21b106820';
|
||||||
mixin SearchSuggestionsRepositoryRef
|
|
||||||
on NotifierProviderRef<Raw<Stream<List<String>>>> {
|
|
||||||
/// The parameter `suggestionsProvider` of this provider.
|
|
||||||
ISearchSuggestionProvider get suggestionsProvider;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _SearchSuggestionsRepositoryProviderElement
|
final class SearchSuggestionsRepositoryFamily extends $Family
|
||||||
extends
|
with
|
||||||
NotifierProviderElement<
|
$ClassFamilyOverride<
|
||||||
SearchSuggestionsRepository,
|
SearchSuggestionsRepository,
|
||||||
Raw<Stream<List<String>>>
|
Raw<Stream<List<String>>>,
|
||||||
>
|
Raw<Stream<List<String>>>,
|
||||||
with SearchSuggestionsRepositoryRef {
|
Raw<Stream<List<String>>>,
|
||||||
_SearchSuggestionsRepositoryProviderElement(super.provider);
|
ISearchSuggestionProvider
|
||||||
|
> {
|
||||||
|
const SearchSuggestionsRepositoryFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'searchSuggestionsRepositoryProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: false,
|
||||||
|
);
|
||||||
|
|
||||||
|
SearchSuggestionsRepositoryProvider call(
|
||||||
|
ISearchSuggestionProvider suggestionsProvider,
|
||||||
|
) => SearchSuggestionsRepositoryProvider._(
|
||||||
|
argument: suggestionsProvider,
|
||||||
|
from: this,
|
||||||
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ISearchSuggestionProvider get suggestionsProvider =>
|
String toString() => r'searchSuggestionsRepositoryProvider';
|
||||||
(origin as SearchSuggestionsRepositoryProvider).suggestionsProvider;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
abstract class _$SearchSuggestionsRepository
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
extends $Notifier<Raw<Stream<List<String>>>> {
|
||||||
|
late final _$args = ref.$arg as ISearchSuggestionProvider;
|
||||||
|
ISearchSuggestionProvider get suggestionsProvider => _$args;
|
||||||
|
|
||||||
|
Raw<Stream<List<String>>> build(
|
||||||
|
ISearchSuggestionProvider suggestionsProvider,
|
||||||
|
);
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build(_$args);
|
||||||
|
final ref =
|
||||||
|
this.ref as $Ref<Raw<Stream<List<String>>>, Raw<Stream<List<String>>>>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<Raw<Stream<List<String>>>, Raw<Stream<List<String>>>>,
|
||||||
|
Raw<Stream<List<String>>>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class SearchScreen extends HookConsumerWidget {
|
|||||||
final searchFocusNode = useFocusNode();
|
final searchFocusNode = useFocusNode();
|
||||||
|
|
||||||
final defaultSearchBang = ref.watch(
|
final defaultSearchBang = ref.watch(
|
||||||
defaultSearchBangDataProvider.select((value) => value.valueOrNull),
|
defaultSearchBangDataProvider.select((value) => value.value),
|
||||||
);
|
);
|
||||||
|
|
||||||
final selectedBang = useState<BangData?>(null);
|
final selectedBang = useState<BangData?>(null);
|
||||||
|
|||||||
+2
-2
@@ -62,7 +62,7 @@ class FeedSearch extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (articlesAsync.hasValue && (articlesAsync.valueOrNull.isEmpty)) {
|
if (articlesAsync.hasValue && (articlesAsync.value.isEmpty)) {
|
||||||
return const SliverToBoxAdapter(child: SizedBox.shrink());
|
return const SliverToBoxAdapter(child: SizedBox.shrink());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ class FeedSearch extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
loading: () => SliverList.builder(
|
loading: () => SliverList.builder(
|
||||||
itemCount: articlesAsync.valueOrNull?.length ?? 3,
|
itemCount: articlesAsync.value?.length ?? 3,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return const ListTile(title: Bone.text());
|
return const ListTile(title: Bone.text());
|
||||||
},
|
},
|
||||||
|
|||||||
+2
-2
@@ -69,8 +69,8 @@ class FixedSearchTermSuggestions extends HookConsumerWidget {
|
|||||||
final prioritizedSuggestions = isSuggestableText
|
final prioritizedSuggestions = isSuggestableText
|
||||||
? [
|
? [
|
||||||
searchTextController.text,
|
searchTextController.text,
|
||||||
if (searchSuggestions.valueOrNull != null)
|
if (searchSuggestions.value != null)
|
||||||
...searchSuggestions.valueOrNull!
|
...searchSuggestions.value!
|
||||||
.whereNot(
|
.whereNot(
|
||||||
(suggestion) => suggestion == searchTextController.text,
|
(suggestion) => suggestion == searchTextController.text,
|
||||||
)
|
)
|
||||||
|
|||||||
+2
-2
@@ -94,8 +94,8 @@ class FullSearchTermSuggestions extends HookConsumerWidget {
|
|||||||
} else {
|
} else {
|
||||||
final prioritizedSuggestions = [
|
final prioritizedSuggestions = [
|
||||||
if (searchTextIsNotEmpty) searchTextController.text,
|
if (searchTextIsNotEmpty) searchTextController.text,
|
||||||
if (searchSuggestions.valueOrNull != null)
|
if (searchSuggestions.value != null)
|
||||||
...searchSuggestions.valueOrNull!.whereNot(
|
...searchSuggestions.value!.whereNot(
|
||||||
(suggestion) => suggestion == searchTextController.text,
|
(suggestion) => suggestion == searchTextController.text,
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|||||||
+2
-2
@@ -55,7 +55,7 @@ class HistorySuggestions extends HookConsumerWidget {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (historySuggestionsAsync.hasValue &&
|
if (historySuggestionsAsync.hasValue &&
|
||||||
(historySuggestionsAsync.valueOrNull.isEmpty)) {
|
(historySuggestionsAsync.value.isEmpty)) {
|
||||||
return const SliverToBoxAdapter(child: SizedBox.shrink());
|
return const SliverToBoxAdapter(child: SizedBox.shrink());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ class HistorySuggestions extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
loading: () => SliverList.builder(
|
loading: () => SliverList.builder(
|
||||||
itemCount: historySuggestionsAsync.valueOrNull?.length ?? 3,
|
itemCount: historySuggestionsAsync.value?.length ?? 3,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return const ListTile(title: Bone.text());
|
return const ListTile(title: Bone.text());
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-3
@@ -49,9 +49,7 @@ class TabSearch extends HookConsumerWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final selectedContainer = useState<ContainerData?>(
|
final selectedContainer = useState<ContainerData?>(
|
||||||
ref.read(
|
ref.read(selectedContainerDataProvider.select((value) => value.value)),
|
||||||
selectedContainerDataProvider.select((value) => value.valueOrNull),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final tabs = ref
|
final tabs = ref
|
||||||
|
|||||||
@@ -20,14 +20,14 @@
|
|||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:drift/drift.dart';
|
import 'package:drift/drift.dart';
|
||||||
|
import 'package:weblibre/features/geckoview/features/tabs/data/database/daos/container.drift.dart';
|
||||||
import 'package:weblibre/features/geckoview/features/tabs/data/database/database.dart';
|
import 'package:weblibre/features/geckoview/features/tabs/data/database/database.dart';
|
||||||
|
import 'package:weblibre/features/geckoview/features/tabs/data/database/definitions.drift.dart';
|
||||||
import 'package:weblibre/features/geckoview/features/tabs/data/models/container_data.dart';
|
import 'package:weblibre/features/geckoview/features/tabs/data/models/container_data.dart';
|
||||||
|
|
||||||
part 'container.g.dart';
|
|
||||||
|
|
||||||
@DriftAccessor()
|
@DriftAccessor()
|
||||||
class ContainerDao extends DatabaseAccessor<TabDatabase>
|
class ContainerDao extends DatabaseAccessor<TabDatabase>
|
||||||
with _$ContainerDaoMixin {
|
with $ContainerDaoMixin {
|
||||||
ContainerDao(super.db);
|
ContainerDao(super.db);
|
||||||
|
|
||||||
Future<void> addContainer(ContainerData container) {
|
Future<void> addContainer(ContainerData container) {
|
||||||
@@ -99,27 +99,39 @@ class ContainerDao extends DatabaseAccessor<TabDatabase>
|
|||||||
String? containerId, {
|
String? containerId, {
|
||||||
int bucket = 0,
|
int bucket = 0,
|
||||||
}) {
|
}) {
|
||||||
return db.leadingOrderKey(bucket: bucket, containerId: containerId);
|
return db.definitionsDrift.leadingOrderKey(
|
||||||
|
bucket: bucket,
|
||||||
|
containerId: containerId,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
SingleSelectable<String> generateTrailingOrderKey(
|
SingleSelectable<String> generateTrailingOrderKey(
|
||||||
String? containerId, {
|
String? containerId, {
|
||||||
int bucket = 0,
|
int bucket = 0,
|
||||||
}) {
|
}) {
|
||||||
return db.trailingOrderKey(bucket: bucket, containerId: containerId);
|
return db.definitionsDrift.trailingOrderKey(
|
||||||
|
bucket: bucket,
|
||||||
|
containerId: containerId,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
SingleSelectable<String> generateOrderKeyAfterTabId(
|
SingleSelectable<String> generateOrderKeyAfterTabId(
|
||||||
String? containerId,
|
String? containerId,
|
||||||
String tabId,
|
String tabId,
|
||||||
) {
|
) {
|
||||||
return db.orderKeyAfterTab(containerId: containerId, tabId: tabId);
|
return db.definitionsDrift.orderKeyAfterTab(
|
||||||
|
containerId: containerId,
|
||||||
|
tabId: tabId,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
SingleSelectable<String> generateOrderKeyBeforeTabId(
|
SingleSelectable<String> generateOrderKeyBeforeTabId(
|
||||||
String? containerId,
|
String? containerId,
|
||||||
String tabId,
|
String tabId,
|
||||||
) {
|
) {
|
||||||
return db.orderKeyBeforeTab(containerId: containerId, tabId: tabId);
|
return db.definitionsDrift.orderKeyBeforeTab(
|
||||||
|
containerId: containerId,
|
||||||
|
tabId: tabId,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
// dart format width=80
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
import 'package:drift/drift.dart' as i0;
|
||||||
|
import 'package:weblibre/features/geckoview/features/tabs/data/database/database.dart'
|
||||||
|
as i1;
|
||||||
|
|
||||||
|
mixin $ContainerDaoMixin on i0.DatabaseAccessor<i1.TabDatabase> {}
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'container.dart';
|
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
|
||||||
mixin _$ContainerDaoMixin on DatabaseAccessor<TabDatabase> {}
|
|
||||||
@@ -23,13 +23,13 @@ import 'package:drift/drift.dart';
|
|||||||
import 'package:lexo_rank/lexo_rank.dart';
|
import 'package:lexo_rank/lexo_rank.dart';
|
||||||
import 'package:nullability/nullability.dart';
|
import 'package:nullability/nullability.dart';
|
||||||
import 'package:weblibre/features/geckoview/domain/entities/states/tab.dart';
|
import 'package:weblibre/features/geckoview/domain/entities/states/tab.dart';
|
||||||
|
import 'package:weblibre/features/geckoview/features/tabs/data/database/daos/tab.drift.dart';
|
||||||
import 'package:weblibre/features/geckoview/features/tabs/data/database/database.dart';
|
import 'package:weblibre/features/geckoview/features/tabs/data/database/database.dart';
|
||||||
|
import 'package:weblibre/features/geckoview/features/tabs/data/database/definitions.drift.dart';
|
||||||
import 'package:weblibre/features/geckoview/features/tabs/data/models/tab_query_result.dart';
|
import 'package:weblibre/features/geckoview/features/tabs/data/models/tab_query_result.dart';
|
||||||
|
|
||||||
part 'tab.g.dart';
|
|
||||||
|
|
||||||
@DriftAccessor()
|
@DriftAccessor()
|
||||||
class TabDao extends DatabaseAccessor<TabDatabase> with _$TabDaoMixin {
|
class TabDao extends DatabaseAccessor<TabDatabase> with $TabDaoMixin {
|
||||||
final _undoHistory = <String, TabData>{};
|
final _undoHistory = <String, TabData>{};
|
||||||
Timer? _clearHistoryTimer;
|
Timer? _clearHistoryTimer;
|
||||||
|
|
||||||
@@ -258,7 +258,7 @@ class TabDao extends DatabaseAccessor<TabDatabase> with _$TabDaoMixin {
|
|||||||
final ftsQuery = db.buildFtsQuery(searchString);
|
final ftsQuery = db.buildFtsQuery(searchString);
|
||||||
|
|
||||||
if (ftsQuery.isNotEmpty) {
|
if (ftsQuery.isNotEmpty) {
|
||||||
return db.queryTabsFullContent(
|
return db.definitionsDrift.queryTabsFullContent(
|
||||||
query: ftsQuery,
|
query: ftsQuery,
|
||||||
snippetLength: snippetLength,
|
snippetLength: snippetLength,
|
||||||
beforeMatch: matchPrefix,
|
beforeMatch: matchPrefix,
|
||||||
@@ -266,7 +266,9 @@ class TabDao extends DatabaseAccessor<TabDatabase> with _$TabDaoMixin {
|
|||||||
ellipsis: ellipsis,
|
ellipsis: ellipsis,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return db.queryTabsBasic(query: db.buildLikeQuery(searchString));
|
return db.definitionsDrift.queryTabsBasic(
|
||||||
|
query: db.buildLikeQuery(searchString),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
// dart format width=80
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
import 'package:drift/drift.dart' as i0;
|
||||||
|
import 'package:weblibre/features/geckoview/features/tabs/data/database/database.dart'
|
||||||
|
as i1;
|
||||||
|
|
||||||
|
mixin $TabDaoMixin on i0.DatabaseAccessor<i1.TabDatabase> {}
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'tab.dart';
|
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
|
||||||
mixin _$TabDaoMixin on DatabaseAccessor<TabDatabase> {}
|
|
||||||
@@ -18,20 +18,13 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import 'package:drift/drift.dart';
|
import 'package:drift/drift.dart';
|
||||||
import 'package:flutter/widgets.dart' show Color;
|
|
||||||
import 'package:weblibre/data/database/converters/color.dart';
|
|
||||||
import 'package:weblibre/data/database/converters/uri.dart';
|
|
||||||
import 'package:weblibre/features/geckoview/features/tabs/data/database/converters/container_metadata_converter.dart';
|
|
||||||
import 'package:weblibre/features/geckoview/features/tabs/data/database/daos/container.dart';
|
import 'package:weblibre/features/geckoview/features/tabs/data/database/daos/container.dart';
|
||||||
import 'package:weblibre/features/geckoview/features/tabs/data/database/daos/tab.dart';
|
import 'package:weblibre/features/geckoview/features/tabs/data/database/daos/tab.dart';
|
||||||
import 'package:weblibre/features/geckoview/features/tabs/data/models/container_data.dart';
|
import 'package:weblibre/features/geckoview/features/tabs/data/database/database.drift.dart';
|
||||||
import 'package:weblibre/features/geckoview/features/tabs/data/models/tab_query_result.dart';
|
|
||||||
import 'package:weblibre/features/search/domain/fts_tokenizer.dart';
|
import 'package:weblibre/features/search/domain/fts_tokenizer.dart';
|
||||||
|
|
||||||
part 'database.g.dart';
|
@DriftDatabase(include: {'definitions.drift'}, daos: [ContainerDao, TabDao])
|
||||||
|
class TabDatabase extends $TabDatabase with TrigramQueryBuilderMixin {
|
||||||
@DriftDatabase(include: {'database.drift'}, daos: [ContainerDao, TabDao])
|
|
||||||
class TabDatabase extends _$TabDatabase with TrigramQueryBuilderMixin {
|
|
||||||
@override
|
@override
|
||||||
final int schemaVersion = 2;
|
final int schemaVersion = 2;
|
||||||
|
|
||||||
@@ -44,7 +37,7 @@ class TabDatabase extends _$TabDatabase with TrigramQueryBuilderMixin {
|
|||||||
MigrationStrategy get migration => MigrationStrategy(
|
MigrationStrategy get migration => MigrationStrategy(
|
||||||
beforeOpen: (details) async {
|
beforeOpen: (details) async {
|
||||||
await customStatement('PRAGMA foreign_keys = ON;');
|
await customStatement('PRAGMA foreign_keys = ON;');
|
||||||
await optimizeFtsIndex();
|
await definitionsDrift.optimizeFtsIndex();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,135 @@
|
|||||||
|
// dart format width=80
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
import 'package:drift/drift.dart' as i0;
|
||||||
|
import 'package:weblibre/features/geckoview/features/tabs/data/database/definitions.drift.dart'
|
||||||
|
as i1;
|
||||||
|
import 'package:weblibre/features/geckoview/features/tabs/data/database/daos/container.dart'
|
||||||
|
as i2;
|
||||||
|
import 'package:weblibre/features/geckoview/features/tabs/data/database/database.dart'
|
||||||
|
as i3;
|
||||||
|
import 'package:weblibre/features/geckoview/features/tabs/data/database/daos/tab.dart'
|
||||||
|
as i4;
|
||||||
|
import 'package:drift/internal/modular.dart' as i5;
|
||||||
|
import 'package:sqlite3/common.dart' as i6;
|
||||||
|
|
||||||
|
abstract class $TabDatabase extends i0.GeneratedDatabase {
|
||||||
|
$TabDatabase(i0.QueryExecutor e) : super(e);
|
||||||
|
$TabDatabaseManager get managers => $TabDatabaseManager(this);
|
||||||
|
late final i1.Container container = i1.Container(this);
|
||||||
|
late final i1.Tab tab = i1.Tab(this);
|
||||||
|
late final i1.TabFts tabFts = i1.TabFts(this);
|
||||||
|
late final i2.ContainerDao containerDao = i2.ContainerDao(
|
||||||
|
this as i3.TabDatabase,
|
||||||
|
);
|
||||||
|
late final i4.TabDao tabDao = i4.TabDao(this as i3.TabDatabase);
|
||||||
|
i1.DefinitionsDrift get definitionsDrift => i5.ReadDatabaseContainer(
|
||||||
|
this,
|
||||||
|
).accessor<i1.DefinitionsDrift>(i1.DefinitionsDrift.new);
|
||||||
|
@override
|
||||||
|
Iterable<i0.TableInfo<i0.Table, Object?>> get allTables =>
|
||||||
|
allSchemaEntities.whereType<i0.TableInfo<i0.Table, Object?>>();
|
||||||
|
@override
|
||||||
|
List<i0.DatabaseSchemaEntity> get allSchemaEntities => [
|
||||||
|
container,
|
||||||
|
tab,
|
||||||
|
tabFts,
|
||||||
|
i1.tabMaintainParentChainOnDelete,
|
||||||
|
i1.tabAfterInsert,
|
||||||
|
i1.tabAfterDelete,
|
||||||
|
i1.tabAfterUpdate,
|
||||||
|
];
|
||||||
|
@override
|
||||||
|
i0.StreamQueryUpdateRules get streamUpdateRules =>
|
||||||
|
const i0.StreamQueryUpdateRules([
|
||||||
|
i0.WritePropagation(
|
||||||
|
on: i0.TableUpdateQuery.onTableName(
|
||||||
|
'container',
|
||||||
|
limitUpdateKind: i0.UpdateKind.delete,
|
||||||
|
),
|
||||||
|
result: [i0.TableUpdate('tab', kind: i0.UpdateKind.delete)],
|
||||||
|
),
|
||||||
|
i0.WritePropagation(
|
||||||
|
on: i0.TableUpdateQuery.onTableName(
|
||||||
|
'tab',
|
||||||
|
limitUpdateKind: i0.UpdateKind.delete,
|
||||||
|
),
|
||||||
|
result: [i0.TableUpdate('tab', kind: i0.UpdateKind.update)],
|
||||||
|
),
|
||||||
|
i0.WritePropagation(
|
||||||
|
on: i0.TableUpdateQuery.onTableName(
|
||||||
|
'tab',
|
||||||
|
limitUpdateKind: i0.UpdateKind.insert,
|
||||||
|
),
|
||||||
|
result: [i0.TableUpdate('tab_fts', kind: i0.UpdateKind.insert)],
|
||||||
|
),
|
||||||
|
i0.WritePropagation(
|
||||||
|
on: i0.TableUpdateQuery.onTableName(
|
||||||
|
'tab',
|
||||||
|
limitUpdateKind: i0.UpdateKind.delete,
|
||||||
|
),
|
||||||
|
result: [i0.TableUpdate('tab_fts', kind: i0.UpdateKind.insert)],
|
||||||
|
),
|
||||||
|
i0.WritePropagation(
|
||||||
|
on: i0.TableUpdateQuery.onTableName(
|
||||||
|
'tab',
|
||||||
|
limitUpdateKind: i0.UpdateKind.update,
|
||||||
|
),
|
||||||
|
result: [i0.TableUpdate('tab_fts', kind: i0.UpdateKind.insert)],
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
class $TabDatabaseManager {
|
||||||
|
final $TabDatabase _db;
|
||||||
|
$TabDatabaseManager(this._db);
|
||||||
|
i1.$ContainerTableManager get container =>
|
||||||
|
i1.$ContainerTableManager(_db, _db.container);
|
||||||
|
i1.$TabTableManager get tab => i1.$TabTableManager(_db, _db.tab);
|
||||||
|
i1.$TabFtsTableManager get tabFts => i1.$TabFtsTableManager(_db, _db.tabFts);
|
||||||
|
}
|
||||||
|
|
||||||
|
extension DefineFunctions on i6.CommonDatabase {
|
||||||
|
void defineFunctions({
|
||||||
|
required String Function(int, String?) lexoRankNext,
|
||||||
|
required String Function(int, String?) lexoRankPrevious,
|
||||||
|
required String Function(String?, String?) lexoRankReorderAfter,
|
||||||
|
required String Function(String?, String?) lexoRankReorderBefore,
|
||||||
|
}) {
|
||||||
|
createFunction(
|
||||||
|
functionName: 'lexo_rank_next',
|
||||||
|
argumentCount: const i6.AllowedArgumentCount(2),
|
||||||
|
function: (args) {
|
||||||
|
final arg0 = args[0] as int;
|
||||||
|
final arg1 = args[1] as String?;
|
||||||
|
return lexoRankNext(arg0, arg1);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
createFunction(
|
||||||
|
functionName: 'lexo_rank_previous',
|
||||||
|
argumentCount: const i6.AllowedArgumentCount(2),
|
||||||
|
function: (args) {
|
||||||
|
final arg0 = args[0] as int;
|
||||||
|
final arg1 = args[1] as String?;
|
||||||
|
return lexoRankPrevious(arg0, arg1);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
createFunction(
|
||||||
|
functionName: 'lexo_rank_reorder_after',
|
||||||
|
argumentCount: const i6.AllowedArgumentCount(2),
|
||||||
|
function: (args) {
|
||||||
|
final arg0 = args[0] as String?;
|
||||||
|
final arg1 = args[1] as String?;
|
||||||
|
return lexoRankReorderAfter(arg0, arg1);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
createFunction(
|
||||||
|
functionName: 'lexo_rank_reorder_before',
|
||||||
|
argumentCount: const i6.AllowedArgumentCount(2),
|
||||||
|
function: (args) {
|
||||||
|
final arg0 = args[0] as String?;
|
||||||
|
final arg1 = args[1] as String?;
|
||||||
|
return lexoRankReorderBefore(arg0, arg1);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
+1398
-1372
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user