You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.7 KiB
Dart
54 lines
1.7 KiB
Dart
class WidgetsConfigModel {
|
|
int? waitingAreaID;
|
|
String? waitingAreaName;
|
|
int? projectID;
|
|
double? projectLatitude;
|
|
double? projectLongitude;
|
|
int? cityKey;
|
|
bool isWeatherReq = false;
|
|
bool isPrayerTimeReq = false;
|
|
bool isRssFeedReq = false;
|
|
|
|
WidgetsConfigModel({
|
|
this.waitingAreaID,
|
|
this.waitingAreaName,
|
|
this.isWeatherReq = false,
|
|
this.isPrayerTimeReq = false,
|
|
this.isRssFeedReq = false,
|
|
this.projectID,
|
|
this.projectLatitude,
|
|
this.projectLongitude,
|
|
this.cityKey,
|
|
});
|
|
|
|
WidgetsConfigModel.fromJson(Map<String, dynamic> json) {
|
|
waitingAreaID = json['waitingAreaID'];
|
|
waitingAreaName = json['waitingAreaName'];
|
|
isRssFeedReq = json['isRssFeedReq'] ?? false;
|
|
isWeatherReq = json['isWeatherReq'] ?? false;
|
|
isPrayerTimeReq = json['isPrayerTimeReq'] ?? false;
|
|
projectID = json['projectID'];
|
|
projectLatitude = json['projectLatitude'];
|
|
projectLongitude = json['projectLongitude'];
|
|
cityKey = json['cityKey'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['waitingAreaID'] = waitingAreaID;
|
|
data['waitingAreaName'] = waitingAreaName;
|
|
data['isWeatherReq'] = isWeatherReq;
|
|
data['isPrayerTimeReq'] = isPrayerTimeReq;
|
|
data['projectID'] = projectID;
|
|
data['projectLatitude'] = projectLatitude;
|
|
data['projectLongitude'] = projectLongitude;
|
|
data['cityKey'] = cityKey;
|
|
return data;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'WidgetsConfigModel{waitingAreaID: $waitingAreaID, waitingAreaName: $waitingAreaName, isWeatherReq: $isWeatherReq, isPrayerTimeReq: $isPrayerTimeReq, projectLatitude: $projectLatitude,projectLongitude: $projectLongitude, cityKey: $cityKey}';
|
|
}
|
|
}
|