import 'package:flutter/material.dart'; import 'package:hmg_patient_app_new/core/app_export.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:mobile_scanner/mobile_scanner.dart'; import '../../theme/colors.dart'; import '../../widgets/appbar/app_bar_widget.dart'; import '../../widgets/chip/app_custom_chip_widget.dart'; class ParkingSlot extends StatefulWidget { const ParkingSlot({super.key}); @override State createState() => _ParkingSlotState(); } class _ParkingSlotState extends State { String? scannedCode; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.scaffoldBgColor, appBar: CustomAppBar( onBackPressed: () => Navigator.of(context).pop(), onLanguageChanged: (_) {}, hideLogoAndLang: true, ), body: LayoutBuilder( builder: (context, constraints) { final maxW = constraints.maxWidth; final contentW = maxW > 600 ? 600.0 : maxW; // حد أقصى للتابلت return Align( alignment: Alignment.topCenter, child: SizedBox( width: contentW, child: Padding( padding: EdgeInsets.all(16.h), child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Container( width: double.infinity, decoration: RoundedRectangleBorder().toSmoothCornerDecoration( color: AppColors.whiteColor, borderRadius: 24.r, hasShadow: true, ), child: Padding( padding: EdgeInsets.all(16.h), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "Parking Slot Details", style: TextStyle( fontSize: 16.f, fontWeight: FontWeight.w600, color: AppColors.textColor, ), ), SizedBox(height: 16.h), Wrap( spacing: 4, runSpacing: 4, children: [ AppCustomChipWidget(labelText: "Slot: B-24".needTranslation), AppCustomChipWidget(labelText: "Basement: Zone B".needTranslation), AppCustomChipWidget(labelText: "Date: 16 Dec 2025".needTranslation), AppCustomChipWidget(labelText: "Parked Since: 10:32 AM".needTranslation), ], ), ], ), ), ), SizedBox(height: 24.h), SizedBox( width: double.infinity, height: 48.h, child: ElevatedButton( style: ElevatedButton.styleFrom( backgroundColor: AppColors.primaryRedColor, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10), ), ), onPressed: () {}, child: Text( "Get Direction", style: TextStyle( fontSize: 18, fontWeight: FontWeight.bold, color: Colors.white, ), ), ), ), const Spacer(), SizedBox( width: double.infinity, height: 48.h, child: OutlinedButton( style: OutlinedButton.styleFrom( side: BorderSide(color: AppColors.primaryRedColor), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10), ), ), onPressed: () { // Reset direction logic }, child: Text( "Reset Direction", style: TextStyle( fontSize: 16, fontWeight: FontWeight.w600, color: AppColors.primaryRedColor, ), ), ), ), ], ), ), ), ); }, ), ); } }