Ajout fichiers
This commit is contained in:
30
lib/models/agent_model.dart
Normal file
30
lib/models/agent_model.dart
Normal file
@@ -0,0 +1,30 @@
|
||||
import 'dart:convert';
|
||||
|
||||
AgentModel agentModelFromJson(String str) =>
|
||||
AgentModel.fromJson(json.decode(str));
|
||||
|
||||
//String AgentModelToJson(ActivityModel data) => json.encode(data.toJson());
|
||||
|
||||
class AgentModel {
|
||||
AgentModel({
|
||||
this.accountId,
|
||||
this.symbol,
|
||||
this.headquarters,
|
||||
this.credits,
|
||||
this.startingFaction,
|
||||
});
|
||||
|
||||
String? accountId;
|
||||
String? symbol;
|
||||
String? headquarters;
|
||||
int? credits;
|
||||
String? startingFaction;
|
||||
|
||||
factory AgentModel.fromJson(Map<String, dynamic> json) => AgentModel(
|
||||
accountId: json["accountId"],
|
||||
symbol: json["symbol"],
|
||||
headquarters: json["headquarters"],
|
||||
credits: json["credits"],
|
||||
startingFaction: json["startingFaction"],
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user