import 'package:car_customer_app/view_models/appointments_view_model.dart'; import 'package:car_customer_app/views/appointments/widgets/service_item_with_price_checkbox.dart'; import 'package:flutter/material.dart'; import 'package:mc_common_app/classes/consts.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/button/show_fill_button.dart'; import 'package:mc_common_app/widgets/common_widgets/app_bar.dart'; import 'package:mc_common_app/widgets/extensions/extensions_widget.dart'; import 'package:provider/provider.dart'; class BookAppointmentsItemView extends StatelessWidget { const BookAppointmentsItemView({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Scaffold( appBar: CustomAppBar( title: "Select Services", isRemoveBackButton: false, isDrawerEnabled: false, actions: [MyAssets.searchIcon.buildSvg().paddingOnly(right: 21)], onBackButtonTapped: () => Navigator.pop(context), ), body: Consumer( builder: (BuildContext context, AppointmentsVM appointmentsVM, Widget? child) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( height: 40, width: double.infinity, color: MyColors.darkTextColor, alignment: Alignment.centerLeft, child: "3 Items Selected".toText(fontSize: 16, color: MyColors.white).horPaddingMain(), ), 16.height, Column( children: [ "Few services are not available on home location. Change the location to workshop to full access the services".toText(fontSize: 12, isItalic: true, color: MyColors.lightTextColor), 8.height, Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ "Change location or service: ".toText(fontSize: 14, isBold: true), "Edit".toText(fontSize: 14, isBold: true, isUnderLine: true, color: MyColors.adPendingStatusColor), 5.width, MyAssets.icEdit.buildSvg(width: 17), ], ).onPress(() {}), 16.height, Divider(), ], ).horPaddingMain(), ListView.separated( separatorBuilder: (BuildContext context, int index) => Divider(), itemCount: 20, itemBuilder: (BuildContext context, int index) { return ServiceItemWithPriceCheckBox( description: "Some description about the sub-services", title: "Engine Check", isSelected: true, onSelection: (bool value) {}, priceWidget: Row( crossAxisAlignment: CrossAxisAlignment.end, children: [ // TODO: This Price will be decided according to the service selected 150.toString().toText(fontSize: 30, isBold: true), "SAR".toText(fontSize: 15, isBold: true, color: MyColors.lightTextColor).paddingOnly(bottom: 5), ], ), ); }, ).expand(), Column( children: [ Divider( height: 1, thickness: 0.7, ), 16.height, Row( children: [ Expanded( child: ShowFillButton( txtColor: MyColors.black, maxHeight: 55, title: "Cancel", onPressed: () {}, backgroundColor: MyColors.greyButtonColor, ), ), 12.width, Expanded( child: ShowFillButton( maxHeight: 55, title: "Next", onPressed: () {}, backgroundColor: MyColors.darkPrimaryColor, ), ), ], ).horPaddingMain(), 16.height, ], ), ], ); }, )); } }