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