This commit is contained in:
Hamza-Ayed
2024-03-01 00:23:50 +03:00
parent fbb3fe478c
commit ad062d9ad7
42 changed files with 2478 additions and 1485 deletions

View File

@@ -1,3 +1,4 @@
import 'package:SEFER/views/auth/login_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -11,6 +12,7 @@ import 'package:SEFER/views/widgets/my_scafold.dart';
import 'package:SEFER/views/widgets/my_textField.dart';
import 'package:SEFER/views/widgets/mycircular.dart';
import '../../../controller/auth/login_controller.dart';
import '../../../controller/functions/log_out.dart';
class PassengerProfilePage extends StatelessWidget {
@@ -317,33 +319,51 @@ class CountryPicker extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: [
SizedBox(
height: 300,
child: CupertinoPicker(
itemExtent: 32,
onSelectedItemChanged: (int index) {
controller.setCountry(countryOptions[index]);
},
children: List.generate(
countryOptions.length,
(index) => Center(
child: Text(
countryOptions[index],
style: AppStyle.title,
return GetBuilder<ProfileController>(builder: (controller) {
return Column(
children: [
const SizedBox(
height: 20,
),
Text("Select Your Country".tr),
const SizedBox(
height: 20,
),
Padding(
padding: const EdgeInsets.all(10),
child: Text(
"To ensure you receive the most accurate information for your location, please select your country below. This will help tailor the app experience and content to your country."
.tr),
),
SizedBox(
height: 300,
child: CupertinoPicker(
itemExtent: 32,
onSelectedItemChanged: (int index) {
controller.setCountry(countryOptions[index]);
},
children: List.generate(
countryOptions.length,
(index) => Center(
child: Text(
countryOptions[index],
style: AppStyle.title,
),
),
),
),
),
),
MyElevatedButton(
title: controller.selectedCountry.toString(),
onPressed: () {
box.write(
BoxName.countryCode, controller.selectedCountry.toString());
})
],
);
MyElevatedButton(
title: 'Select Country'.tr,
onPressed: () {
Get.find<LoginController>()
.saveCountryCode(controller.selectedCountry.toString());
box.write(
BoxName.countryCode, controller.selectedCountry.toString());
Get.off(LoginPage());
})
],
);
});
}
}

View File

@@ -9,6 +9,7 @@ import 'package:SEFER/main.dart';
import 'package:SEFER/views/widgets/elevated_btn.dart';
import 'package:SEFER/views/widgets/my_scafold.dart';
import '../../../constant/api_key.dart';
import '../../widgets/my_textField.dart';
class ProfileCaptain extends StatelessWidget {
@@ -32,7 +33,7 @@ class ProfileCaptain extends StatelessWidget {
radius: Get.width * 0.26,
backgroundColor: Colors.white,
backgroundImage: CachedNetworkImageProvider(
"${Env.serverPHP}/card_image/${box.read(BoxName.driverID)}.jpg",
'${AK.serverPHP}/portrate_captain_image/${box.read(BoxName.driverID)}.jpg',
),
),
const SizedBox(height: 8.0),