This commit is contained in:
Hamza-Ayed
2024-12-08 18:16:31 +03:00
parent 630d0c4afb
commit e0c242bd77
34 changed files with 1876 additions and 1345 deletions

View File

@@ -1,10 +1,8 @@
import 'package:SEFER/controller/home/home_page_controller.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:SEFER/constant/colors.dart';
import 'package:SEFER/constant/style.dart';
import 'package:SEFER/views/lang/languages.dart';
import 'package:SEFER/views/widgets/my_scafold.dart';
import 'HomePage/about_page.dart';
import 'HomePage/frequentlyQuestionsPage.dart';
@@ -18,121 +16,108 @@ class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
Get.put(HomePageController());
return MyScafolld(
isleading: true,
title: 'Home Page'.tr,
body: [
ListView(
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
middle: Text('Home Page'.tr),
leading: CupertinoButton(
padding: EdgeInsets.zero,
child: const Icon(CupertinoIcons.back),
onPressed: () {
Navigator.pop(context);
},
),
),
child: SafeArea(
child: ListView(
children: [
ListTile(
CupertinoListTile(
onTap: () {
Get.to(() => const Language());
},
title: Text(
'Language'.tr,
style: AppStyle.headTitle2,
),
subtitle: Text(
'To change Language the App'.tr,
style: AppStyle.title,
),
trailing: const Icon(
Icons.arrow_forward_ios,
size: 30,
color: AppColor.primaryColor,
),
leading: const Icon(
Icons.language_sharp,
color: AppColor.primaryColor,
),
leading: const Icon(CupertinoIcons.globe,
color: CupertinoColors.activeBlue),
title: Text('Language'.tr),
subtitle: Text('To change Language the App'.tr),
trailing: const CupertinoListTileChevron(),
),
ListTile(
leading: const Icon(Icons.location_city_outlined),
title: Text(
'Change Country'.tr,
style: AppStyle.headTitle2,
),
subtitle: Text(
'You can change the Country to get all features'.tr,
style: AppStyle.title,
),
onTap: () => Get.to(MyScafolld(
title: 'Change Country'.tr,
body: [CountryPickerFromSetting()],
isleading: true)),
),
ListTile(
leading: const Icon(Icons.question_answer),
title: Text(
'Frequently Questions'.tr,
style: AppStyle.headTitle2,
),
subtitle: Text(
'You can change the Country to get all features'.tr,
style: AppStyle.title,
),
onTap: () => Get.to(() => const FrequentlyQuestionsPage()),
),
ListTile(
leading: const Icon(Icons.vibration),
title: GetBuilder<HomePageController>(builder: (controller) {
return SwitchListTile(
title: Text(
'Vibration'.tr,
style: AppStyle.headTitle2,
CupertinoListTile(
onTap: () {
Get.to(CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
middle: Text('Change Country'.tr),
),
value: controller.isVibrate,
onChanged: controller.changeVibrateOption,
activeColor: AppColor.primaryColor,
);
}),
subtitle: Text(
"You can change the vibration feedback for all buttons".tr,
style: AppStyle.title,
),
onTap: () => Get.to(() => const FrequentlyQuestionsPage()),
child: SafeArea(
child: CountryPickerFromSetting(),
),
));
},
leading: const Icon(CupertinoIcons.location,
color: CupertinoColors.activeBlue),
title: Text('Change Country'.tr),
subtitle:
Text('You can change the Country to get all features'.tr),
trailing: const CupertinoListTileChevron(),
),
ListTile(
leading: const Icon(Icons.record_voice_over_outlined),
title: Text(
'Trips recorded'.tr,
style: AppStyle.headTitle2,
),
subtitle: Text(
'Here recorded trips audio'.tr,
style: AppStyle.title,
),
onTap: () async {
Get.to(() => TripsRecordedPage());
}),
ListTile(
leading: const Icon(Icons.account_balance_outlined),
title: Text(
'About Us'.tr,
style: AppStyle.headTitle2,
),
subtitle: Text(
'You can change the Country to get all features'.tr,
style: AppStyle.title,
),
onTap: () => Get.to(() => const AboutPage()),
CupertinoListTile(
onTap: () {
Get.to(() => const FrequentlyQuestionsPage());
},
leading: const Icon(CupertinoIcons.question,
color: CupertinoColors.activeBlue),
title: Text('Frequently Questions'.tr),
subtitle: Text('Find answers to common questions'.tr),
trailing: const CupertinoListTileChevron(),
),
ListTile(
leading: const Icon(Icons.share),
title: Text(
'Share App'.tr,
style: AppStyle.headTitle2,
CupertinoListTile(
leading: const Icon(Icons.vibration,
color: CupertinoColors.activeBlue),
title: Text('Vibration'.tr),
trailing: GetBuilder<HomePageController>(
builder: (controller) {
return CupertinoSwitch(
value: controller.isVibrate,
onChanged: controller.changeVibrateOption,
);
},
),
subtitle: Text(
'You can share the SEFER App with your friends and earn rewards for rides they take using your code'
.tr,
style: AppStyle.title,
),
onTap: () => Get.to(() => ShareAppPage()),
'You can change the vibration feedback for all buttons'.tr),
),
CupertinoListTile(
onTap: () {
Get.to(() => const TripsRecordedPage());
},
leading: const Icon(CupertinoIcons.mic_circle,
color: CupertinoColors.activeBlue),
title: Text('Trips recorded'.tr),
subtitle: Text('Here recorded trips audio'.tr),
trailing: const CupertinoListTileChevron(),
),
CupertinoListTile(
onTap: () {
Get.to(() => const AboutPage());
},
leading: const Icon(CupertinoIcons.info_circle,
color: CupertinoColors.activeBlue),
title: Text('About Us'.tr),
subtitle: Text('Learn more about our app and mission'.tr),
trailing: const CupertinoListTileChevron(),
),
CupertinoListTile(
onTap: () {
Get.to(() => ShareAppPage());
},
leading: const Icon(CupertinoIcons.share,
color: CupertinoColors.activeBlue),
title: Text('Share App'.tr),
subtitle: Text(
'You can share the SEFER App with your friends and earn rewards for rides they take using your code'
.tr),
trailing: const CupertinoListTileChevron(),
),
],
),
],
),
);
}
}