user_model.dart 536 B

123456789101112131415161718192021
  1. /// Description: user model
  2. /// Time : 02/21/2024 Wednesday
  3. /// Author : liuyuqi.gov@msn.cn
  4. class UserModel {
  5. String username = "";
  6. String password = "";
  7. UserModel({required this.username, required this.password});
  8. UserModel.fromJson(Map<String, dynamic> json) {
  9. username = json['username'];
  10. password = json['password'];
  11. }
  12. Map<String, dynamic> toJson() {
  13. final Map<String, dynamic> data = <String, dynamic>{};
  14. data['username'] = username;
  15. data['password'] = password;
  16. return data;
  17. }
  18. }