toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  Map<String, dynamic> map = {};

  if (name != null) {
    map['name'] = name;
  }
  if (email != null) {
    map['email'] = email;
  }
  if (password != null) {
    map['password'] = password;
  }
  if (username != null) {
    map['username'] = username;
  }

  return map;
}