3/1/1
This commit is contained in:
@@ -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());
|
||||
})
|
||||
],
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user