Profile.dart 839 B

123456789101112131415161718192021222324252627282930
  1. class Profile {
  2. final String id;
  3. final String userName;
  4. final String accessToken;
  5. String organizationCode;
  6. String host;
  7. Profile(
  8. {required this.id,
  9. required this.userName,
  10. required this.accessToken,
  11. required this.organizationCode,
  12. required this.host});
  13. factory Profile.fromJson(Map<String, dynamic> json) {
  14. return Profile(
  15. id: json['id'] as String,
  16. userName: json['userName'] as String,
  17. accessToken: json['accessToken'] as String,
  18. organizationCode: json['organizationCode'] as String,
  19. host: json['host'] as String);
  20. }
  21. Map<String, dynamic> toJson() => {
  22. 'id': id,
  23. "userName": userName,
  24. "accessToken": accessToken,
  25. "organizationCode": organizationCode,
  26. 'host': host
  27. };
  28. }