193 lines
5.3 KiB
Dart
193 lines
5.3 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'cart_provider.dart';
|
|
|
|
// **************************************************************************
|
|
// RiverpodGenerator
|
|
// **************************************************************************
|
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// ignore_for_file: type=lint, type=warning
|
|
/// Cart Notifier
|
|
///
|
|
/// Manages cart state with API integration:
|
|
/// - Adding/removing items (syncs with API)
|
|
/// - Updating quantities (syncs with API with 3s debounce)
|
|
/// - Loading cart from API via initialize()
|
|
/// - Local-only operations: selection, warehouse, calculations
|
|
/// - keepAlive: true to maintain cart state across navigation
|
|
|
|
@ProviderFor(Cart)
|
|
const cartProvider = CartProvider._();
|
|
|
|
/// Cart Notifier
|
|
///
|
|
/// Manages cart state with API integration:
|
|
/// - Adding/removing items (syncs with API)
|
|
/// - Updating quantities (syncs with API with 3s debounce)
|
|
/// - Loading cart from API via initialize()
|
|
/// - Local-only operations: selection, warehouse, calculations
|
|
/// - keepAlive: true to maintain cart state across navigation
|
|
final class CartProvider extends $NotifierProvider<Cart, CartState> {
|
|
/// Cart Notifier
|
|
///
|
|
/// Manages cart state with API integration:
|
|
/// - Adding/removing items (syncs with API)
|
|
/// - Updating quantities (syncs with API with 3s debounce)
|
|
/// - Loading cart from API via initialize()
|
|
/// - Local-only operations: selection, warehouse, calculations
|
|
/// - keepAlive: true to maintain cart state across navigation
|
|
const CartProvider._()
|
|
: super(
|
|
from: null,
|
|
argument: null,
|
|
retry: null,
|
|
name: r'cartProvider',
|
|
isAutoDispose: false,
|
|
dependencies: null,
|
|
$allTransitiveDependencies: null,
|
|
);
|
|
|
|
@override
|
|
String debugGetCreateSourceHash() => _$cartHash();
|
|
|
|
@$internal
|
|
@override
|
|
Cart create() => Cart();
|
|
|
|
/// {@macro riverpod.override_with_value}
|
|
Override overrideWithValue(CartState value) {
|
|
return $ProviderOverride(
|
|
origin: this,
|
|
providerOverride: $SyncValueProvider<CartState>(value),
|
|
);
|
|
}
|
|
}
|
|
|
|
String _$cartHash() => r'a12712db833127ef66b75f52cba8376409806afa';
|
|
|
|
/// Cart Notifier
|
|
///
|
|
/// Manages cart state with API integration:
|
|
/// - Adding/removing items (syncs with API)
|
|
/// - Updating quantities (syncs with API with 3s debounce)
|
|
/// - Loading cart from API via initialize()
|
|
/// - Local-only operations: selection, warehouse, calculations
|
|
/// - keepAlive: true to maintain cart state across navigation
|
|
|
|
abstract class _$Cart extends $Notifier<CartState> {
|
|
CartState build();
|
|
@$mustCallSuper
|
|
@override
|
|
void runBuild() {
|
|
final created = build();
|
|
final ref = this.ref as $Ref<CartState, CartState>;
|
|
final element =
|
|
ref.element
|
|
as $ClassProviderElement<
|
|
AnyNotifier<CartState, CartState>,
|
|
CartState,
|
|
Object?,
|
|
Object?
|
|
>;
|
|
element.handleValue(ref, created);
|
|
}
|
|
}
|
|
|
|
/// Cart item count provider
|
|
/// keepAlive: true to persist with cart provider
|
|
|
|
@ProviderFor(cartItemCount)
|
|
const cartItemCountProvider = CartItemCountProvider._();
|
|
|
|
/// Cart item count provider
|
|
/// keepAlive: true to persist with cart provider
|
|
|
|
final class CartItemCountProvider extends $FunctionalProvider<int, int, int>
|
|
with $Provider<int> {
|
|
/// Cart item count provider
|
|
/// keepAlive: true to persist with cart provider
|
|
const CartItemCountProvider._()
|
|
: super(
|
|
from: null,
|
|
argument: null,
|
|
retry: null,
|
|
name: r'cartItemCountProvider',
|
|
isAutoDispose: false,
|
|
dependencies: null,
|
|
$allTransitiveDependencies: null,
|
|
);
|
|
|
|
@override
|
|
String debugGetCreateSourceHash() => _$cartItemCountHash();
|
|
|
|
@$internal
|
|
@override
|
|
$ProviderElement<int> $createElement($ProviderPointer pointer) =>
|
|
$ProviderElement(pointer);
|
|
|
|
@override
|
|
int create(Ref ref) {
|
|
return cartItemCount(ref);
|
|
}
|
|
|
|
/// {@macro riverpod.override_with_value}
|
|
Override overrideWithValue(int value) {
|
|
return $ProviderOverride(
|
|
origin: this,
|
|
providerOverride: $SyncValueProvider<int>(value),
|
|
);
|
|
}
|
|
}
|
|
|
|
String _$cartItemCountHash() => r'35385f5445be6bf66faf58cbbb450cf6196ee4a8';
|
|
|
|
/// Cart total provider
|
|
/// keepAlive: true to persist with cart provider
|
|
|
|
@ProviderFor(cartTotal)
|
|
const cartTotalProvider = CartTotalProvider._();
|
|
|
|
/// Cart total provider
|
|
/// keepAlive: true to persist with cart provider
|
|
|
|
final class CartTotalProvider
|
|
extends $FunctionalProvider<double, double, double>
|
|
with $Provider<double> {
|
|
/// Cart total provider
|
|
/// keepAlive: true to persist with cart provider
|
|
const CartTotalProvider._()
|
|
: super(
|
|
from: null,
|
|
argument: null,
|
|
retry: null,
|
|
name: r'cartTotalProvider',
|
|
isAutoDispose: false,
|
|
dependencies: null,
|
|
$allTransitiveDependencies: null,
|
|
);
|
|
|
|
@override
|
|
String debugGetCreateSourceHash() => _$cartTotalHash();
|
|
|
|
@$internal
|
|
@override
|
|
$ProviderElement<double> $createElement($ProviderPointer pointer) =>
|
|
$ProviderElement(pointer);
|
|
|
|
@override
|
|
double create(Ref ref) {
|
|
return cartTotal(ref);
|
|
}
|
|
|
|
/// {@macro riverpod.override_with_value}
|
|
Override overrideWithValue(double value) {
|
|
return $ProviderOverride(
|
|
origin: this,
|
|
providerOverride: $SyncValueProvider<double>(value),
|
|
);
|
|
}
|
|
}
|
|
|
|
String _$cartTotalHash() => r'027326bae4554031852eaa1348cbc900089f6ec1';
|