|
|
|
|
@ -40,141 +40,141 @@ class _SettingOptionsLanguageState extends State<SettingOptionsLanguage> {
|
|
|
|
|
// ?
|
|
|
|
|
Expanded(
|
|
|
|
|
child: ListView(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
|
children: [
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: const Icon(Icons.quickreply_outlined, size: 20),
|
|
|
|
|
titleText: LocaleKeys.requests.tr(),
|
|
|
|
|
needBorderBelow: true,
|
|
|
|
|
onTap: () {
|
|
|
|
|
context.read<DashboardVmCustomer>().onNavbarTapped(4);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
}),
|
|
|
|
|
if (AppState().currentAppType == AppType.customer) ...[
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: const Icon(Icons.favorite, size: 20),
|
|
|
|
|
titleText: LocaleKeys.favoriteList.tr(),
|
|
|
|
|
needBorderBelow: true,
|
|
|
|
|
onTap: () => navigateWithName(context, AppRoutes.favoriteListView),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: const Icon(Icons.settings, size: 20),
|
|
|
|
|
titleText: LocaleKeys.settings.tr(),
|
|
|
|
|
needBorderBelow: true,
|
|
|
|
|
onTap: () {},
|
|
|
|
|
//navigateWithName(context, AppRoutes.settingOptionsInviteFriends),
|
|
|
|
|
),
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: const Icon(Icons.question_mark_outlined, size: 20),
|
|
|
|
|
titleText: LocaleKeys.help.tr(),
|
|
|
|
|
needBorderBelow: true,
|
|
|
|
|
onTap: () => navigateWithName(context, AppRoutes.settingOptionsHelp),
|
|
|
|
|
),
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: const Icon(Icons.person, size: 20),
|
|
|
|
|
titleText: LocaleKeys.account.tr(),
|
|
|
|
|
needBorderBelow: false,
|
|
|
|
|
onTap: () {
|
|
|
|
|
navigateWithName(context, AppRoutes.profileView);
|
|
|
|
|
// context.read<DashboardVmCustomer>().onNavbarTapped(4);
|
|
|
|
|
// Navigator.pop(context);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
).toWhiteContainer(width: double.infinity, pading: const EdgeInsets.all(12), borderRadius: 0),
|
|
|
|
|
10.height,
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: const Icon(Icons.translate, size: 20),
|
|
|
|
|
titleText: LocaleKeys.language.tr(),
|
|
|
|
|
isForLanguage: true,
|
|
|
|
|
onTap: () {
|
|
|
|
|
context.read<UserVM>().changeLanguage(context);
|
|
|
|
|
Future.delayed(Duration(seconds: 1), () {
|
|
|
|
|
setState(() {});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
).toWhiteContainer(width: double.infinity, pading: const EdgeInsets.all(12), borderRadius: 0),
|
|
|
|
|
10.height,
|
|
|
|
|
(AppState().currentAppType == AppType.provider)
|
|
|
|
|
? Column(
|
|
|
|
|
children: [
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: SizedBox(
|
|
|
|
|
width: 16,
|
|
|
|
|
height: 16,
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
MyAssets.icStar,
|
|
|
|
|
color: MyColors.primaryColor,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
titleText: LocaleKeys.mySubscription.tr(),
|
|
|
|
|
subTitle: AppState().getproviderSubscription.first.name ?? "Silver",
|
|
|
|
|
isForLanguage: false,
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: const Icon(Icons.quickreply_outlined, size: 20),
|
|
|
|
|
titleText: LocaleKeys.requests.tr(),
|
|
|
|
|
needBorderBelow: true,
|
|
|
|
|
onTap: () {
|
|
|
|
|
navigateWithName(context, AppRoutes.mySubscriptionsPage);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
context.read<DashboardVmCustomer>().onNavbarTapped(4);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
}),
|
|
|
|
|
if (AppState().currentAppType == AppType.customer) ...[
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: SizedBox(
|
|
|
|
|
width: 16,
|
|
|
|
|
height: 16,
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
MyAssets.icGroupStar,
|
|
|
|
|
// color: MyColors.primaryColor,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
titleText: LocaleKeys.subscriptions.tr(),
|
|
|
|
|
subTitle: null,
|
|
|
|
|
isForLanguage: false,
|
|
|
|
|
leadingWidget: const Icon(Icons.favorite, size: 20),
|
|
|
|
|
titleText: LocaleKeys.favoriteList.tr(),
|
|
|
|
|
needBorderBelow: true,
|
|
|
|
|
onTap: () {
|
|
|
|
|
navigateWithName(context, AppRoutes.subscriptionsPage);
|
|
|
|
|
},
|
|
|
|
|
onTap: () => navigateWithName(context, AppRoutes.favoriteListView),
|
|
|
|
|
),
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: SizedBox(
|
|
|
|
|
width: 16,
|
|
|
|
|
height: 16,
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
MyAssets.icGroupStar,
|
|
|
|
|
// color: MyColors.primaryColor,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
titleText: LocaleKeys.defineLicenses.tr(),
|
|
|
|
|
subTitle: null,
|
|
|
|
|
isForLanguage: false,
|
|
|
|
|
],
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: const Icon(Icons.settings, size: 20),
|
|
|
|
|
titleText: LocaleKeys.settings.tr(),
|
|
|
|
|
needBorderBelow: true,
|
|
|
|
|
onTap: () {},
|
|
|
|
|
//navigateWithName(context, AppRoutes.settingOptionsInviteFriends),
|
|
|
|
|
),
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: const Icon(Icons.question_mark_outlined, size: 20),
|
|
|
|
|
titleText: LocaleKeys.help.tr(),
|
|
|
|
|
needBorderBelow: true,
|
|
|
|
|
onTap: () => navigateWithName(context, AppRoutes.settingOptionsHelp),
|
|
|
|
|
),
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: const Icon(Icons.person, size: 20),
|
|
|
|
|
titleText: LocaleKeys.account.tr(),
|
|
|
|
|
needBorderBelow: false,
|
|
|
|
|
onTap: () {
|
|
|
|
|
navigateWithName(context, AppRoutes.providerLicensePage);
|
|
|
|
|
},
|
|
|
|
|
navigateWithName(context, AppRoutes.profileView);
|
|
|
|
|
// context.read<DashboardVmCustomer>().onNavbarTapped(4);
|
|
|
|
|
// Navigator.pop(context);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
).toWhiteContainer(width: double.infinity, pading: const EdgeInsets.all(12), borderRadius: 0),
|
|
|
|
|
10.height,
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: const Icon(Icons.translate, size: 20),
|
|
|
|
|
titleText: LocaleKeys.language.tr(),
|
|
|
|
|
isForLanguage: true,
|
|
|
|
|
onTap: () {
|
|
|
|
|
context.read<UserVM>().changeLanguage(context);
|
|
|
|
|
Future.delayed(Duration(seconds: 1), () {
|
|
|
|
|
setState(() {});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
).toWhiteContainer(width: double.infinity, pading: const EdgeInsets.all(12), borderRadius: 0),
|
|
|
|
|
10.height,
|
|
|
|
|
(AppState().currentAppType == AppType.provider)
|
|
|
|
|
? Column(
|
|
|
|
|
children: [
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: SizedBox(
|
|
|
|
|
width: 16,
|
|
|
|
|
height: 16,
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
MyAssets.icStar,
|
|
|
|
|
color: MyColors.primaryColor,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// CustomSettingOptionsTile(
|
|
|
|
|
// leadingWidget: SizedBox(
|
|
|
|
|
// width: 16,
|
|
|
|
|
// height: 16,
|
|
|
|
|
// child: SvgPicture.asset(
|
|
|
|
|
// MyAssets.providersIcon,
|
|
|
|
|
// // color: MyColors.primaryColor,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// titleText: "Users",
|
|
|
|
|
// subTitle: null,
|
|
|
|
|
// isForLanguage: false,
|
|
|
|
|
// needBorderBelow: false,
|
|
|
|
|
// onTap: () {
|
|
|
|
|
// navigateWithName(context, AppRoutes.dealerUser, arguments: AppState().getUser.data!.userInfo!.id.toString());
|
|
|
|
|
// },
|
|
|
|
|
// )
|
|
|
|
|
],
|
|
|
|
|
).toWhiteContainer(width: double.infinity, pading: const EdgeInsets.all(12), borderRadius: 0)
|
|
|
|
|
: const SizedBox(),
|
|
|
|
|
(AppState().currentAppType == AppType.provider) ? 10.height : const SizedBox(),
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
titleText: LocaleKeys.mySubscription.tr(),
|
|
|
|
|
subTitle: AppState().getproviderSubscription.first.name,
|
|
|
|
|
isForLanguage: false,
|
|
|
|
|
needBorderBelow: true,
|
|
|
|
|
onTap: () {
|
|
|
|
|
navigateWithName(context, AppRoutes.mySubscriptionsPage);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: SizedBox(
|
|
|
|
|
width: 16,
|
|
|
|
|
height: 16,
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
MyAssets.icGroupStar,
|
|
|
|
|
// color: MyColors.primaryColor,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
titleText: LocaleKeys.subscriptions.tr(),
|
|
|
|
|
subTitle: null,
|
|
|
|
|
isForLanguage: false,
|
|
|
|
|
needBorderBelow: true,
|
|
|
|
|
onTap: () {
|
|
|
|
|
navigateWithName(context, AppRoutes.subscriptionsPage);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
CustomSettingOptionsTile(
|
|
|
|
|
leadingWidget: SizedBox(
|
|
|
|
|
width: 16,
|
|
|
|
|
height: 16,
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
MyAssets.icGroupStar,
|
|
|
|
|
// color: MyColors.primaryColor,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
titleText: LocaleKeys.defineLicenses.tr(),
|
|
|
|
|
subTitle: null,
|
|
|
|
|
isForLanguage: false,
|
|
|
|
|
needBorderBelow: false,
|
|
|
|
|
onTap: () {
|
|
|
|
|
navigateWithName(context, AppRoutes.providerLicensePage);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
// CustomSettingOptionsTile(
|
|
|
|
|
// leadingWidget: SizedBox(
|
|
|
|
|
// width: 16,
|
|
|
|
|
// height: 16,
|
|
|
|
|
// child: SvgPicture.asset(
|
|
|
|
|
// MyAssets.providersIcon,
|
|
|
|
|
// // color: MyColors.primaryColor,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// titleText: "Users",
|
|
|
|
|
// subTitle: null,
|
|
|
|
|
// isForLanguage: false,
|
|
|
|
|
// needBorderBelow: false,
|
|
|
|
|
// onTap: () {
|
|
|
|
|
// navigateWithName(context, AppRoutes.dealerUser, arguments: AppState().getUser.data!.userInfo!.id.toString());
|
|
|
|
|
// },
|
|
|
|
|
// )
|
|
|
|
|
],
|
|
|
|
|
).toWhiteContainer(width: double.infinity, pading: const EdgeInsets.all(12), borderRadius: 0)
|
|
|
|
|
: const SizedBox(),
|
|
|
|
|
(AppState().currentAppType == AppType.provider) ? 10.height : const SizedBox(),
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
// : Expanded(
|
|
|
|
|
// child: ListView(
|
|
|
|
|
// children: [
|
|
|
|
|
|