12/24/1
This commit is contained in:
116
lib/views/home/setting_page.dart
Normal file
116
lib/views/home/setting_page.dart
Normal file
@@ -0,0 +1,116 @@
|
||||
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/views/lang/languages.dart';
|
||||
|
||||
import 'HomePage/about_page.dart';
|
||||
import 'HomePage/frequentlyQuestionsPage.dart';
|
||||
import 'HomePage/share_app_page.dart';
|
||||
import 'HomePage/trip_record_page.dart';
|
||||
import 'profile/passenger_profile_page.dart';
|
||||
|
||||
class SettingPage extends StatelessWidget {
|
||||
const SettingPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(HomePageController());
|
||||
return CupertinoPageScaffold(
|
||||
navigationBar: CupertinoNavigationBar(
|
||||
middle: Text('Setting'.tr),
|
||||
leading: CupertinoButton(
|
||||
padding: EdgeInsets.zero,
|
||||
child: const Icon(CupertinoIcons.back),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
),
|
||||
child: SafeArea(
|
||||
child: ListView(
|
||||
children: [
|
||||
CupertinoListTile(
|
||||
onTap: () {
|
||||
Get.to(() => const Language());
|
||||
},
|
||||
leading: const Icon(CupertinoIcons.globe,
|
||||
color: CupertinoColors.activeBlue),
|
||||
title: Text('Language'.tr),
|
||||
subtitle: Text('To change Language the App'.tr),
|
||||
trailing: const CupertinoListTileChevron(),
|
||||
),
|
||||
CupertinoListTile(
|
||||
onTap: () {
|
||||
Get.to(() => 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(),
|
||||
),
|
||||
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(),
|
||||
),
|
||||
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 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(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user