fix localization and UI updates
parent
d9a2dd4fcb
commit
885b922a41
@ -1,109 +1,109 @@
|
|||||||
import 'package:car_provider_app/config/provider_routes.dart';
|
// import 'package:car_provider_app/config/provider_routes.dart';
|
||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
import 'package:mc_common_app/classes/consts.dart';
|
// import 'package:mc_common_app/classes/consts.dart';
|
||||||
import 'package:mc_common_app/config/routes.dart';
|
// import 'package:mc_common_app/config/routes.dart';
|
||||||
import 'package:mc_common_app/extensions/int_extensions.dart';
|
// import 'package:mc_common_app/extensions/int_extensions.dart';
|
||||||
import 'package:mc_common_app/extensions/string_extensions.dart';
|
// import 'package:mc_common_app/extensions/string_extensions.dart';
|
||||||
import 'package:mc_common_app/generated/locale_keys.g.dart';
|
// import 'package:mc_common_app/generated/locale_keys.g.dart';
|
||||||
import 'package:mc_common_app/theme/colors.dart';
|
// import 'package:mc_common_app/theme/colors.dart';
|
||||||
import 'package:mc_common_app/utils/navigator.dart';
|
// import 'package:mc_common_app/utils/navigator.dart';
|
||||||
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
// import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
// import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
// import 'package:easy_localization/easy_localization.dart';
|
||||||
|
//
|
||||||
|
//
|
||||||
class AppointmentDetailListWidget extends StatelessWidget {
|
// class AppointmentDetailListWidget extends StatelessWidget {
|
||||||
bool isNeedClick;
|
// bool isNeedClick;
|
||||||
|
//
|
||||||
AppointmentDetailListWidget({Key? key, this.isNeedClick = true}) : super(key: key);
|
// AppointmentDetailListWidget({Key? key, this.isNeedClick = true}) : super(key: key);
|
||||||
|
//
|
||||||
@override
|
// @override
|
||||||
Widget build(BuildContext context) {
|
// Widget build(BuildContext context) {
|
||||||
return Column(
|
// return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
// children: [
|
||||||
Row(
|
// Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
// children: [
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: Column(
|
// child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
// mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
// children: [
|
||||||
"Olaya Brach".toText(
|
// "Olaya Brach".toText(
|
||||||
fontSize: 12,
|
// fontSize: 12,
|
||||||
color: MyColors.darkTextColor,
|
// color: MyColors.darkTextColor,
|
||||||
isBold: true,
|
// isBold: true,
|
||||||
),
|
// ),
|
||||||
"Abdullah Alhbas".toText(
|
// "Abdullah Alhbas".toText(
|
||||||
fontSize: 14,
|
// fontSize: 14,
|
||||||
isBold: true,
|
// isBold: true,
|
||||||
),
|
// ),
|
||||||
Row(
|
// Row(
|
||||||
children: [
|
// children: [
|
||||||
"Appt. On:".toText(
|
// "Appt. On:".toText(
|
||||||
color: MyColors.lightTextColor,
|
// color: MyColors.lightTextColor,
|
||||||
),
|
// ),
|
||||||
2.width,
|
// 2.width,
|
||||||
"19-Mar-2023 11:48 AM".toText(),
|
// "19-Mar-2023 11:48 AM".toText(),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
SvgPicture.asset(
|
// SvgPicture.asset(
|
||||||
MyAssets.icEdit,
|
// MyAssets.icEdit,
|
||||||
color: Colors.black,
|
// color: Colors.black,
|
||||||
width: 20,
|
// width: 20,
|
||||||
height: 20,
|
// height: 20,
|
||||||
)
|
// )
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
8.height,
|
// 8.height,
|
||||||
showServices("Maintenance"),
|
// showServices("Maintenance"),
|
||||||
2.height,
|
// 2.height,
|
||||||
showServices("Accessories and Modification"),
|
// showServices("Accessories and Modification"),
|
||||||
24.height,
|
// 24.height,
|
||||||
LocaleKeys.totalAmount.tr().toText(
|
// LocaleKeys.totalAmount.tr().toText(
|
||||||
fontSize: 12,
|
// fontSize: 12,
|
||||||
color: MyColors.lightTextColor,
|
// color: MyColors.lightTextColor,
|
||||||
isBold: true,
|
// isBold: true,
|
||||||
),
|
// ),
|
||||||
Row(
|
// Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
// mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
// crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
// children: [
|
||||||
"30,000".toText(fontSize: 16, isBold: true),
|
// "30,000".toText(fontSize: 16, isBold: true),
|
||||||
2.width,
|
// 2.width,
|
||||||
LocaleKeys.sar.tr().toText(
|
// LocaleKeys.sar.tr().toText(
|
||||||
color: MyColors.lightTextColor,
|
// color: MyColors.lightTextColor,
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
).toWhiteContainer(
|
// ).toWhiteContainer(
|
||||||
width: double.infinity,
|
// width: double.infinity,
|
||||||
allPading: 12,
|
// allPading: 12,
|
||||||
onTap: () {
|
// onTap: () {
|
||||||
if (isNeedClick) navigateWithName(context, AppRoutes.updateAppointmentPage);
|
// if (isNeedClick) navigateWithName(context, AppRoutes.updateAppointmentPage);
|
||||||
},
|
// },
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
Widget showServices(String title) {
|
// Widget showServices(String title) {
|
||||||
return Row(
|
// return Row(
|
||||||
children: [
|
// children: [
|
||||||
const Icon(
|
// const Icon(
|
||||||
Icons.ac_unit,
|
// Icons.ac_unit,
|
||||||
color: MyColors.primaryColor,
|
// color: MyColors.primaryColor,
|
||||||
size: 18,
|
// size: 18,
|
||||||
),
|
// ),
|
||||||
8.width,
|
// 8.width,
|
||||||
title.toText(
|
// title.toText(
|
||||||
fontSize: 14,
|
// fontSize: 14,
|
||||||
isBold: true,
|
// isBold: true,
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|||||||
@ -1,122 +1,122 @@
|
|||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
import 'package:mc_common_app/extensions/int_extensions.dart';
|
// import 'package:mc_common_app/extensions/int_extensions.dart';
|
||||||
import 'package:mc_common_app/extensions/string_extensions.dart';
|
// import 'package:mc_common_app/extensions/string_extensions.dart';
|
||||||
import 'package:mc_common_app/theme/colors.dart';
|
// import 'package:mc_common_app/theme/colors.dart';
|
||||||
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
// import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
||||||
|
//
|
||||||
class DegradePackageSheet extends StatelessWidget {
|
// class DegradePackageSheet extends StatelessWidget {
|
||||||
const DegradePackageSheet({super.key});
|
// const DegradePackageSheet({super.key});
|
||||||
|
//
|
||||||
@override
|
// @override
|
||||||
Widget build(BuildContext context) {
|
// Widget build(BuildContext context) {
|
||||||
return Container(
|
// return Container(
|
||||||
width: double.infinity,
|
// width: double.infinity,
|
||||||
padding: const EdgeInsets.all(12),
|
// padding: const EdgeInsets.all(12),
|
||||||
child: Column(
|
// child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
// mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
// children: [
|
||||||
"Deactivate the branches & users ".toText(
|
// "Deactivate the branches & users ".toText(
|
||||||
fontSize: 18,
|
// fontSize: 18,
|
||||||
isBold: true,
|
// isBold: true,
|
||||||
),
|
// ),
|
||||||
"To select this subscription you need to deactivate your branches and users as this package only supports 1 branch and 2 users per branch. You can reactivate these branches later after upgrading the package"
|
// "To select this subscription you need to deactivate your branches and users as this package only supports 1 branch and 2 users per branch. You can reactivate these branches later after upgrading the package"
|
||||||
.toText(
|
// .toText(
|
||||||
fontSize: 14,
|
// fontSize: 14,
|
||||||
color: MyColors.lightTextColor,
|
// color: MyColors.lightTextColor,
|
||||||
),
|
// ),
|
||||||
12.height,
|
// 12.height,
|
||||||
showBranchList(),
|
// showBranchList(),
|
||||||
12.height,
|
// 12.height,
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
Widget showBranchList() {
|
// Widget showBranchList() {
|
||||||
return ListView.separated(
|
// return ListView.separated(
|
||||||
itemBuilder: (context, index) {
|
// itemBuilder: (context, index) {
|
||||||
return Column(
|
// return Column(
|
||||||
children: [
|
// children: [
|
||||||
Row(
|
// Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
// mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
// children: [
|
||||||
customCheckBox(true),
|
// customCheckBox(true),
|
||||||
12.width,
|
// 12.width,
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: Column(
|
// child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
// children: [
|
||||||
"Olaya Branch".toText(
|
// "Olaya Branch".toText(
|
||||||
fontSize: 16,
|
// fontSize: 16,
|
||||||
isBold: true,
|
// isBold: true,
|
||||||
),
|
// ),
|
||||||
"3 Users".toText(
|
// "3 Users".toText(
|
||||||
fontSize: 10,
|
// fontSize: 10,
|
||||||
color: MyColors.lightTextColor,
|
// color: MyColors.lightTextColor,
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
IconButton(
|
// IconButton(
|
||||||
onPressed: () {},
|
// onPressed: () {},
|
||||||
icon: const Icon(
|
// icon: const Icon(
|
||||||
Icons.keyboard_arrow_down,
|
// Icons.keyboard_arrow_down,
|
||||||
),
|
// ),
|
||||||
)
|
// )
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
showUser("Mirza"),
|
// showUser("Mirza"),
|
||||||
12.height,
|
// 12.height,
|
||||||
showUser("Shafique"),
|
// showUser("Shafique"),
|
||||||
],
|
// ],
|
||||||
).toContainer(
|
// ).toContainer(
|
||||||
isShadowEnabled: true,
|
// isShadowEnabled: true,
|
||||||
borderRadius: 0,
|
// borderRadius: 0,
|
||||||
paddingAll: 12,
|
// paddingAll: 12,
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
separatorBuilder: (context, index) {
|
// separatorBuilder: (context, index) {
|
||||||
return 12.height;
|
// return 12.height;
|
||||||
},
|
// },
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
// physics: const NeverScrollableScrollPhysics(),
|
||||||
shrinkWrap: true,
|
// shrinkWrap: true,
|
||||||
itemCount: 2,
|
// itemCount: 2,
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
Widget showUser(String user) {
|
// Widget showUser(String user) {
|
||||||
return Row(
|
// return Row(
|
||||||
children: [
|
// children: [
|
||||||
const SizedBox(
|
// const SizedBox(
|
||||||
width: 24,
|
// width: 24,
|
||||||
),
|
// ),
|
||||||
customCheckBox(false),
|
// customCheckBox(false),
|
||||||
12.width,
|
// 12.width,
|
||||||
user.toText(fontSize: 14),
|
// user.toText(fontSize: 14),
|
||||||
],
|
// ],
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
Widget customCheckBox(bool isChecked) {
|
// Widget customCheckBox(bool isChecked) {
|
||||||
return SizedBox(
|
// return SizedBox(
|
||||||
height: 18,
|
// height: 18,
|
||||||
width: 18,
|
// width: 18,
|
||||||
child: isChecked
|
// child: isChecked
|
||||||
? const Icon(
|
// ? const Icon(
|
||||||
Icons.done,
|
// Icons.done,
|
||||||
color: Colors.white,
|
// color: Colors.white,
|
||||||
size: 14,
|
// size: 14,
|
||||||
)
|
// )
|
||||||
: const SizedBox(),
|
// : const SizedBox(),
|
||||||
).toContainer(
|
// ).toContainer(
|
||||||
isEnabledBorder: true,
|
// isEnabledBorder: true,
|
||||||
paddingAll: 0,
|
// paddingAll: 0,
|
||||||
borderRadius: 0,
|
// borderRadius: 0,
|
||||||
borderWidget: 1,
|
// borderWidget: 1,
|
||||||
borderColor: MyColors.primaryColor,
|
// borderColor: MyColors.primaryColor,
|
||||||
backgroundColor: isChecked ? MyColors.primaryColor : Colors.transparent,
|
// backgroundColor: isChecked ? MyColors.primaryColor : Colors.transparent,
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|||||||
@ -1,89 +1,91 @@
|
|||||||
import 'package:car_provider_app/views/subscriptions/sheet/degrage_package_sheet.dart';
|
// import 'package:car_provider_app/views/subscriptions/sheet/degrage_package_sheet.dart';
|
||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
import 'package:mc_common_app/extensions/int_extensions.dart';
|
// import 'package:mc_common_app/extensions/int_extensions.dart';
|
||||||
import 'package:mc_common_app/extensions/string_extensions.dart';
|
// import 'package:mc_common_app/extensions/string_extensions.dart';
|
||||||
import 'package:mc_common_app/theme/colors.dart';
|
// import 'package:mc_common_app/generated/locale_keys.g.dart';
|
||||||
import 'package:mc_common_app/widgets/bottom_sheet.dart';
|
// import 'package:mc_common_app/theme/colors.dart';
|
||||||
import 'package:mc_common_app/widgets/button/show_fill_button.dart';
|
// import 'package:mc_common_app/widgets/bottom_sheet.dart';
|
||||||
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
// import 'package:mc_common_app/widgets/button/show_fill_button.dart';
|
||||||
|
// import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
||||||
class SelectPackageSheet extends StatelessWidget {
|
// import 'package:easy_localization/easy_localization.dart';
|
||||||
const SelectPackageSheet({super.key});
|
//
|
||||||
|
// class SelectPackageSheet extends StatelessWidget {
|
||||||
@override
|
// const SelectPackageSheet({super.key});
|
||||||
Widget build(BuildContext context) {
|
//
|
||||||
return Container(
|
// @override
|
||||||
width: double.infinity,
|
// Widget build(BuildContext context) {
|
||||||
padding: const EdgeInsets.all(12),
|
// return Container(
|
||||||
child: Column(
|
// width: double.infinity,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// padding: const EdgeInsets.all(12),
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
// child: Column(
|
||||||
children: [
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
"When do you want to upgrade".toText(
|
// mainAxisAlignment: MainAxisAlignment.start,
|
||||||
fontSize: 19,
|
// children: [
|
||||||
isBold: true,
|
// LocaleKeys.whendoyouWanttoUpgrade.tr().toText(
|
||||||
),
|
// fontSize: 19,
|
||||||
12.height,
|
// isBold: true,
|
||||||
showPackage(),
|
// ),
|
||||||
12.height,
|
// 12.height,
|
||||||
showPackage(),
|
// showPackage(),
|
||||||
12.height,
|
// 12.height,
|
||||||
ShowFillButton(
|
// showPackage(),
|
||||||
title: "Upgrade",
|
// 12.height,
|
||||||
maxWidth: double.infinity,
|
// ShowFillButton(
|
||||||
onPressed: () {
|
// title: LocaleKeys.upgradeVar.tr(),
|
||||||
showMyBottomSheet(context, child: const DegradePackageSheet());
|
// maxWidth: double.infinity,
|
||||||
},
|
// onPressed: () {
|
||||||
),
|
// showMyBottomSheet(context, child: const DegradePackageSheet());
|
||||||
12.height,
|
// },
|
||||||
],
|
// ),
|
||||||
),
|
// 12.height,
|
||||||
);
|
// ],
|
||||||
}
|
// ),
|
||||||
|
// );
|
||||||
Widget showPackage() {
|
// }
|
||||||
return Row(
|
//
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// Widget showPackage() {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
// return Row(
|
||||||
children: [
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Checkbox(
|
// mainAxisAlignment: MainAxisAlignment.start,
|
||||||
value: false,
|
// children: [
|
||||||
onChanged: (v) {},
|
// Checkbox(
|
||||||
),
|
// value: false,
|
||||||
Expanded(
|
// onChanged: (v) {},
|
||||||
child: Column(
|
// ),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// Expanded(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
// child: Column(
|
||||||
children: [
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
"Now".toText(
|
// mainAxisAlignment: MainAxisAlignment.start,
|
||||||
fontSize: 16,
|
// children: [
|
||||||
isBold: true,
|
// LocaleKeys.nowVar.tr().toText(
|
||||||
),
|
// fontSize: 16,
|
||||||
"Your subscription will upgrade now. Affecting from 23 January, 2024"
|
// isBold: true,
|
||||||
.toText(
|
// ),
|
||||||
fontSize: 12,
|
// "Your subscription will upgrade now. Affecting from 23 January, 2024"
|
||||||
color: MyColors.lightTextColor,
|
// .toText(
|
||||||
),
|
// fontSize: 12,
|
||||||
12.height,
|
// color: MyColors.lightTextColor,
|
||||||
Row(
|
// ),
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
// 12.height,
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
// Row(
|
||||||
children: [
|
// mainAxisAlignment: MainAxisAlignment.start,
|
||||||
"175".toText(
|
// crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
fontSize: 26,
|
// children: [
|
||||||
isBold: true,
|
// "175".toText(
|
||||||
),
|
// fontSize: 26,
|
||||||
2.width,
|
// isBold: true,
|
||||||
"SAR".toText(
|
// ),
|
||||||
color: MyColors.lightTextColor,
|
// 2.width,
|
||||||
fontSize: 16,
|
// LocaleKeys.sar.tr().toText(
|
||||||
),
|
// color: MyColors.lightTextColor,
|
||||||
],
|
// fontSize: 16,
|
||||||
)
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// )
|
||||||
)
|
// ],
|
||||||
],
|
// ),
|
||||||
).toContainer(isShadowEnabled: true);
|
// )
|
||||||
}
|
// ],
|
||||||
}
|
// ).toContainer(isShadowEnabled: true);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|||||||
Loading…
Reference in New Issue