LogModel<T extends IBaseModel> class
Properties
-
data
↔ T?
-
getter/setter pair
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
id
↔ LogType
-
getter/setter pair
-
mapData
↔ Map<String, dynamic>?
-
getter/setter pair
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
backgroundConvertToJson([List<LogModel<IBaseModel>>? model])
→ Future<String>
-
You can convert your model to json in background in (with multi thread) such as
String json = await userModel.backgroundConvertToJson();
inherited
-
backgroundJsonParser(String jsonBody)
→ Future
-
You can parse your json in background (multi thread) with this method such as:
UserModel user = await UserModel().backgroundJsonParser(response.body);
inherited
-
convertToJson([dynamic model])
→ String
-
You can convert your model to json such as
String json = userModel.convertToJson();
inherited
-
fromJson(Map<String, dynamic> json)
→ LogModel<IBaseModel>
-
Override this method and convert map (argument) to your class object such as:
@override
UserModel fromJson(Map<String, dynamic> json) => UserModel(
id: json
"id"
,
name: json"name"
,
username: json"username"
,
email: json"email"
,
address: Address.fromJson(json"address"
),
phone: json"phone"
,
website: json"website"
,
company: Company.fromJson(json"company"
),
);
override
-
jsonParser(String jsonBody)
→ dynamic
-
You can parse your json with this method such as:
UserModel user = UserModel().jsonParser(response.body);
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson()
→ Map<String, dynamic>
-
Override this method and Convert your class object to Map such as:
@override
Map<String, dynamic> toJson() => {
"id": id,
"name": name,
"username": username,
"email": email,
"address": address!.toJson(),
"phone": phone,
"website": website,
"company": company!.toJson(),
};
override
-
toString()
→ String
-
A string representation of this object.
inherited