-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix #630 Null check operator used on a null value
- Loading branch information
1 parent
dffdf03
commit a53b4f0
Showing
3 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import 'package:dio/dio.dart'; | ||
import 'package:retrofit/retrofit.dart'; | ||
|
||
part 'auth_client.g.dart'; | ||
|
||
@RestApi() | ||
abstract class AuthClient { | ||
factory AuthClient(Dio dio, {String? baseUrl}) = RestClientYmlp; | ||
|
||
@POST('/api/auth/mqttClient/authentication') | ||
Future<Object?> authenticationUsingPost({ | ||
@Body() required RegisterModel submitModel, | ||
}); | ||
} | ||
|
||
class RegisterModel { | ||
const RegisterModel({ | ||
this.channel, | ||
this.mobile, | ||
this.verfiyCode, | ||
}); | ||
|
||
factory RegisterModel.fromJson(Map<String, Object?> json) => RegisterModel( | ||
channel: json['channel'] as String?, | ||
mobile: json['mobile'] as String?, | ||
verfiyCode: json['verfiyCode'] as String?, | ||
); | ||
|
||
final String? channel; | ||
final String? mobile; | ||
final String? verfiyCode; | ||
|
||
Map<String, dynamic> toJson() => <String, dynamic>{ | ||
'channel': channel, | ||
'mobile': mobile, | ||
'verfiyCode': verfiyCode, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters