migration done
This commit is contained in:
+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';
|
||||
|
||||
Reference in New Issue
Block a user