Update: 2026-06-25 02:28:33
This commit is contained in:
@@ -11,6 +11,7 @@ import 'package:siro_rider/constant/colors.dart';
|
||||
import 'package:siro_rider/controller/profile/profile_controller.dart';
|
||||
import 'package:siro_rider/main.dart';
|
||||
import 'package:siro_rider/views/widgets/mycircular.dart';
|
||||
import 'package:siro_rider/views/widgets/error_snakbar.dart';
|
||||
|
||||
import '../../../constant/style.dart';
|
||||
import '../../../controller/functions/country_logic.dart';
|
||||
@@ -87,15 +88,7 @@ class _PassengerProfilePageState extends State<PassengerProfilePage> {
|
||||
|
||||
final response = await request.send();
|
||||
if (response.statusCode == 200) {
|
||||
Get.snackbar(
|
||||
'Success'.tr,
|
||||
'Profile photo updated'.tr,
|
||||
backgroundColor: Colors.green.withOpacity(0.9),
|
||||
colorText: Colors.white,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
margin: const EdgeInsets.all(16),
|
||||
borderRadius: 12,
|
||||
);
|
||||
mySnackbarSuccess('Profile photo updated'.tr);
|
||||
} else {
|
||||
_showUploadError();
|
||||
}
|
||||
@@ -107,15 +100,7 @@ class _PassengerProfilePageState extends State<PassengerProfilePage> {
|
||||
}
|
||||
|
||||
void _showUploadError() {
|
||||
Get.snackbar(
|
||||
'Error'.tr,
|
||||
'Failed to upload photo'.tr,
|
||||
backgroundColor: Colors.red.withOpacity(0.9),
|
||||
colorText: Colors.white,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
margin: const EdgeInsets.all(16),
|
||||
borderRadius: 12,
|
||||
);
|
||||
mySnackeBarError('Failed to upload photo'.tr);
|
||||
}
|
||||
|
||||
Future<ImageSource?> _showImageSourceSheet() async {
|
||||
|
||||
Reference in New Issue
Block a user