Client class

Client class

Annotations
  • @freezed

Constructors

Client({@Default('') String id, @Default('') @JsonKey(name: 'user_id') String createdById, @Default('') @JsonKey(name: 'assigned_user_id') String assignedToId, @Default(0) @JsonKey(name: 'created_at') int createdAt, @Default(0) @JsonKey(name: 'updated_at') int updatedAt, @Default(0) @JsonKey(name: 'archived_at') int archivedAt, @Default(false) @JsonKey(name: 'is_deleted') bool isDeleted, @Default('') @JsonKey(name: 'custom_value1') String customValue1, @Default('') @JsonKey(name: 'custom_value2') String customValue2, @Default('') @JsonKey(name: 'custom_value3') String customValue3, @Default('') @JsonKey(name: 'custom_value4') String customValue4, @Default('') String name, @Default('') String website, @Default('') @JsonKey(name: 'private_notes') String privateNotes, @Default(0) double balance, @Default('') @JsonKey(name: 'group_settings_id') String groupId, @Default(0) @JsonKey(name: 'paid_to_date') double paidToDate, @Default(0) @JsonKey(name: 'credit_balance') double creditBalance, @Default(0) @JsonKey(name: 'last_login') int lastLogin, @Default('') @JsonKey(name: 'size_id') String sizeId, @Default('') @JsonKey(name: 'public_notes') String publicNotes, @Default('') String phone, @Default('') String address1, @Default('') String address2, @Default('') String city, @Default('') String state, @Default('') @JsonKey(name: 'postal_code') String postalCode, @Default('') @JsonKey(name: 'country_id') String countryId, @Default('') @JsonKey(name: 'industry_id') String industryId, @Default('') @JsonKey(name: 'shipping_address1') String shippingAddress1, @Default('') @JsonKey(name: 'shipping_address2') String shippingAddress2, @Default('') @JsonKey(name: 'shipping_city') String shippingCity, @Default('') @JsonKey(name: 'shipping_state') String shippingState, @Default('') @JsonKey(name: 'shipping_postal_code') String shippingPostalCode, @Default('') @JsonKey(name: 'shipping_country_id') String shippingCountryId, ClientSettings? settings, @Default('') @JsonKey(name: 'id_number') String idNumber, @Default('') @JsonKey(name: 'vat_number') String vatNumber, @Default(<ClientContact>[]) List<ClientContact> contacts, @Default(<Document>[]) List<Document> documents})
Client factory constructor
const
factory
Client.forContact({String firstName = '', String lastName = '', String email = '', String phone = ''})
Create a client using contact details
factory
Client.fromJson(Map<String, dynamic> json)
Create a Client from JSON
factory

Properties

address1 String
no setterinherited
address2 String
no setterinherited
archivedAt int
no setterinherited
assignedToId String
no setterinherited
balance double
no setterinherited
city String
no setterinherited
contacts List<ClientContact>
no setterinherited
copyWith → $ClientCopyWith<Client>
no setterinherited
countryId String
no setterinherited
createdAt int
no setterinherited
createdById String
no setterinherited
creditBalance double
no setterinherited
customValue1 String
no setterinherited
customValue2 String
no setterinherited
customValue3 String
no setterinherited
customValue4 String
no setterinherited
documents List<Document>
no setterinherited
groupId String
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
no setterinherited
idNumber String
no setterinherited
industryId String
no setterinherited
isDeleted bool
no setterinherited
key String
Get the default contact key
no setter
lastLogin int
no setterinherited
name String
no setterinherited
paidToDate double
no setterinherited
phone String
no setterinherited
postalCode String
no setterinherited
privateNotes String
no setterinherited
publicNotes String
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
settings ClientSettings?
no setterinherited
shippingAddress1 String
no setterinherited
shippingAddress2 String
no setterinherited
shippingCity String
no setterinherited
shippingCountryId String
no setterinherited
shippingPostalCode String
no setterinherited
shippingState String
no setterinherited
sizeId String
no setterinherited
state String
no setterinherited
updatedAt int
no setterinherited
vatNumber String
no setterinherited
website String
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited