diff --git a/assets/images/new-design/tamara.png b/assets/images/new-design/tamara.png new file mode 100644 index 00000000..ab58e3ac Binary files /dev/null and b/assets/images/new-design/tamara.png differ diff --git a/lib/config/config.dart b/lib/config/config.dart index 2e179d55..7aea6857 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -15,6 +15,8 @@ const PACKAGES_CUSTOMER = '/api/customers'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_ORDERS = '/api/orders'; const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; +// const BASE_URL = 'https://uat.hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 5a8488f0..72c06137 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1606,6 +1606,7 @@ const Map localizedValues = { "android-instructions-2": { "en": "Make sure that you have installed your watch related apps from Google PlayStore.", "ar": "تأكد من أنك قمت بتثبيت التطبيقات المتعلقة بالساعات من Google PlayStore." }, "android-instructions-3": { "en": "Make sure that your Smart Watch is connected with the WearOS app & your watch apps.", "ar": "تأكد من أن ساعتك الذكية متصلة بتطبيق WearOS وتطبيقات ساعتك." }, "android-instructions-4": { "en": "Make sure that your smart watch apps are linked/associated with Google Fit App.", "ar": "تأكد من أن تطبيقات ساعتك الذكية مرتبطة / مرتبطة بتطبيق Google Fit." }, "android-instructions-5": { "en": "Make sure that data like heart rate, steps, distance etc. are being shown on your watch app & on Google Fit app & both are in sync.", "ar": "تأكد من عرض بيانات مثل معدل ضربات القلب والخطوات والمسافة وما إلى ذلك على تطبيق الساعة وعلى تطبيق Google Fit وكلاهما في حالة مزامنة." }, + "tamaraInstPlan" : { "en": "Select the tamara installment plan", "ar": "حدد خطة تقسيط تمارة" }, "onlineTag": {"en": "Online", "ar": "متصل"}, "offlineTag": {"en": "Offline", "ar": "غير متصل"}, "viewDocList": {"en": "View List of Doctors", "ar": "عرض قائمة الأطباء"}, diff --git a/lib/core/model/feedback/COC_items.dart b/lib/core/model/feedback/COC_items.dart index 2748ca50..4139fc59 100644 --- a/lib/core/model/feedback/COC_items.dart +++ b/lib/core/model/feedback/COC_items.dart @@ -26,6 +26,7 @@ class COCItem { String status; String statusAr; dynamic statusEn; + int statusId; COCItem({ this.appointment, @@ -55,6 +56,7 @@ class COCItem { this.status, this.statusAr, this.statusEn, + this.statusId, }); COCItem.fromJson(Map json) { @@ -85,6 +87,7 @@ class COCItem { status = json['Status']; statusAr = json['StatusAr']; statusEn = json['StatusEn']; + statusId = json['StatusId']; } Map toJson() { diff --git a/lib/core/service/packages_offers/PackagesOffersServices.dart b/lib/core/service/packages_offers/PackagesOffersServices.dart index 17abdc05..d05bc274 100644 --- a/lib/core/service/packages_offers/PackagesOffersServices.dart +++ b/lib/core/service/packages_offers/PackagesOffersServices.dart @@ -147,6 +147,18 @@ class OffersAndPackagesServices extends BaseService { var finished = 0; var totalCalls = 3; + + completedAll(){ + + finished++; + if(completion != null && finished == totalCalls) { + _hideLoading(context, showLoading); + completion(); + } + } + + _showLoading(context, showLoading); + final auth_token = await baseAppClient.generatePackagesToken(); if(auth_token == null){ throw 'Something went wrong while authentication, Please try again letter'; @@ -162,18 +174,6 @@ class OffersAndPackagesServices extends BaseService { } } - - completedAll(){ - - finished++; - if(completion != null && finished == totalCalls) { - _hideLoading(context, showLoading); - completion(); - } - } - - _showLoading(context, showLoading); - // Performing Parallel Request on same time // # 1 getBestSellers(request: OffersProductsRequestModel(), context: context, showLoading: false).then((value){ @@ -283,7 +283,7 @@ class OffersAndPackagesServices extends BaseService { var jsonResponse = json.decode(stringResponse); var jsonCartItem = jsonResponse["shopping_carts"][0]; response = ResponseModel(status: true, data: PackagesCartItemsResponseModel.fromJson(jsonCartItem), error: null); - cartItemCount = response.data.quantity.toString(); + cartItemCount = (jsonResponse['count'] ?? 0).toString(); }, onFailure: (String error, int statusCode){ _hideLoading(context, showLoading); @@ -334,19 +334,18 @@ class OffersAndPackagesServices extends BaseService { // -------------------- // Place Order // -------------------- - Future placeOrder({@required Map paymentParams, @required BuildContext context, bool showLoading = true}) async{ + Future placeOrder({@required Map paymentParams, @required BuildContext context, bool showLoading = true}) async{ Future errorThrow; - var jsonBody = { - "order": { - "customer_id" : customer.id, - "billing_address": { - "email": patientUser.emailAddress, - "phone_number": patientUser.mobileNumber - }, - } + Map jsonBody = { + "customer_id" : customer.id, + "billing_address": { + "email": patientUser.emailAddress, + "phone_number": patientUser.mobileNumber + }, }; jsonBody.addAll(paymentParams); + jsonBody = {'order' : jsonBody}; int order_id; _showLoading(context, showLoading); diff --git a/lib/pages/feedback/status_feedback_page.dart b/lib/pages/feedback/status_feedback_page.dart index 5040b200..15e3e3dd 100644 --- a/lib/pages/feedback/status_feedback_page.dart +++ b/lib/pages/feedback/status_feedback_page.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_mode import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback-detail.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; @@ -28,10 +29,10 @@ class _StatusFeedbackPageState extends State { TextEditingController complainNumberController = TextEditingController(); StatusType statusType = StatusType.ComplaintNumber; int selectedStatusIndex = 3; - + ProjectViewModel projectViewModel; @override Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); + projectViewModel = Provider.of(context); return BaseView( allowAny: true, onModelReady: (model) { @@ -202,38 +203,67 @@ class _StatusFeedbackPageState extends State { shrinkWrap: isLogin ? false : true, physics: isLogin ? null : NeverScrollableScrollPhysics(), itemBuilder: (context, index) => InkWell( - onTap: () {}, + onTap: () { + // sss + }, child: Container( - decoration: cardRadius(12), - margin: EdgeInsets.all(10), - child: Padding( - padding: const EdgeInsets.all(12.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(isArabic ? cOCItemList[index].statusAr : cOCItemList[index].status, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56, fontWeight: FontWeight.bold)), - Container( - margin: EdgeInsets.only(top: 5.0), - child: Text(cOCItemList[index].formType.toString(), - style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12))), - MyRichText(TranslationBase.of(context).number + ": ", cOCItemList[index].itemID.toString(), isArabic), - Text(cOCItemList[index].cOCTitle, - style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12)), - ], - ), - Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Text(cOCItemList[index].date.split(" ")[0], - style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48)), - Text(cOCItemList[index].date.split(" ")[1].substring(0, 4), - style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48)), - ], - ), - ], + margin: EdgeInsets.only(top: 12), + decoration: BoxDecoration( + color: (cOCItemList[index].statusId==7||cOCItemList[index].statusId==8)?CustomColors.accentColor:(cOCItemList[index].statusId==10||cOCItemList[index].statusId==6||cOCItemList[index].statusId==9)?CustomColors.green:CustomColors.orange, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + + child: Container( + margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), + padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + ), + ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(isArabic ? cOCItemList[index].statusAr : cOCItemList[index].status, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56, fontWeight: FontWeight.bold)), + Container( + margin: EdgeInsets.only(top: 5.0), + child: Text(cOCItemList[index].formType.toString(), + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12))), + MyRichText(TranslationBase.of(context).number + ": ", cOCItemList[index].itemID.toString(), isArabic), + Text(cOCItemList[index].cOCTitle, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12)), + ], + ), + Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text(cOCItemList[index].date.split(" ")[0], + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48)), + Text(cOCItemList[index].date.split(" ")[1].substring(0, 4), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48)), + ], + ), + ], + ), ), ), ), diff --git a/lib/pages/packages_offers/OfferAndPackagesCartPage.dart b/lib/pages/packages_offers/OfferAndPackagesCartPage.dart index 53b4895c..d1219541 100644 --- a/lib/pages/packages_offers/OfferAndPackagesCartPage.dart +++ b/lib/pages/packages_offers/OfferAndPackagesCartPage.dart @@ -87,7 +87,7 @@ class _PackagesCartPageState extends State 'Failed to place order, please try again later'); } }).catchError((error) { - utils.Utils.showErrorToast(error); + utils.Utils.showErrorToast(error.toString()); }); } @@ -217,7 +217,7 @@ class _PackagesCartPageState extends State {@required int orderId, @required bool withStatus, dynamic data}) async { viewModel.service.getOrderById(orderId, context: context).then((value) { var heading = withStatus ? "Success" : "Failed"; - var title = "Your order has been placed successfully"; + var title = withStatus ? "Your order has been placed successfully" : "Failed to place your order"; var subTitle = "Order# ${value.data.customOrderNumber}"; Navigator.of(context).pushReplacement(MaterialPageRoute( builder: (context) => PackageOrderCompletedPage( @@ -231,7 +231,7 @@ class _PackagesCartPageState extends State // /* Payment Footer Widgets */ // --------------------------- String _selectedPaymentMethod; -Map _selectedPaymentParams; +Map _selectedPaymentParams; Widget _paymentOptions(BuildContext context, Function(String) onSelected, {PackagesViewModel viewModel}) { double height = 30; @@ -258,7 +258,7 @@ Widget _paymentOptions(BuildContext context, Function(String) onSelected, {Packa Future selectTamaraPaymentOption() async{ final tamara_options = await viewModel.service.getTamaraOptions(context: context, showLoading: true); - final selected = await SingleSelectionDialog(tamara_options, title: 'Select the tamara installment plan').show(context); + final selected = await SingleSelectionDialog(tamara_options, icon: Image.asset('assets/images/new-design/tamara.png'), title: TranslationBase.of(context).tamaraInstPlan).show(context); return selected.name; } @@ -271,13 +271,16 @@ Widget _paymentOptions(BuildContext context, Function(String) onSelected, {Packa mainAxisAlignment: MainAxisAlignment.center, children: [ InkWell( - child: buttonContent(_selectedPaymentMethod == "tamara", 'mada.png'), + child: buttonContent(_selectedPaymentMethod == "tamara", 'tamara.png'), onTap: () async{ final tamara_option = await selectTamaraPaymentOption(); _selectedPaymentParams = {"channel" : "Web", "payment_method_system_name" : "Payments.Tamara", "payment_option" : tamara_option}; onSelected("tamara"); }, ), + SizedBox( + width: 5, + ), InkWell( child: buttonContent(_selectedPaymentMethod == "mada", 'mada.png'), onTap: () { @@ -305,17 +308,17 @@ Widget _paymentOptions(BuildContext context, Function(String) onSelected, {Packa onSelected("mastercard"); }, ), - SizedBox( - width: 5, - ), - InkWell( - child: buttonContent( - _selectedPaymentMethod == "installment", 'installment.png'), - onTap: () { - _selectedPaymentParams = {"payment_method_system_name" : "Payments.PayFort", "payment_option" : "INSTALLMENT"}; - onSelected("installment"); - }, - ), + // SizedBox( + // width: 5, + // ), + // InkWell( + // child: buttonContent( + // _selectedPaymentMethod == "installment", 'installment.png'), + // onTap: () { + // _selectedPaymentParams = {"payment_method_system_name" : "Payments.PayFort", "payment_option" : "INSTALLMENT"}; + // onSelected("installment"); + // }, + // ), ], ), ), diff --git a/lib/pages/packages_offers/OfferAndPackagesPage.dart b/lib/pages/packages_offers/OfferAndPackagesPage.dart index 4005f835..dc5b6584 100644 --- a/lib/pages/packages_offers/OfferAndPackagesPage.dart +++ b/lib/pages/packages_offers/OfferAndPackagesPage.dart @@ -98,7 +98,7 @@ class _PackagesHomePageState extends State with AfterLayoutMix await viewModel.service.addProductToCart(request, context: context).then((response){ appScaffold.appBar.badgeUpdater(viewModel.service.cartItemCount); }).catchError((error) { - utils.Utils.showErrorToast(error); + utils.Utils.showErrorToast(error.toString()); }); } } diff --git a/lib/pages/pharmacies/screens/cart-page/cart-order-preview.dart b/lib/pages/pharmacies/screens/cart-page/cart-order-preview.dart index 25c02dd0..4f5ab14e 100644 --- a/lib/pages/pharmacies/screens/cart-page/cart-order-preview.dart +++ b/lib/pages/pharmacies/screens/cart-page/cart-order-preview.dart @@ -63,11 +63,11 @@ class _OrderPreviewPageState extends State { color: Color(0xFFF1F1F1), child: Column( children: [ - SelectAddressWidget(model, widget.addresses), + SelectAddressWidget(model, widget.addresses,changeMainState), SizedBox( height: 10, ), - SelectPaymentOptionWidget(model), + SelectPaymentOptionWidget(model, changeMainState), SizedBox( height: 10, ), @@ -235,4 +235,9 @@ class _OrderPreviewPageState extends State { ), ); } + changeMainState(){ + setState(() { + + }); + } } diff --git a/lib/pages/pharmacies/screens/cart-page/select_address_widget.dart b/lib/pages/pharmacies/screens/cart-page/select_address_widget.dart index bf958a36..d6182b9a 100644 --- a/lib/pages/pharmacies/screens/cart-page/select_address_widget.dart +++ b/lib/pages/pharmacies/screens/cart-page/select_address_widget.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/payment-checkout-data.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; @@ -25,39 +26,35 @@ import 'package:provider/provider.dart'; class SelectAddressWidget extends StatefulWidget { final OrderPreviewViewModel model; final List addresses; + final Function changeMainState; - SelectAddressWidget(this.model, this.addresses); + SelectAddressWidget(this.model, this.addresses, this.changeMainState); @override _SelectAddressWidgetState createState() => _SelectAddressWidgetState(); } class _SelectAddressWidgetState extends State { - Addresses address; + AddressInfo address; _navigateToAddressPage() { Navigator.push(context, FadePage(page: PharmacyAddressesPage())) .then((result) { if (result != null) { address = result; - widget.model.paymentCheckoutData.address = address; + widget.model.paymentCheckoutData.address = + Addresses.fromJson(address.toJson()); widget.model.getInformationsByAddress(); + widget.changeMainState(); } - - /* setState(() { - if (result != null) { - address = result; - widget.model.paymentCheckoutData.address = address; - widget.model.getInformationsByAddress(); - } - })*/ }); } @override void initState() { if (widget.model.paymentCheckoutData.address != null) { - address = widget.model.paymentCheckoutData.address; + address = AddressInfo.fromJson( + widget.model.paymentCheckoutData.address.toJson()); } super.initState(); } diff --git a/lib/pages/pharmacies/screens/cart-page/select_payment_option_widget.dart b/lib/pages/pharmacies/screens/cart-page/select_payment_option_widget.dart index 6e506458..825e2577 100644 --- a/lib/pages/pharmacies/screens/cart-page/select_payment_option_widget.dart +++ b/lib/pages/pharmacies/screens/cart-page/select_payment_option_widget.dart @@ -8,8 +8,9 @@ import 'package:flutter/material.dart'; class SelectPaymentOptionWidget extends StatefulWidget { final OrderPreviewViewModel model; + final Function changeMainState; - SelectPaymentOptionWidget(this.model); + SelectPaymentOptionWidget(this.model, this.changeMainState); @override _SelectPaymentOptionWidgetState createState() => _SelectPaymentOptionWidgetState(); @@ -19,14 +20,17 @@ class _SelectPaymentOptionWidgetState extends State { PaymentOption paymentOption; _navigateToPaymentOption() { - Navigator.push(context, FadePage(page: PaymentMethodSelectPage())).then((result) => { - setState(() { - if (result != null) { - paymentOption = result; - widget.model.paymentCheckoutData.paymentOption = paymentOption; - } - }) - }); + Navigator.push(context, FadePage(page: PaymentMethodSelectPage())) + .then((result) => { + setState(() { + if (result != null) { + paymentOption = result; + widget.model.paymentCheckoutData.paymentOption = + paymentOption; + } + widget.changeMainState(); + }) + }); } @override diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 409ea6b9..92656188 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2570,6 +2570,8 @@ class TranslationBase { String get androidInstructions4 => localizedValues["android-instructions-4"][locale.languageCode]; + String get tamaraInstPlan => localizedValues["tamaraInstPlan"][locale.languageCode]; + String get onlineTag => localizedValues["onlineTag"][locale.languageCode]; String get offlineTag => localizedValues["offlineTag"][locale.languageCode]; diff --git a/lib/widgets/dialogs/radio_selection_dialog.dart b/lib/widgets/dialogs/radio_selection_dialog.dart index 4cbfdcc4..7175d6dc 100644 --- a/lib/widgets/dialogs/radio_selection_dialog.dart +++ b/lib/widgets/dialogs/radio_selection_dialog.dart @@ -110,7 +110,7 @@ class RadioSelectionDialogState extends State { Expanded( child: DefaultButton( TranslationBase.of(context).save, - () { + (){ Navigator.pop(context); widget.onValueSelected(selectedIndex); }, diff --git a/lib/widgets/single_selection_dialog.dart b/lib/widgets/single_selection_dialog.dart index b8466b65..155f6394 100644 --- a/lib/widgets/single_selection_dialog.dart +++ b/lib/widgets/single_selection_dialog.dart @@ -13,8 +13,9 @@ import 'package:permission_handler/permission_handler.dart'; class SingleSelectionDialog extends StatefulWidget { final List items; final String title; + final Widget icon; - SingleSelectionDialog(this.items, {Widget icon, @required this.title}); + SingleSelectionDialog(this.items, {@required this.icon, @required this.title}); Future show(BuildContext context) async { return showDialog( @@ -32,6 +33,7 @@ class SingleSelectionDialog extends StatefulWidget { @override _SingleSelectionDialogState createState() => _SingleSelectionDialogState(); + } class _SingleSelectionDialogState extends State { @@ -51,11 +53,12 @@ class _SingleSelectionDialogState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Icon( - Icons.notifications_active, - color: Color(0xff2B353E), - size: 50, + + SizedBox( + height: 40, + child: widget.icon, ), + IconButton( icon: Icon(Icons.clear), color: Color(0xff2B353E), @@ -95,33 +98,33 @@ class _SingleSelectionDialogState extends State { } Widget optionList(List options){ - return ListView( - shrinkWrap: true, - children: List.generate(options.length, (index){ - - final opt = options[index]; - return Row( - children: [ - Radio( - value: index, - groupValue: i, - onChanged: (int value) { - setState(() { - i = value; - }); - }, - ), - Text( - opt.toString(), - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.w600, - letterSpacing: -0.48, + return ListView.builder( + shrinkWrap: true, + itemCount: options.length, + itemBuilder: (ctx,idx){ + final opt = options[idx]; + return Row( + children: [ + Radio( + value: idx, + groupValue: i, + onChanged: (int value) { + setState(() { + i = value; + }); + }, ), - ), - ], - ); - }), + Text( + opt.toString(), + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + ), + ], + ); + } ); } }