11/17/1
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/constant/links.dart';
|
||||
import 'package:SEFER/controller/functions/crud.dart';
|
||||
import 'package:SEFER/main.dart';
|
||||
import 'package:SEFER/views/widgets/error_snakbar.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../../constant/colors.dart';
|
||||
@@ -43,20 +44,13 @@ class AssuranceHealthController extends GetxController {
|
||||
|
||||
if (response != 'failure') {
|
||||
// Handle success (e.g., show a success message)
|
||||
print("Health assurance data saved successfully");
|
||||
Get.snackbar(
|
||||
"Success".tr,
|
||||
"You have successfully opted for health insurance.".tr,
|
||||
backgroundColor: AppColor.greenColor,
|
||||
);
|
||||
|
||||
mySnackbarSuccess(
|
||||
"You have successfully opted for health insurance.".tr);
|
||||
} else {
|
||||
// Handle failure (e.g., show an error message)
|
||||
print("Failed to save health assurance data");
|
||||
Get.snackbar(
|
||||
"Error".tr,
|
||||
"Please enter a health insurance status.".tr,
|
||||
backgroundColor: AppColor.redColor,
|
||||
);
|
||||
mySnackeBarError("Please enter a health insurance status.".tr);
|
||||
}
|
||||
} catch (e) {
|
||||
// Handle any errors
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'dart:convert';
|
||||
import 'package:SEFER/constant/links.dart';
|
||||
import 'package:SEFER/controller/functions/crud.dart';
|
||||
import 'package:SEFER/print.dart';
|
||||
import 'package:SEFER/views/widgets/error_snakbar.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:video_player/video_player.dart';
|
||||
|
||||
@@ -57,10 +58,10 @@ class VideoController extends GetxController {
|
||||
// Log.print('videos: ${videos}');
|
||||
update();
|
||||
} else {
|
||||
Get.snackbar('Error'.tr, '');
|
||||
mySnackeBarError('');
|
||||
}
|
||||
} catch (e) {
|
||||
Get.snackbar("Error", e.toString());
|
||||
mySnackeBarError(e.toString());
|
||||
} finally {
|
||||
isLoading(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user