Initialize MVVM architecture

This commit is contained in:
Emeline G
2020-08-06 16:25:47 +02:00
parent 4d6ca678fc
commit 8257eadee5
10 changed files with 59 additions and 107 deletions

View File

@@ -1,15 +1,15 @@
import 'package:astronote_app/models/companie.dart';
import 'package:astronote_app/models/company.dart';
class User {
class UserDatas {
String lastname;
List<Companie> companies;
String firstname;
String civilite;
User({this.lastname, this.companies, this.firstname, this.civilite});
UserDatas({this.lastname, this.companies, this.firstname, this.civilite});
User.fromJson(Map<String, dynamic> json) {
UserDatas.fromJson(Map<String, dynamic> json) {
lastname = json['lastname'];
if (json['companies'] != null) {
companies = new List<Companie>();