Customer class abstract
The cart customer
- Available extensions
- Annotations
-
- @freezed
Constructors
- Customer({required String? id, required String? email, required String? phone, required String? firstName, required String? lastName, required String displayName, required MailingAddress? defaultAddress, required dynamic numberOfOrders, required bool? acceptsMarketing})
-
The cart customer constructor
constfactory
-
Customer.fromJson(Map<
String, dynamic> json) -
The cart customer from json
factory
Properties
- acceptsMarketing → bool?
-
no setterinherited
-
copyWith
→ $CustomerCopyWith<
Customer> -
Create a copy of Customer
with the given fields replaced by the non-null parameter values.
no setterinherited
- defaultAddress → MailingAddress?
-
no setterinherited
- displayName → String
-
no setterinherited
- email → String?
-
no setterinherited
- firstName → String?
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
no setterinherited
- lastName → String?
-
no setterinherited
- numberOfOrders → dynamic
-
no setterinherited
- phone → String?
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_Customer value)) → TResult -
Available on Customer, provided by the CustomerPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_Customer value)?) → TResult? -
Available on Customer, provided by the CustomerPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_Customer value)?, {required TResult orElse()}) → TResult -
Available on Customer, provided by the CustomerPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(String? id, String? email, String? phone, String? firstName, String? lastName, String displayName, MailingAddress? defaultAddress, dynamic numberOfOrders, bool? acceptsMarketing)?, {required TResult orElse()}) → TResult -
Available on Customer, provided by the CustomerPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this Customer to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String? id, String? email, String? phone, String? firstName, String? lastName, String displayName, MailingAddress? defaultAddress, dynamic numberOfOrders, bool? acceptsMarketing)) → TResult -
Available on Customer, provided by the CustomerPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String? id, String? email, String? phone, String? firstName, String? lastName, String displayName, MailingAddress? defaultAddress, dynamic numberOfOrders, bool? acceptsMarketing)?) → TResult? -
Available on Customer, provided by the CustomerPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited