simple refact
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
parent
96b20ecc23
commit
aaaadfb19d
@ -101,13 +101,15 @@ class LoginRequest {
|
|||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final Map<String, dynamic> data = <String, dynamic>{};
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
data['username'] = username ?? '';
|
if (username != null) data['username'] = username;
|
||||||
data['password'] = password ?? '';
|
if (password != null) data['password'] = password;
|
||||||
data['id'] = id ?? '';
|
if (id != null) data['id'] = id;
|
||||||
data['uuid'] = uuid ?? '';
|
if (uuid != null) data['uuid'] = uuid;
|
||||||
data['trustThisDevice'] = trustThisDevice ?? '';
|
if (trustThisDevice != null) data['trustThisDevice'] = trustThisDevice;
|
||||||
data['type'] = type ?? '';
|
if (type != null) data['type'] = type;
|
||||||
data['verificationCode'] = verificationCode ?? '';
|
if (verificationCode != null) {
|
||||||
|
data['verificationCode'] = verificationCode;
|
||||||
|
}
|
||||||
data['deviceInfo'] = deviceInfo;
|
data['deviceInfo'] = deviceInfo;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user