Advertisement
Guest User

Untitled

a guest
Nov 11th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.66 KB | None | 0 0
  1. class User{
  2.  
  3.   int id;
  4.  
  5.   String componente;
  6.   String frequencia;
  7.   String notas;
  8.  
  9.   User(int id, String componente, String frequencia, String notas){
  10.     this.id = id;
  11.     this.componente = componente;
  12.     this.frequencia = frequencia;
  13.     this.notas = notas;
  14.   }
  15.  
  16.   User.fromJson(Map json):
  17.       id = json['id'],
  18.       componente = json['componente'],
  19.       frequencia = json['get_percentual_lancamento_frequencia'],
  20.       notas = json['get_percentual_lancamento_notas'];
  21.  
  22.   Map toJson(){
  23.     return {'id': id, 'componente': componente,'get_percentual_lancamento_frequencia': frequencia,
  24.       'get_percentual_lancamento_notas': notas
  25.     };
  26.   }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement