Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
59 righe
2.0 KiB
59 righe
2.0 KiB
class RootNotification { |
|
late int id; |
|
late NotificheModel notificheModel; |
|
|
|
RootNotification.fromJson(Map<String, dynamic> json) |
|
: this.id = (json['id'] != null ? json['id'] : 0), |
|
this.notificheModel = (json['info'] != null |
|
? NotificheModel.fromJson(json['info']) |
|
: new NotificheModel()); |
|
|
|
Map toJson() => {'id': id, 'info': notificheModel.toJson()}; |
|
} |
|
|
|
class NotificheModel { |
|
late bool sms_skip_title; |
|
late String code; |
|
late String body; |
|
late String start; |
|
late String before_link; |
|
late String end; |
|
|
|
late String disclaimer; |
|
late String link; |
|
late String title; |
|
late int user_logged; |
|
late String weblink; |
|
|
|
NotificheModel() {} |
|
NotificheModel.fromJson(Map<String, dynamic> json) |
|
: this.sms_skip_title = |
|
(json['sms_skip_title'] != null ? json['sms_skip_title'] : 0), |
|
this.code = (json['code'] != null ? json['code'] : ""), |
|
this.body = (json['body'] != null ? json['body'].toString() : ""), |
|
this.start = (json['start'] != null ? json['start'].toString() : ""), |
|
this.before_link = |
|
(json['before_link'] != null ? json['before_link'].toString() : ""), |
|
this.end = (json['end'] != null ? json['end'].toString() : ""), |
|
this.disclaimer = |
|
(json['disclaimer'] != null ? json['disclaimer'].toString() : ""), |
|
this.link = (json['link'] != null ? json['link'].toString() : ""), |
|
this.title = (json['title'] != null ? json['title'] : ""), |
|
this.user_logged = |
|
(json['user_logged'] != null ? json['user_logged'] : ""), |
|
this.weblink = (json['weblink'] != null ? json['weblink'] : ""); |
|
|
|
Map toJson() => { |
|
'sms_skip_title': sms_skip_title, |
|
'code': code, |
|
'body': body, |
|
'start': start, |
|
'before_link': before_link, |
|
'end': end, |
|
'disclaimer': disclaimer, |
|
'link': link, |
|
'title': title, |
|
'user_logged': user_logged, |
|
'weblink': weblink, |
|
}; |
|
}
|
|
|