Update: 2026-07-09 17:18:06
This commit is contained in:
@@ -16,7 +16,7 @@ import 'package:siro_driver/views/widgets/elevated_btn.dart';
|
||||
|
||||
import '../../constant/box_name.dart';
|
||||
import '../../constant/links.dart';
|
||||
import '../auth/captin/register_captin_controller.dart';
|
||||
import '../auth/syria/registration_controller.dart';
|
||||
import 'launch.dart';
|
||||
|
||||
//
|
||||
@@ -466,11 +466,10 @@ class ScanDocumentsByApi extends GetxController {
|
||||
: MyElevatedButton(
|
||||
title: 'Next'.tr,
|
||||
onPressed: () async {
|
||||
RegisterCaptainController registerCaptainController =
|
||||
Get.put(RegisterCaptainController());
|
||||
RegistrationController registrationController =
|
||||
Get.put(RegistrationController());
|
||||
|
||||
await registerCaptainController.register();
|
||||
await registerCaptainController.addLisence();
|
||||
await registrationController.submitRegistration();
|
||||
await uploadImagePortrate();
|
||||
// Get.to(() => CarLicensePage());
|
||||
},
|
||||
@@ -557,10 +556,12 @@ class ScanDocumentsByApi extends GetxController {
|
||||
if (responseString.isNotEmpty) {
|
||||
try {
|
||||
final decoded = jsonDecode(responseString);
|
||||
if (decoded['status'] == 'success' && decoded['message']['file_link'] != null) {
|
||||
if (decoded['status'] == 'success' &&
|
||||
decoded['message']['file_link'] != null) {
|
||||
String rawUrl = decoded['message']['file_link'].toString();
|
||||
String filename = rawUrl.split('/').last;
|
||||
box.write(BoxName.driverPhotoUrl, '${AppLink.server}/portrate_captain_image/$filename');
|
||||
box.write(BoxName.driverPhotoUrl,
|
||||
'${AppLink.server}/portrate_captain_image/$filename');
|
||||
}
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user