loyalty
This commit is contained in:
@@ -0,0 +1,166 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'loyalty_points_provider.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
/// Loyalty Points Provider
|
||||
///
|
||||
/// Manages user's loyalty points balance.
|
||||
/// Currently returns mock data matching the HTML design.
|
||||
|
||||
@ProviderFor(LoyaltyPoints)
|
||||
const loyaltyPointsProvider = LoyaltyPointsProvider._();
|
||||
|
||||
/// Loyalty Points Provider
|
||||
///
|
||||
/// Manages user's loyalty points balance.
|
||||
/// Currently returns mock data matching the HTML design.
|
||||
final class LoyaltyPointsProvider
|
||||
extends $NotifierProvider<LoyaltyPoints, LoyaltyPointsState> {
|
||||
/// Loyalty Points Provider
|
||||
///
|
||||
/// Manages user's loyalty points balance.
|
||||
/// Currently returns mock data matching the HTML design.
|
||||
const LoyaltyPointsProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'loyaltyPointsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$loyaltyPointsHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
LoyaltyPoints create() => LoyaltyPoints();
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(LoyaltyPointsState value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<LoyaltyPointsState>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$loyaltyPointsHash() => r'b1ee61ad335a1c23bf481567a49d15d7f8f0b018';
|
||||
|
||||
/// Loyalty Points Provider
|
||||
///
|
||||
/// Manages user's loyalty points balance.
|
||||
/// Currently returns mock data matching the HTML design.
|
||||
|
||||
abstract class _$LoyaltyPoints extends $Notifier<LoyaltyPointsState> {
|
||||
LoyaltyPointsState build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final created = build();
|
||||
final ref = this.ref as $Ref<LoyaltyPointsState, LoyaltyPointsState>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<LoyaltyPointsState, LoyaltyPointsState>,
|
||||
LoyaltyPointsState,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleValue(ref, created);
|
||||
}
|
||||
}
|
||||
|
||||
/// Provider to check if user has enough points for a specific amount
|
||||
|
||||
@ProviderFor(hasEnoughPoints)
|
||||
const hasEnoughPointsProvider = HasEnoughPointsFamily._();
|
||||
|
||||
/// Provider to check if user has enough points for a specific amount
|
||||
|
||||
final class HasEnoughPointsProvider
|
||||
extends $FunctionalProvider<bool, bool, bool>
|
||||
with $Provider<bool> {
|
||||
/// Provider to check if user has enough points for a specific amount
|
||||
const HasEnoughPointsProvider._({
|
||||
required HasEnoughPointsFamily super.from,
|
||||
required int super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'hasEnoughPointsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$hasEnoughPointsHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'hasEnoughPointsProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$ProviderElement<bool> $createElement($ProviderPointer pointer) =>
|
||||
$ProviderElement(pointer);
|
||||
|
||||
@override
|
||||
bool create(Ref ref) {
|
||||
final argument = this.argument as int;
|
||||
return hasEnoughPoints(ref, argument);
|
||||
}
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(bool value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<bool>(value),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is HasEnoughPointsProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
String _$hasEnoughPointsHash() => r'9034d31521d9eb906fb4cd10dc7fc6bc5e6249bf';
|
||||
|
||||
/// Provider to check if user has enough points for a specific amount
|
||||
|
||||
final class HasEnoughPointsFamily extends $Family
|
||||
with $FunctionalFamilyOverride<bool, int> {
|
||||
const HasEnoughPointsFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'hasEnoughPointsProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
/// Provider to check if user has enough points for a specific amount
|
||||
|
||||
HasEnoughPointsProvider call(int requiredPoints) =>
|
||||
HasEnoughPointsProvider._(argument: requiredPoints, from: this);
|
||||
|
||||
@override
|
||||
String toString() => r'hasEnoughPointsProvider';
|
||||
}
|
||||
Reference in New Issue
Block a user