27 lines
815 B
Dart
27 lines
815 B
Dart
|
|
import 'package:get/get.dart';
|
|
import 'api_provider_base.dart';
|
|
|
|
class ApiProvider extends BaseProvider {
|
|
|
|
Future<Response> requestForVCode(String email) => post(getVerificationCodeUrl.toUrl, null,query: {
|
|
'email':email,
|
|
});
|
|
|
|
Future<Response> register(String countryCode, String countryId, String mobile, String password, String uniqueid, String verificationCode) => post(registerUrl.toUrl, null,query: {
|
|
'countryCode':countryCode,
|
|
'countryId':countryId,
|
|
"mobile":mobile,
|
|
'password':password,
|
|
'platId':"2",
|
|
"uniqueid":uniqueid,
|
|
'verificationCode':verificationCode,
|
|
});
|
|
|
|
Future<Response> login(String email,String password) => post(loginUrl.toUrl, null,query: {'email':email,'password':password});
|
|
|
|
}
|
|
|
|
extension ExtensionString on String {
|
|
String get toUrl => '$this';
|
|
} |