Initial commit
This commit is contained in:
35
lib/models/cluster.dart
Normal file
35
lib/models/cluster.dart
Normal file
@@ -0,0 +1,35 @@
|
||||
class Cluster {
|
||||
final int? id;
|
||||
final int? masterId;
|
||||
final String? clusterName;
|
||||
final int? talkgroup;
|
||||
final bool? repeatersOnly;
|
||||
|
||||
Cluster({
|
||||
this.id,
|
||||
this.masterId,
|
||||
this.clusterName,
|
||||
this.talkgroup,
|
||||
this.repeatersOnly,
|
||||
});
|
||||
|
||||
factory Cluster.fromJson(Map<String, dynamic> json) {
|
||||
return Cluster(
|
||||
id: json['id'] as int?,
|
||||
masterId: json['masterId'] as int?,
|
||||
clusterName: json['clusterName'] as String?,
|
||||
talkgroup: json['talkgroup'] as int?,
|
||||
repeatersOnly: json['repeatersOnly'] as bool?,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'id': id,
|
||||
'masterId': masterId,
|
||||
'clusterName': clusterName,
|
||||
'talkgroup': talkgroup,
|
||||
'repeatersOnly': repeatersOnly,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user