SHARE
TWEET

Untitled

a guest Dec 14th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Detalhes Diário
  2.  
  3.  
  4. class Resp2{
  5.  
  6.   Aluno aluno;
  7.   Diario diario;
  8.   int get_qtd_faltas;
  9.   Get_serie get_serie;
  10.  
  11.   int id;
  12.  
  13.   String situacao;
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.   Resp2(this.aluno, this.diario, this.get_qtd_faltas, this.get_serie, this.id, this.situacao);
  21.  
  22.   Resp2.fromJson(Map<String, dynamic>json){
  23.     aluno = Aluno.fromJson(json["aluno"]);
  24.     diario = Diario.fromJson(json["diario"]);
  25.     get_qtd_faltas = int.parse(json["get_qtd_faltas"]);
  26.     get_serie = Get_serie.fromJson(json["get_serie"]);
  27.     id = json["id"];
  28.     situacao = json["situacao"];
  29.   }
  30.  
  31.   Map toJson(){
  32.     return {
  33.       "aluno": aluno.toJson(),
  34.       "diario":diario.toJson(),
  35.       "get_qtd_faltas":get_qtd_faltas,
  36.       "get_serie":get_serie.toJson(),
  37.       "id":id,
  38.       "situacao":situacao
  39.     };
  40.   }
  41.  
  42.  
  43.  
  44. }
  45.  
  46.  
  47. class Aluno{
  48.   int id;
  49.   String text;
  50.  
  51.   Aluno(int id, String text){
  52.     this.id = id;
  53.     this.text = text;
  54.  
  55.   }
  56.  
  57.   Aluno.fromJson(Map<String, dynamic>json):
  58.   id = json['id'],
  59.   text = json['text'];
  60.  
  61.   Map<String, dynamic> toJson() =>{'id':id, 'text':text};
  62. }
  63.  
  64. class Diario{
  65.   int id;
  66.   String text;
  67.  
  68.   Diario(int id, String text){
  69.     this.id = id;
  70.     this.text = text;
  71.  
  72.   }
  73.  
  74.   Diario.fromJson(Map<String, dynamic>json):
  75.       id = json['id'],
  76.       text = json['text'];
  77.  
  78.   Map<String, dynamic>toJson() => {'id':id, 'text':text};
  79. }
  80.  
  81. class Get_serie{
  82.   int id;
  83.   String text;
  84.  
  85.   Get_serie(int id, String text){
  86.     this.id = id;
  87.     this.text = text;
  88.   }
  89.  
  90.   Get_serie.fromJson(Map<String,dynamic>json):
  91.       id = json['id'],
  92.       text = json['text'];
  93.  
  94.   Map<String, dynamic> toJson() => {'id':id, 'text':text};
  95. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top