migration done
This commit is contained in:
@@ -83,9 +83,7 @@ EquatableValue<List<String>> availableTabIds(
|
||||
ContainerFilter containerFilter,
|
||||
) {
|
||||
final containerTabs = ref.watch(
|
||||
containerTabIdsProvider(
|
||||
containerFilter,
|
||||
).select((value) => value.valueOrNull),
|
||||
containerTabIdsProvider(containerFilter).select((value) => value.value),
|
||||
);
|
||||
final tabList = ref.watch(tabListProvider);
|
||||
|
||||
@@ -118,13 +116,13 @@ EquatableValue<List<TabEntity>> suggestedTabEntities(
|
||||
containerTabIdsProvider(
|
||||
// ignore: provider_parameters
|
||||
ContainerFilterById(containerId: containerId),
|
||||
).select((value) => EquatableValue(value.valueOrNull)),
|
||||
).select((value) => EquatableValue(value.value)),
|
||||
);
|
||||
|
||||
final suggestions = ref.watch(
|
||||
containerTabSuggestionsProvider(containerId).select(
|
||||
(value) => EquatableValue(
|
||||
value.valueOrNull.mapNotNull(
|
||||
value.value.mapNotNull(
|
||||
(result) => result
|
||||
.whereNot(
|
||||
(tabId) => excludedTabIds.value?.contains(tabId) ?? false,
|
||||
@@ -151,7 +149,7 @@ EquatableValue<List<TabEntity>> seamlessFilteredTabEntities(
|
||||
.watch(
|
||||
tabSearchRepositoryProvider(searchPartition).select(
|
||||
(value) => EquatableValue(
|
||||
value.valueOrNull.mapNotNull(
|
||||
value.value.mapNotNull(
|
||||
(result) => result.results
|
||||
.map(
|
||||
(tab) => SearchResultTabEntity(
|
||||
@@ -179,7 +177,7 @@ EquatableValue<List<TabEntity>> seamlessFilteredTabEntities(
|
||||
final trees = ref.watch(
|
||||
tabTreesProvider.select(
|
||||
(value) => EquatableValue(
|
||||
value.valueOrNull
|
||||
value.value
|
||||
?.map(
|
||||
(tree) => TabTreeEntity(
|
||||
tabId: tree.latestTabId,
|
||||
@@ -228,7 +226,7 @@ EquatableValue<List<TabPreview>> seamlessFilteredTabPreviews(
|
||||
.watch(
|
||||
tabSearchRepositoryProvider(
|
||||
searchPartition,
|
||||
).select((value) => EquatableValue(value.valueOrNull)),
|
||||
).select((value) => EquatableValue(value.value)),
|
||||
)
|
||||
.value;
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,25 +6,52 @@ part of 'intent.dart';
|
||||
// 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() =>
|
||||
r'860e39a7b608d579f7383e2199719067ad26f268';
|
||||
|
||||
/// See also [EngineBoundIntentStream].
|
||||
@ProviderFor(EngineBoundIntentStream)
|
||||
final engineBoundIntentStreamProvider =
|
||||
AutoDisposeStreamNotifierProvider<
|
||||
EngineBoundIntentStream,
|
||||
SharedContent
|
||||
>.internal(
|
||||
EngineBoundIntentStream.new,
|
||||
name: r'engineBoundIntentStreamProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$engineBoundIntentStreamHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$EngineBoundIntentStream = AutoDisposeStreamNotifier<SharedContent>;
|
||||
// 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
|
||||
abstract class _$EngineBoundIntentStream
|
||||
extends $StreamNotifier<SharedContent> {
|
||||
Stream<SharedContent> build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final created = build();
|
||||
final ref = this.ref as $Ref<AsyncValue<SharedContent>, SharedContent>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<AsyncValue<SharedContent>, SharedContent>,
|
||||
AsyncValue<SharedContent>,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleValue(ref, created);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,22 +6,59 @@ part of 'lifecycle.dart';
|
||||
// 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() =>
|
||||
r'9082d058611aaaae268b60b8ce130150f73d453d';
|
||||
|
||||
/// See also [BrowserViewLifecycle].
|
||||
@ProviderFor(BrowserViewLifecycle)
|
||||
final browserViewLifecycleProvider =
|
||||
NotifierProvider<BrowserViewLifecycle, AppLifecycleState?>.internal(
|
||||
BrowserViewLifecycle.new,
|
||||
name: r'browserViewLifecycleProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$browserViewLifecycleHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$BrowserViewLifecycle = Notifier<AppLifecycleState?>;
|
||||
// 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
|
||||
abstract class _$BrowserViewLifecycle extends $Notifier<AppLifecycleState?> {
|
||||
AppLifecycleState? build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final created = build();
|
||||
final ref = this.ref as $Ref<AppLifecycleState?, AppLifecycleState?>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<AppLifecycleState?, AppLifecycleState?>,
|
||||
AppLifecycleState?,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleValue(ref, created);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,22 +6,59 @@ part of 'browser_addon.dart';
|
||||
// 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() =>
|
||||
r'1dd73c322e712e1492d74f1af844d5b5cc8f81bb';
|
||||
|
||||
/// See also [BrowserAddonService].
|
||||
@ProviderFor(BrowserAddonService)
|
||||
final browserAddonServiceProvider =
|
||||
AutoDisposeNotifierProvider<BrowserAddonService, void>.internal(
|
||||
BrowserAddonService.new,
|
||||
name: r'browserAddonServiceProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$browserAddonServiceHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$BrowserAddonService = AutoDisposeNotifier<void>;
|
||||
// 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
|
||||
abstract class _$BrowserAddonService 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,22 +6,59 @@ part of 'browser_data.dart';
|
||||
// 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() =>
|
||||
r'0a00db5b143d3851f2c171f4f939940f959b67bb';
|
||||
|
||||
/// See also [BrowserDataService].
|
||||
@ProviderFor(BrowserDataService)
|
||||
final browserDataServiceProvider =
|
||||
NotifierProvider<BrowserDataService, void>.internal(
|
||||
BrowserDataService.new,
|
||||
name: r'browserDataServiceProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$browserDataServiceHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$BrowserDataService = Notifier<void>;
|
||||
// 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
|
||||
abstract class _$BrowserDataService 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);
|
||||
}
|
||||
}
|
||||
|
||||
+13
-15
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
import 'package:flutter/material.dart' show ThemeMode;
|
||||
import 'package:flutter_mozilla_components/flutter_mozilla_components.dart';
|
||||
import 'package:riverpod/riverpod.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:weblibre/core/logger.dart';
|
||||
import 'package:weblibre/features/user/domain/repositories/engine_settings.dart';
|
||||
@@ -62,69 +63,66 @@ class EngineSettingsReplicationService
|
||||
fireImmediately: true,
|
||||
engineSettingsRepositoryProvider,
|
||||
(previous, next) async {
|
||||
final settings = next.valueOrNull;
|
||||
final settings = next.value;
|
||||
|
||||
if (settings != null) {
|
||||
if (initialSettingsSent && previous != null) {
|
||||
if (previous.valueOrNull?.javascriptEnabled !=
|
||||
if (previous.value?.javascriptEnabled !=
|
||||
settings.javascriptEnabled) {
|
||||
await _service.javascriptEnabled(settings.javascriptEnabled);
|
||||
}
|
||||
if (previous.valueOrNull?.trackingProtectionPolicy !=
|
||||
if (previous.value?.trackingProtectionPolicy !=
|
||||
settings.trackingProtectionPolicy) {
|
||||
await _service.trackingProtectionPolicy(
|
||||
settings.trackingProtectionPolicy,
|
||||
);
|
||||
}
|
||||
if (previous.valueOrNull?.httpsOnlyMode != settings.httpsOnlyMode) {
|
||||
if (previous.value?.httpsOnlyMode != settings.httpsOnlyMode) {
|
||||
await _service.httpsOnlyMode(settings.httpsOnlyMode);
|
||||
}
|
||||
if (previous.valueOrNull?.globalPrivacyControlEnabled !=
|
||||
if (previous.value?.globalPrivacyControlEnabled !=
|
||||
settings.globalPrivacyControlEnabled) {
|
||||
await _service.globalPrivacyControlEnabled(
|
||||
settings.globalPrivacyControlEnabled,
|
||||
);
|
||||
}
|
||||
if (previous.valueOrNull?.preferredColorScheme !=
|
||||
if (previous.value?.preferredColorScheme !=
|
||||
settings.preferredColorScheme) {
|
||||
await _service.preferredColorScheme(
|
||||
settings.preferredColorScheme,
|
||||
);
|
||||
}
|
||||
if (previous.valueOrNull?.cookieBannerHandlingMode !=
|
||||
if (previous.value?.cookieBannerHandlingMode !=
|
||||
settings.cookieBannerHandlingMode) {
|
||||
await _service.cookieBannerHandlingMode(
|
||||
settings.cookieBannerHandlingMode,
|
||||
);
|
||||
}
|
||||
if (previous.valueOrNull?.cookieBannerHandlingModePrivateBrowsing !=
|
||||
if (previous.value?.cookieBannerHandlingModePrivateBrowsing !=
|
||||
settings.cookieBannerHandlingModePrivateBrowsing) {
|
||||
await _service.cookieBannerHandlingModePrivateBrowsing(
|
||||
settings.cookieBannerHandlingModePrivateBrowsing,
|
||||
);
|
||||
}
|
||||
if (previous.valueOrNull?.cookieBannerHandlingGlobalRules !=
|
||||
if (previous.value?.cookieBannerHandlingGlobalRules !=
|
||||
settings.cookieBannerHandlingGlobalRules) {
|
||||
await _service.cookieBannerHandlingGlobalRules(
|
||||
settings.cookieBannerHandlingGlobalRules,
|
||||
);
|
||||
}
|
||||
if (previous
|
||||
.valueOrNull
|
||||
?.cookieBannerHandlingGlobalRulesSubFrames !=
|
||||
if (previous.value?.cookieBannerHandlingGlobalRulesSubFrames !=
|
||||
settings.cookieBannerHandlingGlobalRulesSubFrames) {
|
||||
await _service.cookieBannerHandlingGlobalRulesSubFrames(
|
||||
settings.cookieBannerHandlingGlobalRulesSubFrames,
|
||||
);
|
||||
}
|
||||
if (previous.valueOrNull?.webContentIsolationStrategy !=
|
||||
if (previous.value?.webContentIsolationStrategy !=
|
||||
settings.webContentIsolationStrategy) {
|
||||
await _service.webContentIsolationStrategy(
|
||||
settings.webContentIsolationStrategy,
|
||||
);
|
||||
}
|
||||
if (previous.valueOrNull?.contentBlocking !=
|
||||
settings.contentBlocking) {
|
||||
if (previous.value?.contentBlocking != settings.contentBlocking) {
|
||||
await _service.contentBlocking(settings.contentBlocking);
|
||||
}
|
||||
} else {
|
||||
|
||||
+55
-16
@@ -6,22 +6,61 @@ part of 'engine_settings_replication.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$engineSettingsReplicationServiceHash() =>
|
||||
r'be3001c952dac6c7c6be3927f6834dae57280601';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// See also [EngineSettingsReplicationService].
|
||||
@ProviderFor(EngineSettingsReplicationService)
|
||||
final engineSettingsReplicationServiceProvider =
|
||||
NotifierProvider<EngineSettingsReplicationService, void>.internal(
|
||||
EngineSettingsReplicationService.new,
|
||||
name: r'engineSettingsReplicationServiceProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$engineSettingsReplicationServiceHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
const engineSettingsReplicationServiceProvider =
|
||||
EngineSettingsReplicationServiceProvider._();
|
||||
|
||||
typedef _$EngineSettingsReplicationService = Notifier<void>;
|
||||
// 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 class EngineSettingsReplicationServiceProvider
|
||||
extends $NotifierProvider<EngineSettingsReplicationService, void> {
|
||||
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:flutter_mozilla_components/flutter_mozilla_components.dart';
|
||||
import 'package:nullability/nullability.dart';
|
||||
import 'package:riverpod/riverpod.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:weblibre/core/logger.dart';
|
||||
import 'package:weblibre/features/geckoview/features/tabs/domain/providers.dart';
|
||||
@@ -36,7 +37,7 @@ class ProxySettingsReplication extends _$ProxySettingsReplication {
|
||||
void build() {
|
||||
ref.listen(
|
||||
fireImmediately: true,
|
||||
torProxyServiceProvider.select((data) => data.valueOrNull),
|
||||
torProxyServiceProvider.select((data) => data.value),
|
||||
(previous, next) async {
|
||||
if (next != null) {
|
||||
await _service.setProxyPort(next);
|
||||
@@ -54,7 +55,7 @@ class ProxySettingsReplication extends _$ProxySettingsReplication {
|
||||
ref.listen(
|
||||
fireImmediately: true,
|
||||
containersWithCountProvider.select(
|
||||
(value) => EquatableValue(value.valueOrNull),
|
||||
(value) => EquatableValue(value.value),
|
||||
),
|
||||
(previous, next) async {
|
||||
if (next.value != null) {
|
||||
|
||||
+53
-16
@@ -6,22 +6,59 @@ part of 'proxy_settings_replication.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$proxySettingsReplicationHash() =>
|
||||
r'95e68c06df280d11730ec35f0cd93cf2b1e3c02d';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// See also [ProxySettingsReplication].
|
||||
@ProviderFor(ProxySettingsReplication)
|
||||
final proxySettingsReplicationProvider =
|
||||
NotifierProvider<ProxySettingsReplication, void>.internal(
|
||||
ProxySettingsReplication.new,
|
||||
name: r'proxySettingsReplicationProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$proxySettingsReplicationHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
const proxySettingsReplicationProvider = ProxySettingsReplicationProvider._();
|
||||
|
||||
typedef _$ProxySettingsReplication = Notifier<void>;
|
||||
// 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 class ProxySettingsReplicationProvider
|
||||
extends $NotifierProvider<ProxySettingsReplication, void> {
|
||||
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
|
||||
// **************************************************************************
|
||||
|
||||
// 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() =>
|
||||
r'5ce7f385b8aba14d432912cf0acb06aad04433fc';
|
||||
|
||||
/// See also [TabSuggestionsController].
|
||||
@ProviderFor(TabSuggestionsController)
|
||||
final tabSuggestionsControllerProvider =
|
||||
NotifierProvider<TabSuggestionsController, bool>.internal(
|
||||
TabSuggestionsController.new,
|
||||
name: r'tabSuggestionsControllerProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$tabSuggestionsControllerHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$TabSuggestionsController = Notifier<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
|
||||
abstract class _$TabSuggestionsController extends $Notifier<bool> {
|
||||
bool build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final created = build();
|
||||
final ref = this.ref as $Ref<bool, bool>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<bool, bool>,
|
||||
bool,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleValue(ref, created);
|
||||
}
|
||||
}
|
||||
|
||||
+53
-16
@@ -6,22 +6,59 @@ part of 'tree_view.dart';
|
||||
// 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() =>
|
||||
r'1fac2a133d369e3bd3f8f75cdd2d0c862a6ab942';
|
||||
|
||||
/// See also [TreeViewController].
|
||||
@ProviderFor(TreeViewController)
|
||||
final treeViewControllerProvider =
|
||||
NotifierProvider<TreeViewController, bool>.internal(
|
||||
TreeViewController.new,
|
||||
name: r'treeViewControllerProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$treeViewControllerHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$TreeViewController = Notifier<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
|
||||
abstract class _$TreeViewController extends $Notifier<bool> {
|
||||
bool build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final created = build();
|
||||
final ref = this.ref as $Ref<bool, bool>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<bool, bool>,
|
||||
bool,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleValue(ref, created);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ class TabTreeDialog extends HookConsumerWidget {
|
||||
final graph = Graph()..isTree = true;
|
||||
|
||||
if (tabs.hasValue) {
|
||||
for (final MapEntry(:key, :value) in tabs.valueOrNull!.entries) {
|
||||
for (final MapEntry(:key, :value) in tabs.value!.entries) {
|
||||
if (value != null) {
|
||||
final current = Node.Id(key);
|
||||
final parent = Node.Id(value);
|
||||
@@ -113,7 +113,7 @@ class TabTreeDialog extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
return graph;
|
||||
}, [EquatableValue(tabs.valueOrNull), selectedTabId]);
|
||||
}, [EquatableValue(tabs.value), selectedTabId]);
|
||||
|
||||
final graphAlgo = useMemoized(() {
|
||||
final config = BuchheimWalkerConfiguration()
|
||||
@@ -168,7 +168,7 @@ class TabTreeDialog extends HookConsumerWidget {
|
||||
minScale: 0.1,
|
||||
maxScale: 5.0,
|
||||
child: Skeletonizer(
|
||||
enabled: !tabs.hasValue || tabs.valueOrNull?.isEmpty == true,
|
||||
enabled: !tabs.hasValue || tabs.value?.isEmpty == true,
|
||||
child: Skeleton.replace(
|
||||
replacement: const Bone.square(),
|
||||
child: GraphView(
|
||||
|
||||
@@ -180,8 +180,7 @@ class BrowserScreen extends HookConsumerWidget {
|
||||
ref.listen(
|
||||
tabScrollYProvider(tabId, const Duration(milliseconds: 50)),
|
||||
(previous, next) {
|
||||
if (previous?.valueOrNull != null &&
|
||||
next.valueOrNull != null) {
|
||||
if (previous?.value != null && next.value != null) {
|
||||
final diff = previous!.value! - next.value!;
|
||||
if (diff < 0) {
|
||||
if (diffAcc.value > 0) {
|
||||
@@ -279,7 +278,7 @@ class BrowserScreen extends HookConsumerWidget {
|
||||
|
||||
if (tabState?.isFullScreen == true) {
|
||||
await ref
|
||||
.read(selectedTabSessionNotifierProvider)
|
||||
.read(selectedTabSessionProvider)
|
||||
.exitFullscreen();
|
||||
return true;
|
||||
}
|
||||
@@ -288,7 +287,7 @@ class BrowserScreen extends HookConsumerWidget {
|
||||
lastBackButtonPress.value = null;
|
||||
|
||||
final controller = ref.read(
|
||||
selectedTabSessionNotifierProvider,
|
||||
selectedTabSessionProvider,
|
||||
);
|
||||
|
||||
await controller.stopLoading();
|
||||
@@ -305,7 +304,7 @@ class BrowserScreen extends HookConsumerWidget {
|
||||
lastBackButtonPress.value = null;
|
||||
|
||||
final controller = ref.read(
|
||||
selectedTabSessionNotifierProvider,
|
||||
selectedTabSessionProvider,
|
||||
);
|
||||
|
||||
await controller.goBack();
|
||||
|
||||
+2
-2
@@ -72,7 +72,7 @@ class _BrowserViewState extends ConsumerState<BrowserView>
|
||||
|
||||
Future<void> _timerTick(Timer timer) async {
|
||||
await ref
|
||||
.read(selectedTabSessionNotifierProvider)
|
||||
.read(selectedTabSessionProvider)
|
||||
.requestScreenshot(requireImageResult: false)
|
||||
.onError((error, stackTrace) {
|
||||
logger.e(error, stackTrace: stackTrace);
|
||||
@@ -129,7 +129,7 @@ class _BrowserViewState extends ConsumerState<BrowserView>
|
||||
);
|
||||
|
||||
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 (ref.read(addFeedDialogBlockingProvider.notifier).canPush(url)) {
|
||||
await FeedAddRoute($extra: url).push(context);
|
||||
|
||||
+3
-3
@@ -80,7 +80,7 @@ class ViewTabSheetWidget extends HookConsumerWidget {
|
||||
bangListProvider(
|
||||
domain: initialTabState.url.host,
|
||||
orderMostFrequentFirst: true,
|
||||
).select((value) => value.valueOrNull ?? const []),
|
||||
).select((value) => value.value ?? const []),
|
||||
);
|
||||
|
||||
final scrolledTo = useRef(0.0);
|
||||
@@ -306,7 +306,7 @@ class ViewTabSheetWidget extends HookConsumerWidget {
|
||||
final containerId = ref.watch(
|
||||
watchContainerTabIdProvider(
|
||||
initialTabState.id,
|
||||
).select((value) => value.valueOrNull),
|
||||
).select((value) => value.value),
|
||||
);
|
||||
|
||||
return Visibility(
|
||||
@@ -332,7 +332,7 @@ class ViewTabSheetWidget extends HookConsumerWidget {
|
||||
title: const Text('Share screenshot'),
|
||||
onTap: () async {
|
||||
final screenshot = await ref
|
||||
.read(selectedTabSessionNotifierProvider)
|
||||
.read(selectedTabSessionProvider)
|
||||
.requestScreenshot();
|
||||
|
||||
if (screenshot != null) {
|
||||
|
||||
+1
-1
@@ -272,7 +272,7 @@ class _TabSheetHeader extends HookConsumerWidget {
|
||||
builder: (context, ref, child) {
|
||||
final selectedContainer = ref.watch(
|
||||
selectedContainerDataProvider.select(
|
||||
(value) => value.valueOrNull,
|
||||
(value) => value.value,
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
+15
-11
@@ -11,41 +11,44 @@ abstract class _$FindInPageStateCWProxy {
|
||||
|
||||
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
|
||||
/// FindInPageState(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
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 {
|
||||
const _$FindInPageStateCWProxyImpl(this._value);
|
||||
|
||||
final FindInPageState _value;
|
||||
|
||||
@override
|
||||
FindInPageState visible(bool visible) => this(visible: visible);
|
||||
FindInPageState visible(bool visible) => call(visible: visible);
|
||||
|
||||
@override
|
||||
FindInPageState lastSearchText(String? lastSearchText) =>
|
||||
this(lastSearchText: lastSearchText);
|
||||
call(lastSearchText: lastSearchText);
|
||||
|
||||
@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
|
||||
/// FindInPageState(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
FindInPageState call({
|
||||
Object? visible = const $CopyWithPlaceholder(),
|
||||
Object? lastSearchText = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return FindInPageState(
|
||||
visible: visible == const $CopyWithPlaceholder()
|
||||
visible: visible == const $CopyWithPlaceholder() || visible == null
|
||||
? _value.visible
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: visible as bool,
|
||||
@@ -58,7 +61,8 @@ class _$FindInPageStateCWProxyImpl implements _$FindInPageStateCWProxy {
|
||||
}
|
||||
|
||||
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
|
||||
_$FindInPageStateCWProxy get copyWith => _$FindInPageStateCWProxyImpl(this);
|
||||
}
|
||||
|
||||
+75
-128
@@ -6,157 +6,104 @@ part of 'find_in_page.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$findInPageRepositoryHash() =>
|
||||
r'c289f136c27a22978f15668a13d7044eb39c3355';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// 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)
|
||||
const findInPageRepositoryProvider = FindInPageRepositoryFamily();
|
||||
const findInPageRepositoryProvider = FindInPageRepositoryFamily._();
|
||||
|
||||
/// See also [FindInPageRepository].
|
||||
class FindInPageRepositoryFamily extends Family<String?> {
|
||||
/// See also [FindInPageRepository].
|
||||
const FindInPageRepositoryFamily();
|
||||
final class FindInPageRepositoryProvider
|
||||
extends $NotifierProvider<FindInPageRepository, String?> {
|
||||
const FindInPageRepositoryProvider._({
|
||||
required FindInPageRepositoryFamily super.from,
|
||||
required String? super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'findInPageRepositoryProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [FindInPageRepository].
|
||||
FindInPageRepositoryProvider call(String? tabId) {
|
||||
return FindInPageRepositoryProvider(tabId);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$findInPageRepositoryHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'findInPageRepositoryProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
FindInPageRepositoryProvider getProviderOverride(
|
||||
covariant FindInPageRepositoryProvider provider,
|
||||
) {
|
||||
return call(provider.tabId);
|
||||
}
|
||||
FindInPageRepository create() => FindInPageRepository();
|
||||
|
||||
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'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(
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(String? value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
override: FindInPageRepositoryProvider._internal(
|
||||
() => create()..tabId = tabId,
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
tabId: tabId,
|
||||
),
|
||||
providerOverride: $SyncValueProvider<String?>(value),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
NotifierProviderElement<FindInPageRepository, String?> createElement() {
|
||||
return _FindInPageRepositoryProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is FindInPageRepositoryProvider && other.tabId == tabId;
|
||||
return other is FindInPageRepositoryProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, tabId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin FindInPageRepositoryRef on NotifierProviderRef<String?> {
|
||||
/// The parameter `tabId` of this provider.
|
||||
String? get tabId;
|
||||
}
|
||||
String _$findInPageRepositoryHash() =>
|
||||
r'c289f136c27a22978f15668a13d7044eb39c3355';
|
||||
|
||||
class _FindInPageRepositoryProviderElement
|
||||
extends NotifierProviderElement<FindInPageRepository, String?>
|
||||
with FindInPageRepositoryRef {
|
||||
_FindInPageRepositoryProviderElement(super.provider);
|
||||
final class FindInPageRepositoryFamily extends $Family
|
||||
with
|
||||
$ClassFamilyOverride<
|
||||
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
|
||||
String? get tabId => (origin as FindInPageRepositoryProvider).tabId;
|
||||
String toString() => r'findInPageRepositoryProvider';
|
||||
}
|
||||
|
||||
// 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
|
||||
abstract class _$FindInPageRepository extends $Notifier<String?> {
|
||||
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
|
||||
// **************************************************************************
|
||||
|
||||
String _$findInPageControllerHash() =>
|
||||
r'da72e38225809af5c78a372e949a80207d7ce7c9';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// 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)
|
||||
const findInPageControllerProvider = FindInPageControllerFamily();
|
||||
const findInPageControllerProvider = FindInPageControllerFamily._();
|
||||
|
||||
/// See also [FindInPageController].
|
||||
class FindInPageControllerFamily extends Family<FindInPageState> {
|
||||
/// See also [FindInPageController].
|
||||
const FindInPageControllerFamily();
|
||||
final class FindInPageControllerProvider
|
||||
extends $NotifierProvider<FindInPageController, FindInPageState> {
|
||||
const FindInPageControllerProvider._({
|
||||
required FindInPageControllerFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'findInPageControllerProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [FindInPageController].
|
||||
FindInPageControllerProvider call(String tabId) {
|
||||
return FindInPageControllerProvider(tabId);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$findInPageControllerHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'findInPageControllerProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
FindInPageControllerProvider getProviderOverride(
|
||||
covariant FindInPageControllerProvider provider,
|
||||
) {
|
||||
return call(provider.tabId);
|
||||
}
|
||||
FindInPageController create() => FindInPageController();
|
||||
|
||||
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'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(
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(FindInPageState value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
override: FindInPageControllerProvider._internal(
|
||||
() => create()..tabId = tabId,
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
tabId: tabId,
|
||||
),
|
||||
providerOverride: $SyncValueProvider<FindInPageState>(value),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
NotifierProviderElement<FindInPageController, FindInPageState>
|
||||
createElement() {
|
||||
return _FindInPageControllerProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is FindInPageControllerProvider && other.tabId == tabId;
|
||||
return other is FindInPageControllerProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, tabId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin FindInPageControllerRef on NotifierProviderRef<FindInPageState> {
|
||||
/// The parameter `tabId` of this provider.
|
||||
String get tabId;
|
||||
}
|
||||
String _$findInPageControllerHash() =>
|
||||
r'da72e38225809af5c78a372e949a80207d7ce7c9';
|
||||
|
||||
class _FindInPageControllerProviderElement
|
||||
extends NotifierProviderElement<FindInPageController, FindInPageState>
|
||||
with FindInPageControllerRef {
|
||||
_FindInPageControllerProviderElement(super.provider);
|
||||
final class FindInPageControllerFamily extends $Family
|
||||
with
|
||||
$ClassFamilyOverride<
|
||||
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
|
||||
String get tabId => (origin as FindInPageControllerProvider).tabId;
|
||||
String toString() => r'findInPageControllerProvider';
|
||||
}
|
||||
|
||||
// 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
|
||||
abstract class _$FindInPageController extends $Notifier<FindInPageState> {
|
||||
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);
|
||||
|
||||
/// 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
|
||||
/// HistoryFilterOptions(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
HistoryFilterOptions call({
|
||||
DateTimeRange<DateTime>? dateRange,
|
||||
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
|
||||
implements _$HistoryFilterOptionsCWProxy {
|
||||
const _$HistoryFilterOptionsCWProxyImpl(this._value);
|
||||
@@ -32,19 +34,20 @@ class _$HistoryFilterOptionsCWProxyImpl
|
||||
|
||||
@override
|
||||
HistoryFilterOptions dateRange(DateTimeRange<DateTime>? dateRange) =>
|
||||
this(dateRange: dateRange);
|
||||
call(dateRange: dateRange);
|
||||
|
||||
@override
|
||||
HistoryFilterOptions visitTypes(Set<VisitType> visitTypes) =>
|
||||
this(visitTypes: visitTypes);
|
||||
call(visitTypes: visitTypes);
|
||||
|
||||
@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
|
||||
/// HistoryFilterOptions(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
HistoryFilterOptions call({
|
||||
Object? dateRange = const $CopyWithPlaceholder(),
|
||||
Object? visitTypes = const $CopyWithPlaceholder(),
|
||||
@@ -54,7 +57,8 @@ class _$HistoryFilterOptionsCWProxyImpl
|
||||
? _value.dateRange
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: dateRange as DateTimeRange<DateTime>?,
|
||||
visitTypes: visitTypes == const $CopyWithPlaceholder()
|
||||
visitTypes:
|
||||
visitTypes == const $CopyWithPlaceholder() || visitTypes == null
|
||||
? _value.visitTypes
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: visitTypes as Set<VisitType>,
|
||||
@@ -63,7 +67,8 @@ class _$HistoryFilterOptionsCWProxyImpl
|
||||
}
|
||||
|
||||
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
|
||||
_$HistoryFilterOptionsCWProxy get copyWith =>
|
||||
_$HistoryFilterOptionsCWProxyImpl(this);
|
||||
|
||||
@@ -6,39 +6,97 @@ part of 'providers.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$browsingHistoryHash() => r'6447fd4d8209c3befb07f2d82fa41a24bd3accb1';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// See also [browsingHistory].
|
||||
@ProviderFor(browsingHistory)
|
||||
final browsingHistoryProvider =
|
||||
AutoDisposeFutureProvider<List<VisitInfo>>.internal(
|
||||
browsingHistory,
|
||||
name: r'browsingHistoryProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$browsingHistoryHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
@ProviderFor(HistoryFilter)
|
||||
const historyFilterProvider = HistoryFilterProvider._();
|
||||
|
||||
final class HistoryFilterProvider
|
||||
extends $NotifierProvider<HistoryFilter, HistoryFilterOptions> {
|
||||
const HistoryFilterProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: 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';
|
||||
|
||||
/// See also [HistoryFilter].
|
||||
@ProviderFor(HistoryFilter)
|
||||
final historyFilterProvider =
|
||||
NotifierProvider<HistoryFilter, HistoryFilterOptions>.internal(
|
||||
HistoryFilter.new,
|
||||
name: r'historyFilterProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$historyFilterHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
abstract class _$HistoryFilter extends $Notifier<HistoryFilterOptions> {
|
||||
HistoryFilterOptions build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final created = build();
|
||||
final ref = this.ref as $Ref<HistoryFilterOptions, HistoryFilterOptions>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<HistoryFilterOptions, HistoryFilterOptions>,
|
||||
HistoryFilterOptions,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleValue(ref, created);
|
||||
}
|
||||
}
|
||||
|
||||
typedef _$HistoryFilter = Notifier<HistoryFilterOptions>;
|
||||
// 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
|
||||
@ProviderFor(browsingHistory)
|
||||
const browsingHistoryProvider = BrowsingHistoryProvider._();
|
||||
|
||||
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);
|
||||
|
||||
/// 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
|
||||
/// PreferenceSettingGroup(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
PreferenceSettingGroup call({
|
||||
String? description,
|
||||
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
|
||||
implements _$PreferenceSettingGroupCWProxy {
|
||||
const _$PreferenceSettingGroupCWProxyImpl(this._value);
|
||||
@@ -32,19 +34,20 @@ class _$PreferenceSettingGroupCWProxyImpl
|
||||
|
||||
@override
|
||||
PreferenceSettingGroup description(String? description) =>
|
||||
this(description: description);
|
||||
call(description: description);
|
||||
|
||||
@override
|
||||
PreferenceSettingGroup settings(Map<String, PreferenceSetting> settings) =>
|
||||
this(settings: settings);
|
||||
call(settings: settings);
|
||||
|
||||
@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
|
||||
/// PreferenceSettingGroup(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
PreferenceSettingGroup call({
|
||||
Object? description = const $CopyWithPlaceholder(),
|
||||
Object? settings = const $CopyWithPlaceholder(),
|
||||
@@ -54,7 +57,7 @@ class _$PreferenceSettingGroupCWProxyImpl
|
||||
? _value.description
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: description as String?,
|
||||
settings: settings == const $CopyWithPlaceholder()
|
||||
settings: settings == const $CopyWithPlaceholder() || settings == null
|
||||
? _value.settings
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: settings as Map<String, PreferenceSetting>,
|
||||
@@ -63,7 +66,8 @@ class _$PreferenceSettingGroupCWProxyImpl
|
||||
}
|
||||
|
||||
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
|
||||
_$PreferenceSettingGroupCWProxy get copyWith =>
|
||||
_$PreferenceSettingGroupCWProxyImpl(this);
|
||||
@@ -82,12 +86,13 @@ abstract class _$PreferenceSettingCWProxy {
|
||||
|
||||
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
|
||||
/// PreferenceSetting(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
PreferenceSetting call({
|
||||
Object value,
|
||||
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 {
|
||||
const _$PreferenceSettingCWProxyImpl(this._value);
|
||||
|
||||
final PreferenceSetting _value;
|
||||
|
||||
@override
|
||||
PreferenceSetting value(Object value) => this(value: value);
|
||||
PreferenceSetting value(Object value) => call(value: value);
|
||||
|
||||
@override
|
||||
PreferenceSetting title(String? title) => this(title: title);
|
||||
PreferenceSetting title(String? title) => call(title: title);
|
||||
|
||||
@override
|
||||
PreferenceSetting description(String? description) =>
|
||||
this(description: description);
|
||||
call(description: description);
|
||||
|
||||
@override
|
||||
PreferenceSetting actualValue(Object? actualValue) =>
|
||||
this(actualValue: actualValue);
|
||||
call(actualValue: actualValue);
|
||||
|
||||
@override
|
||||
PreferenceSetting requireUserOptIn(bool requireUserOptIn) =>
|
||||
this(requireUserOptIn: requireUserOptIn);
|
||||
call(requireUserOptIn: requireUserOptIn);
|
||||
|
||||
@override
|
||||
PreferenceSetting shouldBeDefault(bool shouldBeDefault) =>
|
||||
this(shouldBeDefault: shouldBeDefault);
|
||||
call(shouldBeDefault: shouldBeDefault);
|
||||
|
||||
@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
|
||||
/// PreferenceSetting(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
PreferenceSetting call({
|
||||
Object? value = const $CopyWithPlaceholder(),
|
||||
Object? title = const $CopyWithPlaceholder(),
|
||||
@@ -142,7 +149,7 @@ class _$PreferenceSettingCWProxyImpl implements _$PreferenceSettingCWProxy {
|
||||
Object? shouldBeDefault = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return PreferenceSetting(
|
||||
value: value == const $CopyWithPlaceholder()
|
||||
value: value == const $CopyWithPlaceholder() || value == null
|
||||
? _value.value
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: value as Object,
|
||||
@@ -158,11 +165,15 @@ class _$PreferenceSettingCWProxyImpl implements _$PreferenceSettingCWProxy {
|
||||
? _value.actualValue
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: actualValue as Object?,
|
||||
requireUserOptIn: requireUserOptIn == const $CopyWithPlaceholder()
|
||||
requireUserOptIn:
|
||||
requireUserOptIn == const $CopyWithPlaceholder() ||
|
||||
requireUserOptIn == null
|
||||
? _value.requireUserOptIn
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: requireUserOptIn as bool,
|
||||
shouldBeDefault: shouldBeDefault == const $CopyWithPlaceholder()
|
||||
shouldBeDefault:
|
||||
shouldBeDefault == const $CopyWithPlaceholder() ||
|
||||
shouldBeDefault == null
|
||||
? _value.shouldBeDefault
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: shouldBeDefault as bool,
|
||||
@@ -171,7 +182,8 @@ class _$PreferenceSettingCWProxyImpl implements _$PreferenceSettingCWProxy {
|
||||
}
|
||||
|
||||
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
|
||||
_$PreferenceSettingCWProxy get copyWith =>
|
||||
_$PreferenceSettingCWProxyImpl(this);
|
||||
|
||||
+426
-594
File diff suppressed because it is too large
Load Diff
@@ -6,41 +6,87 @@ part of 'readerable.dart';
|
||||
// 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';
|
||||
|
||||
/// See also [readerableService].
|
||||
@ProviderFor(readerableService)
|
||||
final readerableServiceProvider = Provider<GeckoReaderableService>.internal(
|
||||
readerableService,
|
||||
name: r'readerableServiceProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$readerableServiceHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
@ProviderFor(appearanceButtonVisibility)
|
||||
const appearanceButtonVisibilityProvider =
|
||||
AppearanceButtonVisibilityProvider._();
|
||||
|
||||
final class AppearanceButtonVisibilityProvider
|
||||
extends $FunctionalProvider<AsyncValue<bool>, bool, Stream<bool>>
|
||||
with $FutureModifier<bool>, $StreamProvider<bool> {
|
||||
const AppearanceButtonVisibilityProvider._()
|
||||
: super(
|
||||
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() =>
|
||||
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
|
||||
// **************************************************************************
|
||||
|
||||
// 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() =>
|
||||
r'62b2167ff8f9fe21c3cf3339e135a50aa684160c';
|
||||
|
||||
/// See also [ReaderableScreenController].
|
||||
@ProviderFor(ReaderableScreenController)
|
||||
final readerableScreenControllerProvider =
|
||||
AsyncNotifierProvider<ReaderableScreenController, void>.internal(
|
||||
ReaderableScreenController.new,
|
||||
name: r'readerableScreenControllerProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$readerableScreenControllerHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$ReaderableScreenController = AsyncNotifier<void>;
|
||||
// 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
|
||||
abstract class _$ReaderableScreenController extends $AsyncNotifier<void> {
|
||||
FutureOr<void> build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
build();
|
||||
final ref = this.ref as $Ref<AsyncValue<void>, void>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<AsyncValue<void>, void>,
|
||||
AsyncValue<void>,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleValue(ref, null);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ class ReaderAppearanceButton extends HookConsumerWidget {
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final buttonVisible = ref.watch(
|
||||
appearanceButtonVisibilityProvider.select(
|
||||
(value) => value.valueOrNull ?? false,
|
||||
(value) => value.value ?? false,
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
+98
-36
@@ -6,44 +6,106 @@ part of 'engine_suggestions.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$engineHistorySuggestionsHash() =>
|
||||
r'7e6c17e6a2df98098ca1a683a438d1c261ccabdf';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// See also [engineHistorySuggestions].
|
||||
@ProviderFor(engineHistorySuggestions)
|
||||
final engineHistorySuggestionsProvider =
|
||||
AutoDisposeProvider<AsyncValue<List<GeckoSuggestion>>>.internal(
|
||||
engineHistorySuggestions,
|
||||
name: r'engineHistorySuggestionsProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$engineHistorySuggestionsHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
@ProviderFor(EngineSuggestions)
|
||||
const engineSuggestionsProvider = EngineSuggestionsProvider._();
|
||||
|
||||
final class EngineSuggestionsProvider
|
||||
extends $StreamNotifierProvider<EngineSuggestions, List<GeckoSuggestion>> {
|
||||
const EngineSuggestionsProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: 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';
|
||||
|
||||
/// See also [EngineSuggestions].
|
||||
@ProviderFor(EngineSuggestions)
|
||||
final engineSuggestionsProvider =
|
||||
AutoDisposeStreamNotifierProvider<
|
||||
EngineSuggestions,
|
||||
List<GeckoSuggestion>
|
||||
>.internal(
|
||||
EngineSuggestions.new,
|
||||
name: r'engineSuggestionsProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$engineSuggestionsHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
abstract class _$EngineSuggestions
|
||||
extends $StreamNotifier<List<GeckoSuggestion>> {
|
||||
Stream<List<GeckoSuggestion>> build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final created = build();
|
||||
final ref =
|
||||
this.ref
|
||||
as $Ref<AsyncValue<List<GeckoSuggestion>>, List<GeckoSuggestion>>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<
|
||||
AsyncValue<List<GeckoSuggestion>>,
|
||||
List<GeckoSuggestion>
|
||||
>,
|
||||
AsyncValue<List<GeckoSuggestion>>,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleValue(ref, created);
|
||||
}
|
||||
}
|
||||
|
||||
typedef _$EngineSuggestions = AutoDisposeStreamNotifier<List<GeckoSuggestion>>;
|
||||
// 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
|
||||
@ProviderFor(engineHistorySuggestions)
|
||||
const engineHistorySuggestionsProvider = EngineHistorySuggestionsProvider._();
|
||||
|
||||
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
|
||||
// **************************************************************************
|
||||
|
||||
// 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() =>
|
||||
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)
|
||||
const searchSuggestionsProvider = SearchSuggestionsFamily();
|
||||
const searchSuggestionsProvider = SearchSuggestionsFamily._();
|
||||
|
||||
/// See also [SearchSuggestions].
|
||||
class SearchSuggestionsFamily extends Family<AsyncValue<List<String>>> {
|
||||
/// See also [SearchSuggestions].
|
||||
const SearchSuggestionsFamily();
|
||||
final class SearchSuggestionsProvider
|
||||
extends $StreamNotifierProvider<SearchSuggestions, List<String>> {
|
||||
const SearchSuggestionsProvider._({
|
||||
required SearchSuggestionsFamily super.from,
|
||||
required ISearchSuggestionProvider? super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'searchSuggestionsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [SearchSuggestions].
|
||||
SearchSuggestionsProvider call({
|
||||
ISearchSuggestionProvider? suggestionsProvider,
|
||||
}) {
|
||||
return SearchSuggestionsProvider(suggestionsProvider: suggestionsProvider);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$searchSuggestionsHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'searchSuggestionsProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
SearchSuggestionsProvider getProviderOverride(
|
||||
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);
|
||||
}
|
||||
SearchSuggestions create() => SearchSuggestions();
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is SearchSuggestionsProvider &&
|
||||
other.suggestionsProvider == suggestionsProvider;
|
||||
return other is SearchSuggestionsProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, suggestionsProvider.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin SearchSuggestionsRef
|
||||
on AutoDisposeStreamNotifierProviderRef<List<String>> {
|
||||
/// The parameter `suggestionsProvider` of this provider.
|
||||
ISearchSuggestionProvider? get suggestionsProvider;
|
||||
}
|
||||
String _$searchSuggestionsHash() => r'8d1fb72cab374491a53f7a814f87af6a26356f42';
|
||||
|
||||
class _SearchSuggestionsProviderElement
|
||||
extends
|
||||
AutoDisposeStreamNotifierProviderElement<
|
||||
final class SearchSuggestionsFamily extends $Family
|
||||
with
|
||||
$ClassFamilyOverride<
|
||||
SearchSuggestions,
|
||||
List<String>
|
||||
>
|
||||
with SearchSuggestionsRef {
|
||||
_SearchSuggestionsProviderElement(super.provider);
|
||||
AsyncValue<List<String>>,
|
||||
List<String>,
|
||||
Stream<List<String>>,
|
||||
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
|
||||
ISearchSuggestionProvider? get suggestionsProvider =>
|
||||
(origin as SearchSuggestionsProvider).suggestionsProvider;
|
||||
String toString() => r'searchSuggestionsProvider';
|
||||
}
|
||||
|
||||
// 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
|
||||
abstract class _$SearchSuggestions extends $StreamNotifier<List<String>> {
|
||||
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
|
||||
// **************************************************************************
|
||||
|
||||
String _$searchSuggestionsRepositoryHash() =>
|
||||
r'be75d075c3479c3d5e462211dec8bbd21b106820';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// 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)
|
||||
const searchSuggestionsRepositoryProvider = SearchSuggestionsRepositoryFamily();
|
||||
const searchSuggestionsRepositoryProvider =
|
||||
SearchSuggestionsRepositoryFamily._();
|
||||
|
||||
/// See also [SearchSuggestionsRepository].
|
||||
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
|
||||
final class SearchSuggestionsRepositoryProvider
|
||||
extends
|
||||
NotifierProviderImpl<
|
||||
$NotifierProvider<
|
||||
SearchSuggestionsRepository,
|
||||
Raw<Stream<List<String>>>
|
||||
> {
|
||||
/// See also [SearchSuggestionsRepository].
|
||||
SearchSuggestionsRepositoryProvider(
|
||||
ISearchSuggestionProvider suggestionsProvider,
|
||||
) : this._internal(
|
||||
() =>
|
||||
SearchSuggestionsRepository()
|
||||
..suggestionsProvider = suggestionsProvider,
|
||||
from: searchSuggestionsRepositoryProvider,
|
||||
name: r'searchSuggestionsRepositoryProvider',
|
||||
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;
|
||||
const SearchSuggestionsRepositoryProvider._({
|
||||
required SearchSuggestionsRepositoryFamily super.from,
|
||||
required ISearchSuggestionProvider super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'searchSuggestionsRepositoryProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
Raw<Stream<List<String>>> runNotifierBuild(
|
||||
covariant SearchSuggestionsRepository notifier,
|
||||
) {
|
||||
return notifier.build(suggestionsProvider);
|
||||
String debugGetCreateSourceHash() => _$searchSuggestionsRepositoryHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'searchSuggestionsRepositoryProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
Override overrideWith(SearchSuggestionsRepository Function() create) {
|
||||
return ProviderOverride(
|
||||
SearchSuggestionsRepository create() => SearchSuggestionsRepository();
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(Raw<Stream<List<String>>> value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
override: SearchSuggestionsRepositoryProvider._internal(
|
||||
() => create()..suggestionsProvider = suggestionsProvider,
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
suggestionsProvider: suggestionsProvider,
|
||||
),
|
||||
providerOverride: $SyncValueProvider<Raw<Stream<List<String>>>>(value),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
NotifierProviderElement<
|
||||
SearchSuggestionsRepository,
|
||||
Raw<Stream<List<String>>>
|
||||
>
|
||||
createElement() {
|
||||
return _SearchSuggestionsRepositoryProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is SearchSuggestionsRepositoryProvider &&
|
||||
other.suggestionsProvider == suggestionsProvider;
|
||||
other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, suggestionsProvider.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin SearchSuggestionsRepositoryRef
|
||||
on NotifierProviderRef<Raw<Stream<List<String>>>> {
|
||||
/// The parameter `suggestionsProvider` of this provider.
|
||||
ISearchSuggestionProvider get suggestionsProvider;
|
||||
}
|
||||
String _$searchSuggestionsRepositoryHash() =>
|
||||
r'be75d075c3479c3d5e462211dec8bbd21b106820';
|
||||
|
||||
class _SearchSuggestionsRepositoryProviderElement
|
||||
extends
|
||||
NotifierProviderElement<
|
||||
final class SearchSuggestionsRepositoryFamily extends $Family
|
||||
with
|
||||
$ClassFamilyOverride<
|
||||
SearchSuggestionsRepository,
|
||||
Raw<Stream<List<String>>>
|
||||
>
|
||||
with SearchSuggestionsRepositoryRef {
|
||||
_SearchSuggestionsRepositoryProviderElement(super.provider);
|
||||
Raw<Stream<List<String>>>,
|
||||
Raw<Stream<List<String>>>,
|
||||
Raw<Stream<List<String>>>,
|
||||
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
|
||||
ISearchSuggestionProvider get suggestionsProvider =>
|
||||
(origin as SearchSuggestionsRepositoryProvider).suggestionsProvider;
|
||||
String toString() => r'searchSuggestionsRepositoryProvider';
|
||||
}
|
||||
|
||||
// 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
|
||||
abstract class _$SearchSuggestionsRepository
|
||||
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 defaultSearchBang = ref.watch(
|
||||
defaultSearchBangDataProvider.select((value) => value.valueOrNull),
|
||||
defaultSearchBangDataProvider.select((value) => value.value),
|
||||
);
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ class FeedSearch extends HookConsumerWidget {
|
||||
);
|
||||
},
|
||||
loading: () => SliverList.builder(
|
||||
itemCount: articlesAsync.valueOrNull?.length ?? 3,
|
||||
itemCount: articlesAsync.value?.length ?? 3,
|
||||
itemBuilder: (context, index) {
|
||||
return const ListTile(title: Bone.text());
|
||||
},
|
||||
|
||||
+2
-2
@@ -69,8 +69,8 @@ class FixedSearchTermSuggestions extends HookConsumerWidget {
|
||||
final prioritizedSuggestions = isSuggestableText
|
||||
? [
|
||||
searchTextController.text,
|
||||
if (searchSuggestions.valueOrNull != null)
|
||||
...searchSuggestions.valueOrNull!
|
||||
if (searchSuggestions.value != null)
|
||||
...searchSuggestions.value!
|
||||
.whereNot(
|
||||
(suggestion) => suggestion == searchTextController.text,
|
||||
)
|
||||
|
||||
+2
-2
@@ -94,8 +94,8 @@ class FullSearchTermSuggestions extends HookConsumerWidget {
|
||||
} else {
|
||||
final prioritizedSuggestions = [
|
||||
if (searchTextIsNotEmpty) searchTextController.text,
|
||||
if (searchSuggestions.valueOrNull != null)
|
||||
...searchSuggestions.valueOrNull!.whereNot(
|
||||
if (searchSuggestions.value != null)
|
||||
...searchSuggestions.value!.whereNot(
|
||||
(suggestion) => suggestion == searchTextController.text,
|
||||
),
|
||||
];
|
||||
|
||||
+2
-2
@@ -55,7 +55,7 @@ class HistorySuggestions extends HookConsumerWidget {
|
||||
});
|
||||
|
||||
if (historySuggestionsAsync.hasValue &&
|
||||
(historySuggestionsAsync.valueOrNull.isEmpty)) {
|
||||
(historySuggestionsAsync.value.isEmpty)) {
|
||||
return const SliverToBoxAdapter(child: SizedBox.shrink());
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ class HistorySuggestions extends HookConsumerWidget {
|
||||
);
|
||||
},
|
||||
loading: () => SliverList.builder(
|
||||
itemCount: historySuggestionsAsync.valueOrNull?.length ?? 3,
|
||||
itemCount: historySuggestionsAsync.value?.length ?? 3,
|
||||
itemBuilder: (context, index) {
|
||||
return const ListTile(title: Bone.text());
|
||||
},
|
||||
|
||||
+1
-3
@@ -49,9 +49,7 @@ class TabSearch extends HookConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final selectedContainer = useState<ContainerData?>(
|
||||
ref.read(
|
||||
selectedContainerDataProvider.select((value) => value.valueOrNull),
|
||||
),
|
||||
ref.read(selectedContainerDataProvider.select((value) => value.value)),
|
||||
);
|
||||
|
||||
final tabs = ref
|
||||
|
||||
@@ -20,14 +20,14 @@
|
||||
import 'dart:ui';
|
||||
|
||||
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/definitions.drift.dart';
|
||||
import 'package:weblibre/features/geckoview/features/tabs/data/models/container_data.dart';
|
||||
|
||||
part 'container.g.dart';
|
||||
|
||||
@DriftAccessor()
|
||||
class ContainerDao extends DatabaseAccessor<TabDatabase>
|
||||
with _$ContainerDaoMixin {
|
||||
with $ContainerDaoMixin {
|
||||
ContainerDao(super.db);
|
||||
|
||||
Future<void> addContainer(ContainerData container) {
|
||||
@@ -99,27 +99,39 @@ class ContainerDao extends DatabaseAccessor<TabDatabase>
|
||||
String? containerId, {
|
||||
int bucket = 0,
|
||||
}) {
|
||||
return db.leadingOrderKey(bucket: bucket, containerId: containerId);
|
||||
return db.definitionsDrift.leadingOrderKey(
|
||||
bucket: bucket,
|
||||
containerId: containerId,
|
||||
);
|
||||
}
|
||||
|
||||
SingleSelectable<String> generateTrailingOrderKey(
|
||||
String? containerId, {
|
||||
int bucket = 0,
|
||||
}) {
|
||||
return db.trailingOrderKey(bucket: bucket, containerId: containerId);
|
||||
return db.definitionsDrift.trailingOrderKey(
|
||||
bucket: bucket,
|
||||
containerId: containerId,
|
||||
);
|
||||
}
|
||||
|
||||
SingleSelectable<String> generateOrderKeyAfterTabId(
|
||||
String? containerId,
|
||||
String tabId,
|
||||
) {
|
||||
return db.orderKeyAfterTab(containerId: containerId, tabId: tabId);
|
||||
return db.definitionsDrift.orderKeyAfterTab(
|
||||
containerId: containerId,
|
||||
tabId: tabId,
|
||||
);
|
||||
}
|
||||
|
||||
SingleSelectable<String> generateOrderKeyBeforeTabId(
|
||||
String? containerId,
|
||||
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:nullability/nullability.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/definitions.drift.dart';
|
||||
import 'package:weblibre/features/geckoview/features/tabs/data/models/tab_query_result.dart';
|
||||
|
||||
part 'tab.g.dart';
|
||||
|
||||
@DriftAccessor()
|
||||
class TabDao extends DatabaseAccessor<TabDatabase> with _$TabDaoMixin {
|
||||
class TabDao extends DatabaseAccessor<TabDatabase> with $TabDaoMixin {
|
||||
final _undoHistory = <String, TabData>{};
|
||||
Timer? _clearHistoryTimer;
|
||||
|
||||
@@ -258,7 +258,7 @@ class TabDao extends DatabaseAccessor<TabDatabase> with _$TabDaoMixin {
|
||||
final ftsQuery = db.buildFtsQuery(searchString);
|
||||
|
||||
if (ftsQuery.isNotEmpty) {
|
||||
return db.queryTabsFullContent(
|
||||
return db.definitionsDrift.queryTabsFullContent(
|
||||
query: ftsQuery,
|
||||
snippetLength: snippetLength,
|
||||
beforeMatch: matchPrefix,
|
||||
@@ -266,7 +266,9 @@ class TabDao extends DatabaseAccessor<TabDatabase> with _$TabDaoMixin {
|
||||
ellipsis: ellipsis,
|
||||
);
|
||||
} 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/>.
|
||||
*/
|
||||
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/tab.dart';
|
||||
import 'package:weblibre/features/geckoview/features/tabs/data/models/container_data.dart';
|
||||
import 'package:weblibre/features/geckoview/features/tabs/data/models/tab_query_result.dart';
|
||||
import 'package:weblibre/features/geckoview/features/tabs/data/database/database.drift.dart';
|
||||
import 'package:weblibre/features/search/domain/fts_tokenizer.dart';
|
||||
|
||||
part 'database.g.dart';
|
||||
|
||||
@DriftDatabase(include: {'database.drift'}, daos: [ContainerDao, TabDao])
|
||||
class TabDatabase extends _$TabDatabase with TrigramQueryBuilderMixin {
|
||||
@DriftDatabase(include: {'definitions.drift'}, daos: [ContainerDao, TabDao])
|
||||
class TabDatabase extends $TabDatabase with TrigramQueryBuilderMixin {
|
||||
@override
|
||||
final int schemaVersion = 2;
|
||||
|
||||
@@ -44,7 +37,7 @@ class TabDatabase extends _$TabDatabase with TrigramQueryBuilderMixin {
|
||||
MigrationStrategy get migration => MigrationStrategy(
|
||||
beforeOpen: (details) async {
|
||||
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
@@ -13,12 +13,13 @@ abstract class _$ContainerAuthSettingsCWProxy {
|
||||
|
||||
ContainerAuthSettings lockTimeout(Duration? lockTimeout);
|
||||
|
||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `ContainerAuthSettings(...).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 `ContainerAuthSettings(...).copyWith.fieldName(value)`.
|
||||
///
|
||||
/// Usage
|
||||
/// Example:
|
||||
/// ```dart
|
||||
/// ContainerAuthSettings(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
ContainerAuthSettings call({
|
||||
bool authenticationRequired,
|
||||
bool lockOnAppBackground,
|
||||
@@ -26,7 +27,8 @@ abstract class _$ContainerAuthSettingsCWProxy {
|
||||
});
|
||||
}
|
||||
|
||||
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfContainerAuthSettings.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfContainerAuthSettings.copyWith.fieldName(...)`
|
||||
/// Callable proxy for `copyWith` functionality.
|
||||
/// Use as `instanceOfContainerAuthSettings.copyWith(...)` or call `instanceOfContainerAuthSettings.copyWith.fieldName(value)` for a single field.
|
||||
class _$ContainerAuthSettingsCWProxyImpl
|
||||
implements _$ContainerAuthSettingsCWProxy {
|
||||
const _$ContainerAuthSettingsCWProxyImpl(this._value);
|
||||
@@ -35,23 +37,24 @@ class _$ContainerAuthSettingsCWProxyImpl
|
||||
|
||||
@override
|
||||
ContainerAuthSettings authenticationRequired(bool authenticationRequired) =>
|
||||
this(authenticationRequired: authenticationRequired);
|
||||
call(authenticationRequired: authenticationRequired);
|
||||
|
||||
@override
|
||||
ContainerAuthSettings lockOnAppBackground(bool lockOnAppBackground) =>
|
||||
this(lockOnAppBackground: lockOnAppBackground);
|
||||
call(lockOnAppBackground: lockOnAppBackground);
|
||||
|
||||
@override
|
||||
ContainerAuthSettings lockTimeout(Duration? lockTimeout) =>
|
||||
this(lockTimeout: lockTimeout);
|
||||
call(lockTimeout: lockTimeout);
|
||||
|
||||
@override
|
||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `ContainerAuthSettings(...).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 `ContainerAuthSettings(...).copyWith.fieldName(value)`.
|
||||
///
|
||||
/// Usage
|
||||
/// Example:
|
||||
/// ```dart
|
||||
/// ContainerAuthSettings(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
ContainerAuthSettings call({
|
||||
Object? authenticationRequired = const $CopyWithPlaceholder(),
|
||||
Object? lockOnAppBackground = const $CopyWithPlaceholder(),
|
||||
@@ -59,11 +62,14 @@ class _$ContainerAuthSettingsCWProxyImpl
|
||||
}) {
|
||||
return ContainerAuthSettings(
|
||||
authenticationRequired:
|
||||
authenticationRequired == const $CopyWithPlaceholder()
|
||||
authenticationRequired == const $CopyWithPlaceholder() ||
|
||||
authenticationRequired == null
|
||||
? _value.authenticationRequired
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: authenticationRequired as bool,
|
||||
lockOnAppBackground: lockOnAppBackground == const $CopyWithPlaceholder()
|
||||
lockOnAppBackground:
|
||||
lockOnAppBackground == const $CopyWithPlaceholder() ||
|
||||
lockOnAppBackground == null
|
||||
? _value.lockOnAppBackground
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: lockOnAppBackground as bool,
|
||||
@@ -76,7 +82,8 @@ class _$ContainerAuthSettingsCWProxyImpl
|
||||
}
|
||||
|
||||
extension $ContainerAuthSettingsCopyWith on ContainerAuthSettings {
|
||||
/// Returns a callable class that can be used as follows: `instanceOfContainerAuthSettings.copyWith(...)` or like so:`instanceOfContainerAuthSettings.copyWith.fieldName(...)`.
|
||||
/// Returns a callable class used to build a new instance with modified fields.
|
||||
/// Example: `instanceOfContainerAuthSettings.copyWith(...)` or `instanceOfContainerAuthSettings.copyWith.fieldName(...)`.
|
||||
// ignore: library_private_types_in_public_api
|
||||
_$ContainerAuthSettingsCWProxy get copyWith =>
|
||||
_$ContainerAuthSettingsCWProxyImpl(this);
|
||||
@@ -91,12 +98,13 @@ abstract class _$ContainerMetadataCWProxy {
|
||||
|
||||
ContainerMetadata useProxy(bool useProxy);
|
||||
|
||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `ContainerMetadata(...).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 `ContainerMetadata(...).copyWith.fieldName(value)`.
|
||||
///
|
||||
/// Usage
|
||||
/// Example:
|
||||
/// ```dart
|
||||
/// ContainerMetadata(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
ContainerMetadata call({
|
||||
IconData? iconData,
|
||||
String? contextualIdentity,
|
||||
@@ -105,33 +113,35 @@ abstract class _$ContainerMetadataCWProxy {
|
||||
});
|
||||
}
|
||||
|
||||
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfContainerMetadata.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfContainerMetadata.copyWith.fieldName(...)`
|
||||
/// Callable proxy for `copyWith` functionality.
|
||||
/// Use as `instanceOfContainerMetadata.copyWith(...)` or call `instanceOfContainerMetadata.copyWith.fieldName(value)` for a single field.
|
||||
class _$ContainerMetadataCWProxyImpl implements _$ContainerMetadataCWProxy {
|
||||
const _$ContainerMetadataCWProxyImpl(this._value);
|
||||
|
||||
final ContainerMetadata _value;
|
||||
|
||||
@override
|
||||
ContainerMetadata iconData(IconData? iconData) => this(iconData: iconData);
|
||||
ContainerMetadata iconData(IconData? iconData) => call(iconData: iconData);
|
||||
|
||||
@override
|
||||
ContainerMetadata contextualIdentity(String? contextualIdentity) =>
|
||||
this(contextualIdentity: contextualIdentity);
|
||||
call(contextualIdentity: contextualIdentity);
|
||||
|
||||
@override
|
||||
ContainerMetadata authSettings(ContainerAuthSettings authSettings) =>
|
||||
this(authSettings: authSettings);
|
||||
call(authSettings: authSettings);
|
||||
|
||||
@override
|
||||
ContainerMetadata useProxy(bool useProxy) => this(useProxy: useProxy);
|
||||
ContainerMetadata useProxy(bool useProxy) => call(useProxy: useProxy);
|
||||
|
||||
@override
|
||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `ContainerMetadata(...).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 `ContainerMetadata(...).copyWith.fieldName(value)`.
|
||||
///
|
||||
/// Usage
|
||||
/// Example:
|
||||
/// ```dart
|
||||
/// ContainerMetadata(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
ContainerMetadata call({
|
||||
Object? iconData = const $CopyWithPlaceholder(),
|
||||
Object? contextualIdentity = const $CopyWithPlaceholder(),
|
||||
@@ -147,11 +157,12 @@ class _$ContainerMetadataCWProxyImpl implements _$ContainerMetadataCWProxy {
|
||||
? _value.contextualIdentity
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: contextualIdentity as String?,
|
||||
authSettings: authSettings == const $CopyWithPlaceholder()
|
||||
authSettings:
|
||||
authSettings == const $CopyWithPlaceholder() || authSettings == null
|
||||
? _value.authSettings
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: authSettings as ContainerAuthSettings,
|
||||
useProxy: useProxy == const $CopyWithPlaceholder()
|
||||
useProxy: useProxy == const $CopyWithPlaceholder() || useProxy == null
|
||||
? _value.useProxy
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: useProxy as bool,
|
||||
@@ -160,7 +171,8 @@ class _$ContainerMetadataCWProxyImpl implements _$ContainerMetadataCWProxy {
|
||||
}
|
||||
|
||||
extension $ContainerMetadataCopyWith on ContainerMetadata {
|
||||
/// Returns a callable class that can be used as follows: `instanceOfContainerMetadata.copyWith(...)` or like so:`instanceOfContainerMetadata.copyWith.fieldName(...)`.
|
||||
/// Returns a callable class used to build a new instance with modified fields.
|
||||
/// Example: `instanceOfContainerMetadata.copyWith(...)` or `instanceOfContainerMetadata.copyWith.fieldName(...)`.
|
||||
// ignore: library_private_types_in_public_api
|
||||
_$ContainerMetadataCWProxy get copyWith =>
|
||||
_$ContainerMetadataCWProxyImpl(this);
|
||||
@@ -175,12 +187,13 @@ abstract class _$ContainerDataCWProxy {
|
||||
|
||||
ContainerData metadata(ContainerMetadata? metadata);
|
||||
|
||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `ContainerData(...).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 `ContainerData(...).copyWith.fieldName(value)`.
|
||||
///
|
||||
/// Usage
|
||||
/// Example:
|
||||
/// ```dart
|
||||
/// ContainerData(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
ContainerData call({
|
||||
String id,
|
||||
String? name,
|
||||
@@ -189,32 +202,34 @@ abstract class _$ContainerDataCWProxy {
|
||||
});
|
||||
}
|
||||
|
||||
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfContainerData.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfContainerData.copyWith.fieldName(...)`
|
||||
/// Callable proxy for `copyWith` functionality.
|
||||
/// Use as `instanceOfContainerData.copyWith(...)` or call `instanceOfContainerData.copyWith.fieldName(value)` for a single field.
|
||||
class _$ContainerDataCWProxyImpl implements _$ContainerDataCWProxy {
|
||||
const _$ContainerDataCWProxyImpl(this._value);
|
||||
|
||||
final ContainerData _value;
|
||||
|
||||
@override
|
||||
ContainerData id(String id) => this(id: id);
|
||||
ContainerData id(String id) => call(id: id);
|
||||
|
||||
@override
|
||||
ContainerData name(String? name) => this(name: name);
|
||||
ContainerData name(String? name) => call(name: name);
|
||||
|
||||
@override
|
||||
ContainerData color(Color color) => this(color: color);
|
||||
ContainerData color(Color color) => call(color: color);
|
||||
|
||||
@override
|
||||
ContainerData metadata(ContainerMetadata? metadata) =>
|
||||
this(metadata: metadata);
|
||||
call(metadata: metadata);
|
||||
|
||||
@override
|
||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `ContainerData(...).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 `ContainerData(...).copyWith.fieldName(value)`.
|
||||
///
|
||||
/// Usage
|
||||
/// Example:
|
||||
/// ```dart
|
||||
/// ContainerData(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
ContainerData call({
|
||||
Object? id = const $CopyWithPlaceholder(),
|
||||
Object? name = const $CopyWithPlaceholder(),
|
||||
@@ -222,7 +237,7 @@ class _$ContainerDataCWProxyImpl implements _$ContainerDataCWProxy {
|
||||
Object? metadata = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return ContainerData(
|
||||
id: id == const $CopyWithPlaceholder()
|
||||
id: id == const $CopyWithPlaceholder() || id == null
|
||||
? _value.id
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: id as String,
|
||||
@@ -230,7 +245,7 @@ class _$ContainerDataCWProxyImpl implements _$ContainerDataCWProxy {
|
||||
? _value.name
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: name as String?,
|
||||
color: color == const $CopyWithPlaceholder()
|
||||
color: color == const $CopyWithPlaceholder() || color == null
|
||||
? _value.color
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: color as Color,
|
||||
@@ -243,7 +258,8 @@ class _$ContainerDataCWProxyImpl implements _$ContainerDataCWProxy {
|
||||
}
|
||||
|
||||
extension $ContainerDataCopyWith on ContainerData {
|
||||
/// Returns a callable class that can be used as follows: `instanceOfContainerData.copyWith(...)` or like so:`instanceOfContainerData.copyWith.fieldName(...)`.
|
||||
/// Returns a callable class used to build a new instance with modified fields.
|
||||
/// Example: `instanceOfContainerData.copyWith(...)` or `instanceOfContainerData.copyWith.fieldName(...)`.
|
||||
// ignore: library_private_types_in_public_api
|
||||
_$ContainerDataCWProxy get copyWith => _$ContainerDataCWProxyImpl(this);
|
||||
}
|
||||
|
||||
@@ -6,22 +6,46 @@ part of 'providers.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$tabDatabaseHash() => r'422bd4789296dc271fabbd5906f2e2ab16bccaa3';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// See also [tabDatabase].
|
||||
@ProviderFor(tabDatabase)
|
||||
final tabDatabaseProvider = Provider<TabDatabase>.internal(
|
||||
tabDatabase,
|
||||
name: r'tabDatabaseProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$tabDatabaseHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
const tabDatabaseProvider = TabDatabaseProvider._();
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef TabDatabaseRef = ProviderRef<TabDatabase>;
|
||||
// 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 class TabDatabaseProvider
|
||||
extends $FunctionalProvider<TabDatabase, TabDatabase, TabDatabase>
|
||||
with $Provider<TabDatabase> {
|
||||
const TabDatabaseProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'tabDatabaseProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$tabDatabaseHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$ProviderElement<TabDatabase> $createElement($ProviderPointer pointer) =>
|
||||
$ProviderElement(pointer);
|
||||
|
||||
@override
|
||||
TabDatabase create(Ref ref) {
|
||||
return tabDatabase(ref);
|
||||
}
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(TabDatabase value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<TabDatabase>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$tabDatabaseHash() => r'422bd4789296dc271fabbd5906f2e2ab16bccaa3';
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
import 'package:nullability/nullability.dart';
|
||||
import 'package:riverpod/riverpod.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.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/entities/container_filter.dart';
|
||||
import 'package:weblibre/features/geckoview/features/tabs/data/models/container_data.dart';
|
||||
import 'package:weblibre/features/geckoview/features/tabs/data/providers.dart';
|
||||
@@ -31,7 +31,7 @@ part 'providers.g.dart';
|
||||
@Riverpod()
|
||||
Stream<List<ContainerDataWithCount>> containersWithCount(Ref ref) {
|
||||
final db = ref.watch(tabDatabaseProvider);
|
||||
return db.containersWithCount().watch();
|
||||
return db.definitionsDrift.containersWithCount().watch();
|
||||
}
|
||||
|
||||
@Riverpod()
|
||||
@@ -78,13 +78,15 @@ Future<int> containerTabCount(Ref ref, ContainerFilter containerFilter) {
|
||||
@Riverpod()
|
||||
Stream<List<TabTreesResult>> tabTrees(Ref ref) {
|
||||
final db = ref.watch(tabDatabaseProvider);
|
||||
return db.tabTrees().watch();
|
||||
return db.definitionsDrift.tabTrees().watch();
|
||||
}
|
||||
|
||||
@Riverpod()
|
||||
Stream<Map<String, String?>> tabDescendants(Ref ref, String tabId) {
|
||||
final db = ref.watch(tabDatabaseProvider);
|
||||
return db.unorderedTabDescendants(tabId: tabId).watch().map((results) {
|
||||
return db.definitionsDrift.unorderedTabDescendants(tabId: tabId).watch().map((
|
||||
results,
|
||||
) {
|
||||
return Map.fromEntries(
|
||||
results.map((pair) => MapEntry(pair.id, pair.parentId)),
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -99,7 +99,7 @@ class SelectedContainer extends _$SelectedContainer {
|
||||
fireImmediately: true,
|
||||
containersWithCountProvider,
|
||||
(previous, next) {
|
||||
if (stateOrNull != null && next.valueOrNull != null) {
|
||||
if (stateOrNull != null && next.value != null) {
|
||||
if (!next.value!.any((container) => container.id == state)) {
|
||||
clearContainer();
|
||||
}
|
||||
|
||||
+132
-50
@@ -6,59 +6,141 @@ part of 'selected_container.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(SelectedContainer)
|
||||
const selectedContainerProvider = SelectedContainerProvider._();
|
||||
|
||||
final class SelectedContainerProvider
|
||||
extends $NotifierProvider<SelectedContainer, String?> {
|
||||
const SelectedContainerProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'selectedContainerProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$selectedContainerHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
SelectedContainer create() => SelectedContainer();
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(String? value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<String?>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$selectedContainerHash() => r'9e9a9b5e3c91ff1fbf8544e329524f8e064587fe';
|
||||
|
||||
abstract class _$SelectedContainer extends $Notifier<String?> {
|
||||
String? build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final created = build();
|
||||
final ref = this.ref as $Ref<String?, String?>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<String?, String?>,
|
||||
String?,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleValue(ref, created);
|
||||
}
|
||||
}
|
||||
|
||||
@ProviderFor(selectedContainerData)
|
||||
const selectedContainerDataProvider = SelectedContainerDataProvider._();
|
||||
|
||||
final class SelectedContainerDataProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<ContainerData?>,
|
||||
ContainerData?,
|
||||
Stream<ContainerData?>
|
||||
>
|
||||
with $FutureModifier<ContainerData?>, $StreamProvider<ContainerData?> {
|
||||
const SelectedContainerDataProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'selectedContainerDataProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$selectedContainerDataHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$StreamProviderElement<ContainerData?> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $StreamProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Stream<ContainerData?> create(Ref ref) {
|
||||
return selectedContainerData(ref);
|
||||
}
|
||||
}
|
||||
|
||||
String _$selectedContainerDataHash() =>
|
||||
r'1ec86a82e1fc4823a867285f05036c903633a165';
|
||||
|
||||
/// See also [selectedContainerData].
|
||||
@ProviderFor(selectedContainerData)
|
||||
final selectedContainerDataProvider =
|
||||
AutoDisposeStreamProvider<ContainerData?>.internal(
|
||||
selectedContainerData,
|
||||
name: r'selectedContainerDataProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$selectedContainerDataHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
@ProviderFor(selectedContainerTabCount)
|
||||
const selectedContainerTabCountProvider = SelectedContainerTabCountProvider._();
|
||||
|
||||
final class SelectedContainerTabCountProvider
|
||||
extends
|
||||
$FunctionalProvider<AsyncValue<int>, AsyncValue<int>, AsyncValue<int>>
|
||||
with $Provider<AsyncValue<int>> {
|
||||
const SelectedContainerTabCountProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'selectedContainerTabCountProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$selectedContainerTabCountHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$ProviderElement<AsyncValue<int>> $createElement($ProviderPointer pointer) =>
|
||||
$ProviderElement(pointer);
|
||||
|
||||
@override
|
||||
AsyncValue<int> create(Ref ref) {
|
||||
return selectedContainerTabCount(ref);
|
||||
}
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(AsyncValue<int> value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<AsyncValue<int>>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef SelectedContainerDataRef = AutoDisposeStreamProviderRef<ContainerData?>;
|
||||
String _$selectedContainerTabCountHash() =>
|
||||
r'0fd457793f7870050f81c54d2fbcc81aca60f394';
|
||||
|
||||
/// See also [selectedContainerTabCount].
|
||||
@ProviderFor(selectedContainerTabCount)
|
||||
final selectedContainerTabCountProvider =
|
||||
AutoDisposeProvider<AsyncValue<int>>.internal(
|
||||
selectedContainerTabCount,
|
||||
name: r'selectedContainerTabCountProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$selectedContainerTabCountHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef SelectedContainerTabCountRef = AutoDisposeProviderRef<AsyncValue<int>>;
|
||||
String _$selectedContainerHash() => r'0441c56a22fd8cab71fec4906d3c22f40553b327';
|
||||
|
||||
/// See also [SelectedContainer].
|
||||
@ProviderFor(SelectedContainer)
|
||||
final selectedContainerProvider =
|
||||
NotifierProvider<SelectedContainer, String?>.internal(
|
||||
SelectedContainer.new,
|
||||
name: r'selectedContainerProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$selectedContainerHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$SelectedContainer = Notifier<String?>;
|
||||
// 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
|
||||
|
||||
@@ -35,7 +35,11 @@ class ContainerRepository extends _$ContainerRepository {
|
||||
}
|
||||
|
||||
Future<List<ContainerDataWithCount>> getAllContainersWithCount() {
|
||||
return ref.read(tabDatabaseProvider).containersWithCount().get();
|
||||
return ref
|
||||
.read(tabDatabaseProvider)
|
||||
.definitionsDrift
|
||||
.containersWithCount()
|
||||
.get();
|
||||
}
|
||||
|
||||
Future<void> replaceContainer(ContainerData container) {
|
||||
|
||||
@@ -6,22 +6,59 @@ part of 'container.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$containerRepositoryHash() =>
|
||||
r'af4ccf6cc12eebae2313df6c8f9ca63db842ffe5';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// See also [ContainerRepository].
|
||||
@ProviderFor(ContainerRepository)
|
||||
final containerRepositoryProvider =
|
||||
NotifierProvider<ContainerRepository, void>.internal(
|
||||
ContainerRepository.new,
|
||||
name: r'containerRepositoryProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$containerRepositoryHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
const containerRepositoryProvider = ContainerRepositoryProvider._();
|
||||
|
||||
typedef _$ContainerRepository = Notifier<void>;
|
||||
// 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 class ContainerRepositoryProvider
|
||||
extends $NotifierProvider<ContainerRepository, void> {
|
||||
const ContainerRepositoryProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'containerRepositoryProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$containerRepositoryHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
ContainerRepository create() => ContainerRepository();
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(void value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<void>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$containerRepositoryHash() =>
|
||||
r'6d84d672e24ac3d2cb376e93cbbe61fc223d89b3';
|
||||
|
||||
abstract class _$ContainerRepository 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);
|
||||
}
|
||||
}
|
||||
|
||||
+188
-274
@@ -6,291 +6,205 @@ part of 'gecko_inference.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$containerTopicHash() => r'b680381eab3dded9ca6f174fbcc5da5c59d7e9f0';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
@ProviderFor(GeckoInferenceRepository)
|
||||
const geckoInferenceRepositoryProvider = GeckoInferenceRepositoryProvider._();
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [containerTopic].
|
||||
@ProviderFor(containerTopic)
|
||||
const containerTopicProvider = ContainerTopicFamily();
|
||||
|
||||
/// See also [containerTopic].
|
||||
class ContainerTopicFamily extends Family<AsyncValue<String?>> {
|
||||
/// See also [containerTopic].
|
||||
const ContainerTopicFamily();
|
||||
|
||||
/// See also [containerTopic].
|
||||
ContainerTopicProvider call(String containerId) {
|
||||
return ContainerTopicProvider(containerId);
|
||||
}
|
||||
|
||||
@override
|
||||
ContainerTopicProvider getProviderOverride(
|
||||
covariant ContainerTopicProvider provider,
|
||||
) {
|
||||
return call(provider.containerId);
|
||||
}
|
||||
|
||||
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'containerTopicProvider';
|
||||
}
|
||||
|
||||
/// See also [containerTopic].
|
||||
class ContainerTopicProvider extends FutureProvider<String?> {
|
||||
/// See also [containerTopic].
|
||||
ContainerTopicProvider(String containerId)
|
||||
: this._internal(
|
||||
(ref) => containerTopic(ref as ContainerTopicRef, containerId),
|
||||
from: containerTopicProvider,
|
||||
name: r'containerTopicProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$containerTopicHash,
|
||||
dependencies: ContainerTopicFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
ContainerTopicFamily._allTransitiveDependencies,
|
||||
containerId: containerId,
|
||||
final class GeckoInferenceRepositoryProvider
|
||||
extends $NotifierProvider<GeckoInferenceRepository, void> {
|
||||
const GeckoInferenceRepositoryProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'geckoInferenceRepositoryProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
ContainerTopicProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.containerId,
|
||||
}) : super.internal();
|
||||
|
||||
final String containerId;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<String?> Function(ContainerTopicRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
String debugGetCreateSourceHash() => _$geckoInferenceRepositoryHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
GeckoInferenceRepository create() => GeckoInferenceRepository();
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(void value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
override: ContainerTopicProvider._internal(
|
||||
(ref) => create(ref as ContainerTopicRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
containerId: containerId,
|
||||
),
|
||||
providerOverride: $SyncValueProvider<void>(value),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
FutureProviderElement<String?> createElement() {
|
||||
return _ContainerTopicProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is ContainerTopicProvider && other.containerId == containerId;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, containerId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin ContainerTopicRef on FutureProviderRef<String?> {
|
||||
/// The parameter `containerId` of this provider.
|
||||
String get containerId;
|
||||
}
|
||||
|
||||
class _ContainerTopicProviderElement extends FutureProviderElement<String?>
|
||||
with ContainerTopicRef {
|
||||
_ContainerTopicProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get containerId => (origin as ContainerTopicProvider).containerId;
|
||||
}
|
||||
|
||||
String _$containerTabSuggestionsHash() =>
|
||||
r'ab8e596f0c7e8562bf998c701145e48eb1e520d5';
|
||||
|
||||
/// See also [containerTabSuggestions].
|
||||
@ProviderFor(containerTabSuggestions)
|
||||
const containerTabSuggestionsProvider = ContainerTabSuggestionsFamily();
|
||||
|
||||
/// See also [containerTabSuggestions].
|
||||
class ContainerTabSuggestionsFamily extends Family<AsyncValue<List<String>?>> {
|
||||
/// See also [containerTabSuggestions].
|
||||
const ContainerTabSuggestionsFamily();
|
||||
|
||||
/// See also [containerTabSuggestions].
|
||||
ContainerTabSuggestionsProvider call(String? containerId) {
|
||||
return ContainerTabSuggestionsProvider(containerId);
|
||||
}
|
||||
|
||||
@override
|
||||
ContainerTabSuggestionsProvider getProviderOverride(
|
||||
covariant ContainerTabSuggestionsProvider provider,
|
||||
) {
|
||||
return call(provider.containerId);
|
||||
}
|
||||
|
||||
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'containerTabSuggestionsProvider';
|
||||
}
|
||||
|
||||
/// See also [containerTabSuggestions].
|
||||
class ContainerTabSuggestionsProvider
|
||||
extends AutoDisposeFutureProvider<List<String>?> {
|
||||
/// See also [containerTabSuggestions].
|
||||
ContainerTabSuggestionsProvider(String? containerId)
|
||||
: this._internal(
|
||||
(ref) => containerTabSuggestions(
|
||||
ref as ContainerTabSuggestionsRef,
|
||||
containerId,
|
||||
),
|
||||
from: containerTabSuggestionsProvider,
|
||||
name: r'containerTabSuggestionsProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$containerTabSuggestionsHash,
|
||||
dependencies: ContainerTabSuggestionsFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
ContainerTabSuggestionsFamily._allTransitiveDependencies,
|
||||
containerId: containerId,
|
||||
);
|
||||
|
||||
ContainerTabSuggestionsProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.containerId,
|
||||
}) : super.internal();
|
||||
|
||||
final String? containerId;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<List<String>?> Function(ContainerTabSuggestionsRef provider)
|
||||
create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: ContainerTabSuggestionsProvider._internal(
|
||||
(ref) => create(ref as ContainerTabSuggestionsRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
containerId: containerId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<List<String>?> createElement() {
|
||||
return _ContainerTabSuggestionsProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is ContainerTabSuggestionsProvider &&
|
||||
other.containerId == containerId;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, containerId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin ContainerTabSuggestionsRef
|
||||
on AutoDisposeFutureProviderRef<List<String>?> {
|
||||
/// The parameter `containerId` of this provider.
|
||||
String? get containerId;
|
||||
}
|
||||
|
||||
class _ContainerTabSuggestionsProviderElement
|
||||
extends AutoDisposeFutureProviderElement<List<String>?>
|
||||
with ContainerTabSuggestionsRef {
|
||||
_ContainerTabSuggestionsProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String? get containerId =>
|
||||
(origin as ContainerTabSuggestionsProvider).containerId;
|
||||
}
|
||||
|
||||
String _$geckoInferenceRepositoryHash() =>
|
||||
r'6099998a3f49fc4faf650878ab4afd6268c593e2';
|
||||
|
||||
/// See also [GeckoInferenceRepository].
|
||||
@ProviderFor(GeckoInferenceRepository)
|
||||
final geckoInferenceRepositoryProvider =
|
||||
NotifierProvider<GeckoInferenceRepository, void>.internal(
|
||||
GeckoInferenceRepository.new,
|
||||
name: r'geckoInferenceRepositoryProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$geckoInferenceRepositoryHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
abstract class _$GeckoInferenceRepository 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);
|
||||
}
|
||||
}
|
||||
|
||||
typedef _$GeckoInferenceRepository = Notifier<void>;
|
||||
// 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
|
||||
@ProviderFor(containerTopic)
|
||||
const containerTopicProvider = ContainerTopicFamily._();
|
||||
|
||||
final class ContainerTopicProvider
|
||||
extends $FunctionalProvider<AsyncValue<String?>, String?, FutureOr<String?>>
|
||||
with $FutureModifier<String?>, $FutureProvider<String?> {
|
||||
const ContainerTopicProvider._({
|
||||
required ContainerTopicFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'containerTopicProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$containerTopicHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'containerTopicProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<String?> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<String?> create(Ref ref) {
|
||||
final argument = this.argument as String;
|
||||
return containerTopic(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is ContainerTopicProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
String _$containerTopicHash() => r'b680381eab3dded9ca6f174fbcc5da5c59d7e9f0';
|
||||
|
||||
final class ContainerTopicFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<String?>, String> {
|
||||
const ContainerTopicFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'containerTopicProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: false,
|
||||
);
|
||||
|
||||
ContainerTopicProvider call(String containerId) =>
|
||||
ContainerTopicProvider._(argument: containerId, from: this);
|
||||
|
||||
@override
|
||||
String toString() => r'containerTopicProvider';
|
||||
}
|
||||
|
||||
@ProviderFor(containerTabSuggestions)
|
||||
const containerTabSuggestionsProvider = ContainerTabSuggestionsFamily._();
|
||||
|
||||
final class ContainerTabSuggestionsProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<List<String>?>,
|
||||
List<String>?,
|
||||
FutureOr<List<String>?>
|
||||
>
|
||||
with $FutureModifier<List<String>?>, $FutureProvider<List<String>?> {
|
||||
const ContainerTabSuggestionsProvider._({
|
||||
required ContainerTabSuggestionsFamily super.from,
|
||||
required String? super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'containerTabSuggestionsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$containerTabSuggestionsHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'containerTabSuggestionsProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<List<String>?> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<List<String>?> create(Ref ref) {
|
||||
final argument = this.argument as String?;
|
||||
return containerTabSuggestions(ref, argument);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is ContainerTabSuggestionsProvider &&
|
||||
other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
String _$containerTabSuggestionsHash() =>
|
||||
r'ab8e596f0c7e8562bf998c701145e48eb1e520d5';
|
||||
|
||||
final class ContainerTabSuggestionsFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<List<String>?>, String?> {
|
||||
const ContainerTabSuggestionsFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'containerTabSuggestionsProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
ContainerTabSuggestionsProvider call(String? containerId) =>
|
||||
ContainerTabSuggestionsProvider._(argument: containerId, from: this);
|
||||
|
||||
@override
|
||||
String toString() => r'containerTabSuggestionsProvider';
|
||||
}
|
||||
|
||||
@@ -6,21 +6,58 @@ part of 'tab.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(TabDataRepository)
|
||||
const tabDataRepositoryProvider = TabDataRepositoryProvider._();
|
||||
|
||||
final class TabDataRepositoryProvider
|
||||
extends $NotifierProvider<TabDataRepository, void> {
|
||||
const TabDataRepositoryProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'tabDataRepositoryProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$tabDataRepositoryHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
TabDataRepository create() => TabDataRepository();
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(void value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<void>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$tabDataRepositoryHash() => r'295c1718ecf41202709517fb2c5b31527e885dfa';
|
||||
|
||||
/// See also [TabDataRepository].
|
||||
@ProviderFor(TabDataRepository)
|
||||
final tabDataRepositoryProvider =
|
||||
NotifierProvider<TabDataRepository, void>.internal(
|
||||
TabDataRepository.new,
|
||||
name: r'tabDataRepositoryProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$tabDataRepositoryHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$TabDataRepository = Notifier<void>;
|
||||
// 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
|
||||
abstract class _$TabDataRepository 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,184 +6,111 @@ part of 'tab_search.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$tabSearchRepositoryHash() =>
|
||||
r'ac2381c692b9caf93f26f302d15e0160c098917a';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// 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 _$TabSearchRepository
|
||||
extends
|
||||
BuildlessAutoDisposeAsyncNotifier<
|
||||
({String query, List<TabQueryResult> results})?
|
||||
> {
|
||||
late final TabSearchPartition partition;
|
||||
|
||||
FutureOr<({String query, List<TabQueryResult> results})?> build(
|
||||
TabSearchPartition partition,
|
||||
);
|
||||
}
|
||||
|
||||
/// See also [TabSearchRepository].
|
||||
@ProviderFor(TabSearchRepository)
|
||||
const tabSearchRepositoryProvider = TabSearchRepositoryFamily();
|
||||
const tabSearchRepositoryProvider = TabSearchRepositoryFamily._();
|
||||
|
||||
/// See also [TabSearchRepository].
|
||||
class TabSearchRepositoryFamily
|
||||
final class TabSearchRepositoryProvider
|
||||
extends
|
||||
Family<AsyncValue<({String query, List<TabQueryResult> results})?>> {
|
||||
/// See also [TabSearchRepository].
|
||||
const TabSearchRepositoryFamily();
|
||||
|
||||
/// See also [TabSearchRepository].
|
||||
TabSearchRepositoryProvider call(TabSearchPartition partition) {
|
||||
return TabSearchRepositoryProvider(partition);
|
||||
}
|
||||
|
||||
@override
|
||||
TabSearchRepositoryProvider getProviderOverride(
|
||||
covariant TabSearchRepositoryProvider provider,
|
||||
) {
|
||||
return call(provider.partition);
|
||||
}
|
||||
|
||||
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'tabSearchRepositoryProvider';
|
||||
}
|
||||
|
||||
/// See also [TabSearchRepository].
|
||||
class TabSearchRepositoryProvider
|
||||
extends
|
||||
AutoDisposeAsyncNotifierProviderImpl<
|
||||
$AsyncNotifierProvider<
|
||||
TabSearchRepository,
|
||||
({String query, List<TabQueryResult> results})?
|
||||
> {
|
||||
/// See also [TabSearchRepository].
|
||||
TabSearchRepositoryProvider(TabSearchPartition partition)
|
||||
: this._internal(
|
||||
() => TabSearchRepository()..partition = partition,
|
||||
from: tabSearchRepositoryProvider,
|
||||
name: r'tabSearchRepositoryProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$tabSearchRepositoryHash,
|
||||
dependencies: TabSearchRepositoryFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
TabSearchRepositoryFamily._allTransitiveDependencies,
|
||||
partition: partition,
|
||||
);
|
||||
|
||||
TabSearchRepositoryProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.partition,
|
||||
}) : super.internal();
|
||||
|
||||
final TabSearchPartition partition;
|
||||
const TabSearchRepositoryProvider._({
|
||||
required TabSearchRepositoryFamily super.from,
|
||||
required TabSearchPartition super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'tabSearchRepositoryProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
FutureOr<({String query, List<TabQueryResult> results})?> runNotifierBuild(
|
||||
covariant TabSearchRepository notifier,
|
||||
) {
|
||||
return notifier.build(partition);
|
||||
}
|
||||
String debugGetCreateSourceHash() => _$tabSearchRepositoryHash();
|
||||
|
||||
@override
|
||||
Override overrideWith(TabSearchRepository Function() create) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: TabSearchRepositoryProvider._internal(
|
||||
() => create()..partition = partition,
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
partition: partition,
|
||||
),
|
||||
);
|
||||
String toString() {
|
||||
return r'tabSearchRepositoryProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
AutoDisposeAsyncNotifierProviderElement<
|
||||
TabSearchRepository,
|
||||
({String query, List<TabQueryResult> results})?
|
||||
>
|
||||
createElement() {
|
||||
return _TabSearchRepositoryProviderElement(this);
|
||||
}
|
||||
TabSearchRepository create() => TabSearchRepository();
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is TabSearchRepositoryProvider && other.partition == partition;
|
||||
return other is TabSearchRepositoryProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, partition.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin TabSearchRepositoryRef
|
||||
on
|
||||
AutoDisposeAsyncNotifierProviderRef<
|
||||
({String query, List<TabQueryResult> results})?
|
||||
> {
|
||||
/// The parameter `partition` of this provider.
|
||||
TabSearchPartition get partition;
|
||||
}
|
||||
String _$tabSearchRepositoryHash() =>
|
||||
r'ac2381c692b9caf93f26f302d15e0160c098917a';
|
||||
|
||||
class _TabSearchRepositoryProviderElement
|
||||
extends
|
||||
AutoDisposeAsyncNotifierProviderElement<
|
||||
final class TabSearchRepositoryFamily extends $Family
|
||||
with
|
||||
$ClassFamilyOverride<
|
||||
TabSearchRepository,
|
||||
({String query, List<TabQueryResult> results})?
|
||||
>
|
||||
with TabSearchRepositoryRef {
|
||||
_TabSearchRepositoryProviderElement(super.provider);
|
||||
AsyncValue<({String query, List<TabQueryResult> results})?>,
|
||||
({String query, List<TabQueryResult> results})?,
|
||||
FutureOr<({String query, List<TabQueryResult> results})?>,
|
||||
TabSearchPartition
|
||||
> {
|
||||
const TabSearchRepositoryFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'tabSearchRepositoryProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
TabSearchRepositoryProvider call(TabSearchPartition partition) =>
|
||||
TabSearchRepositoryProvider._(argument: partition, from: this);
|
||||
|
||||
@override
|
||||
TabSearchPartition get partition =>
|
||||
(origin as TabSearchRepositoryProvider).partition;
|
||||
String toString() => r'tabSearchRepositoryProvider';
|
||||
}
|
||||
|
||||
// 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
|
||||
abstract class _$TabSearchRepository
|
||||
extends $AsyncNotifier<({String query, List<TabQueryResult> results})?> {
|
||||
late final _$args = ref.$arg as TabSearchPartition;
|
||||
TabSearchPartition get partition => _$args;
|
||||
|
||||
FutureOr<({String query, List<TabQueryResult> results})?> build(
|
||||
TabSearchPartition partition,
|
||||
);
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final created = build(_$args);
|
||||
final ref =
|
||||
this.ref
|
||||
as $Ref<
|
||||
AsyncValue<({String query, List<TabQueryResult> results})?>,
|
||||
({String query, List<TabQueryResult> results})?
|
||||
>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<
|
||||
AsyncValue<({String query, List<TabQueryResult> results})?>,
|
||||
({String query, List<TabQueryResult> results})?
|
||||
>,
|
||||
AsyncValue<({String query, List<TabQueryResult> results})?>,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleValue(ref, created);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ class ContainerTopicController extends _$ContainerTopicController {
|
||||
});
|
||||
state = result;
|
||||
|
||||
return result.valueOrNull;
|
||||
return result.value;
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
+53
-19
@@ -6,25 +6,59 @@ part of 'container_topic.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$containerTopicControllerHash() =>
|
||||
r'fa38ebd3c1352b471e58444b04d1cb0528aae1dd';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// See also [ContainerTopicController].
|
||||
@ProviderFor(ContainerTopicController)
|
||||
final containerTopicControllerProvider =
|
||||
AutoDisposeNotifierProvider<
|
||||
ContainerTopicController,
|
||||
AsyncValue<void>
|
||||
>.internal(
|
||||
ContainerTopicController.new,
|
||||
name: r'containerTopicControllerProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$containerTopicControllerHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
const containerTopicControllerProvider = ContainerTopicControllerProvider._();
|
||||
|
||||
typedef _$ContainerTopicController = AutoDisposeNotifier<AsyncValue<void>>;
|
||||
// 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 class ContainerTopicControllerProvider
|
||||
extends $NotifierProvider<ContainerTopicController, AsyncValue<void>> {
|
||||
const ContainerTopicControllerProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'containerTopicControllerProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$containerTopicControllerHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
ContainerTopicController create() => ContainerTopicController();
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(AsyncValue<void> value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<AsyncValue<void>>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$containerTopicControllerHash() =>
|
||||
r'e89fbdaaa9106f163ff00a829eb40752dd4af63a';
|
||||
|
||||
abstract class _$ContainerTopicController extends $Notifier<AsyncValue<void>> {
|
||||
AsyncValue<void> build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final created = build();
|
||||
final ref = this.ref as $Ref<AsyncValue<void>, AsyncValue<void>>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<AsyncValue<void>, AsyncValue<void>>,
|
||||
AsyncValue<void>,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleValue(ref, created);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ class ContainerChips extends HookConsumerWidget {
|
||||
containerTabCountProvider(
|
||||
// ignore: provider_parameters
|
||||
ContainerFilterById(containerId: null),
|
||||
).select((value) => value.valueOrNull ?? 0),
|
||||
).select((value) => value.value ?? 0),
|
||||
);
|
||||
|
||||
return FilterChip(
|
||||
|
||||
@@ -44,7 +44,7 @@ class ContainerTitle extends HookConsumerWidget {
|
||||
containerTabCountProvider(
|
||||
// ignore: provider_parameters
|
||||
ContainerFilterById(containerId: container.id),
|
||||
).select((value) => (value.valueOrNull ?? 0) > 0),
|
||||
).select((value) => (value.value ?? 0) > 0),
|
||||
);
|
||||
|
||||
return topicAsync.when(
|
||||
@@ -73,8 +73,7 @@ class ContainerTitle extends HookConsumerWidget {
|
||||
|
||||
return const Text('Untitled');
|
||||
},
|
||||
loading: () =>
|
||||
Skeletonizer(child: Text(topicAsync.valueOrNull ?? 'container')),
|
||||
loading: () => Skeletonizer(child: Text(topicAsync.value ?? 'container')),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user