CustomerNotifier class
Checkout Customer Notifier
Constructors
- CustomerNotifier({required Checkout checkout, required String customerId, required String name})
Properties
- checkout → Checkout
-
final
- customerId → String
-
email address, e.g. FirebaseAuth user email
final
-
debugState
→ AsyncValue<
Customer> -
A development-only way to access
state
outside ofStateNotifier
.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
If a listener has been added using
addListener
and hasn't been removed yet.no setterinherited - mounted → bool
-
Whether
dispose
was called or not.no setterinherited - name → String
-
final
- onError ↔ ErrorListener?
-
A callback for error reporting if one of the listeners added with
addListener
throws.getter/setter pairinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
↔ AsyncValue<
Customer> -
The current "state" of this
StateNotifier
.getter/setter pairinherited -
stream
→ Stream<
AsyncValue< Customer> > -
A broadcast stream representation of a
StateNotifier
.no setterinherited
Methods
-
addInstrument(
{required CreditCard creditCard}) → Future< void> - adds new instrument to the customer for future use
-
addListener(
Listener< AsyncValue< listener, {bool fireImmediately = true}) → RemoveListenerCustomer> > -
Subscribes to this object.
inherited
-
deleteInstrument(
String id) → Future< void> -
deletes customer instrument using
id
-
dispose(
) → void -
Frees all the resources associated to this object.
inherited
-
getCustomerDetails(
String id) → Future< void> -
tries to fetch customer details using
id
, if not found, new customer will be created usingid
as an email address to fetch with it next time. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setInstrumentToDefault(
Instrument instrument) → Future< void> - switch a given instrument to default instrument for the customer
-
toString(
) → String -
A string representation of this object.
inherited
-
updateInstrument(
{required Instrument instrument, required InstrumentRequest instrumentRequest}) → Future< void> -
updates
instrument
expiry date -
updateShouldNotify(
AsyncValue< Customer> old, AsyncValue<Customer> current) → bool -
Whether to notify listeners or not when
state
changesinherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited