11/25/1
This commit is contained in:
@@ -12,7 +12,7 @@ import 'package:ride/views/auth/captin/verify_email_captain.dart';
|
||||
import '../../../views/auth/captin/ai_page.dart';
|
||||
import '../../../views/auth/verify_email_page.dart';
|
||||
|
||||
class RegisterCaptinController extends GetxController {
|
||||
class RegisterCaptainController extends GetxController {
|
||||
final formKey = GlobalKey<FormState>();
|
||||
|
||||
TextEditingController emailController = TextEditingController();
|
||||
@@ -125,6 +125,27 @@ class RegisterCaptinController extends GetxController {
|
||||
}
|
||||
}
|
||||
|
||||
void addRegisrationCarForDriver(String vin, make, model, year, color, owner,
|
||||
expirationDate, registrationDate) async {
|
||||
getFromController();
|
||||
var res = await CRUD().post(link: AppLink.addRegisrationCar, payload: {
|
||||
'vin': vin,
|
||||
'make': make,
|
||||
'model': model,
|
||||
'year': year,
|
||||
'expirationDate': expirationDate,
|
||||
'color': color,
|
||||
'owner': owner,
|
||||
'registrationDate': registrationDate,
|
||||
});
|
||||
print(jsonDecode(res));
|
||||
isLoading = false;
|
||||
update();
|
||||
if (jsonDecode(res)['status'] == 'success') {
|
||||
// Get.to(() => AiPage()); //todo replace this
|
||||
}
|
||||
}
|
||||
|
||||
void register() async {
|
||||
getFromController();
|
||||
if (formKey.currentState!.validate()) {
|
||||
|
||||
Reference in New Issue
Block a user