Integration fonctionnalités V1 ( resas + gestion machines
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../../core/api/api_client.dart';
|
||||
import '../../../core/api/api_endpoints.dart';
|
||||
import '../../../core/api/api_response.dart';
|
||||
import '../domain/machine_detail.dart';
|
||||
|
||||
/// Dépôt de données machines (lookup, détail, créneaux).
|
||||
class MachineRepository {
|
||||
MachineRepository(this._apiClient);
|
||||
|
||||
final ApiClient _apiClient;
|
||||
|
||||
Future<MachineDetail> lookup({String? qrCode, String? machineUuid}) async {
|
||||
final response = await _apiClient.get(
|
||||
ApiEndpoints.machineLookup,
|
||||
queryParameters: {
|
||||
if (qrCode != null) 'qr_code': qrCode,
|
||||
if (machineUuid != null) 'machine_uuid': machineUuid,
|
||||
},
|
||||
);
|
||||
return MachineDetail.fromJson(ApiResponse.payload(response.data));
|
||||
}
|
||||
|
||||
Future<MachineDetail> fetchDetail(String uuid) async {
|
||||
final response = await _apiClient.get(ApiEndpoints.machine(uuid));
|
||||
return MachineDetail.fromJson(ApiResponse.payload(response.data));
|
||||
}
|
||||
|
||||
Future<List<TimeSlot>> fetchAvailability(String uuid, DateTime date) async {
|
||||
final response = await _apiClient.get(
|
||||
ApiEndpoints.machineAvailability(uuid),
|
||||
queryParameters: {'date': date.toIso8601String().split('T').first},
|
||||
);
|
||||
final slots = ApiResponse.payload(response.data)['slots'] as List<dynamic>? ?? [];
|
||||
return slots.map((s) => TimeSlot.fromJson(s as Map<String, dynamic>)).toList();
|
||||
}
|
||||
}
|
||||
|
||||
final machineRepositoryProvider = Provider<MachineRepository>((ref) {
|
||||
return MachineRepository(ref.watch(apiClientProvider));
|
||||
});
|
||||
|
||||
final machineDetailProvider = FutureProvider.family<MachineDetail, String>((ref, uuid) async {
|
||||
return ref.watch(machineRepositoryProvider).fetchDetail(uuid);
|
||||
});
|
||||
|
||||
final machineAvailabilityProvider =
|
||||
FutureProvider.family<List<TimeSlot>, ({String uuid, DateTime date})>((ref, params) async {
|
||||
return ref.watch(machineRepositoryProvider).fetchAvailability(params.uuid, params.date);
|
||||
});
|
||||
@@ -0,0 +1,52 @@
|
||||
import '../../establishments/domain/establishment.dart';
|
||||
|
||||
/// Détails machine avec tarif et durée estimée.
|
||||
class MachineDetail {
|
||||
const MachineDetail({
|
||||
required this.machine,
|
||||
required this.price,
|
||||
required this.estimatedDurationMinutes,
|
||||
this.establishmentName,
|
||||
this.currency = 'EUR',
|
||||
});
|
||||
|
||||
final Machine machine;
|
||||
final double price;
|
||||
final int estimatedDurationMinutes;
|
||||
final String? establishmentName;
|
||||
final String currency;
|
||||
|
||||
factory MachineDetail.fromJson(Map<String, dynamic> json) {
|
||||
final machineJson = json['machine'] as Map<String, dynamic>;
|
||||
final pricing = json['pricing'] as Map<String, dynamic>?;
|
||||
|
||||
String? establishmentName;
|
||||
final establishment = machineJson['establishment'];
|
||||
if (establishment is Map<String, dynamic>) {
|
||||
establishmentName = establishment['name'] as String?;
|
||||
}
|
||||
|
||||
return MachineDetail(
|
||||
machine: Machine.fromJson(machineJson),
|
||||
price: (pricing?['price'] as num?)?.toDouble() ?? 0,
|
||||
currency: pricing?['currency'] as String? ?? 'EUR',
|
||||
estimatedDurationMinutes: json['estimated_duration_minutes'] as int? ?? 40,
|
||||
establishmentName: establishmentName,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Créneau disponible pour réservation.
|
||||
class TimeSlot {
|
||||
const TimeSlot({required this.start, required this.end});
|
||||
|
||||
final DateTime start;
|
||||
final DateTime end;
|
||||
|
||||
factory TimeSlot.fromJson(Map<String, dynamic> json) {
|
||||
return TimeSlot(
|
||||
start: DateTime.parse(json['start'] as String),
|
||||
end: DateTime.parse(json['end'] as String),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,293 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import '../../../core/router/app_router.dart';
|
||||
import '../../../core/theme/app_colors.dart';
|
||||
import '../../../core/theme/machine_status_theme.dart';
|
||||
import '../../../core/widgets/empty_state.dart';
|
||||
import '../../wash/data/wash_repository.dart';
|
||||
import '../data/machine_repository.dart';
|
||||
import '../domain/machine_detail.dart';
|
||||
|
||||
/// Écran machine — infos + actions principales.
|
||||
class MachineActionScreen extends ConsumerStatefulWidget {
|
||||
const MachineActionScreen({super.key, required this.machineUuid});
|
||||
|
||||
final String machineUuid;
|
||||
|
||||
@override
|
||||
ConsumerState<MachineActionScreen> createState() => _MachineActionScreenState();
|
||||
}
|
||||
|
||||
class _MachineActionScreenState extends ConsumerState<MachineActionScreen> {
|
||||
bool _isStarting = false;
|
||||
|
||||
Future<void> _startWash(MachineDetail detail) async {
|
||||
setState(() => _isStarting = true);
|
||||
try {
|
||||
await ref.read(washRepositoryProvider).startWashFromMachine(detail.machine.uuid);
|
||||
ref.invalidate(washesProvider);
|
||||
ref.invalidate(machineDetailProvider(widget.machineUuid));
|
||||
if (mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('${detail.machine.name} — cycle démarré !'),
|
||||
backgroundColor: AppColors.success,
|
||||
),
|
||||
);
|
||||
context.go(AppRoutes.washes);
|
||||
}
|
||||
} on WashStartException catch (e) {
|
||||
if (mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(e.message), backgroundColor: AppColors.error),
|
||||
);
|
||||
}
|
||||
} finally {
|
||||
if (mounted) setState(() => _isStarting = false);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final detailAsync = ref.watch(machineDetailProvider(widget.machineUuid));
|
||||
final currency = NumberFormat.currency(locale: 'fr_FR', symbol: '€');
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.background,
|
||||
appBar: AppBar(title: const Text('Machine')),
|
||||
body: detailAsync.when(
|
||||
loading: () => const Center(child: CircularProgressIndicator()),
|
||||
error: (error, _) => EmptyState(
|
||||
icon: Icons.error_outline,
|
||||
title: 'Machine introuvable',
|
||||
subtitle: error is DioException
|
||||
? 'Impossible de charger les informations.'
|
||||
: '$error',
|
||||
actionLabel: 'Retour',
|
||||
onAction: () => context.pop(),
|
||||
),
|
||||
data: (detail) => _MachineActionBody(
|
||||
detail: detail,
|
||||
currency: currency,
|
||||
isStarting: _isStarting,
|
||||
onStart: () => _startWash(detail),
|
||||
onReserve: () => context.push(AppRoutes.machineBooking(widget.machineUuid)),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _MachineActionBody extends StatelessWidget {
|
||||
const _MachineActionBody({
|
||||
required this.detail,
|
||||
required this.currency,
|
||||
required this.isStarting,
|
||||
required this.onStart,
|
||||
required this.onReserve,
|
||||
});
|
||||
|
||||
final MachineDetail detail;
|
||||
final NumberFormat currency;
|
||||
final bool isStarting;
|
||||
final VoidCallback onStart;
|
||||
final VoidCallback onReserve;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final machine = detail.machine;
|
||||
final statusColor = MachineStatusTheme.color(machine.status);
|
||||
final canStart = MachineStatusTheme.canStart(machine.status);
|
||||
|
||||
return ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColors.gradientAccent,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 56,
|
||||
height: 56,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withValues(alpha: 0.2),
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
),
|
||||
child: Icon(
|
||||
MachineStatusTheme.iconForType(machine.type),
|
||||
color: Colors.white,
|
||||
size: 28,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 14),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
machine.name,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
machine.typeLabel,
|
||||
style: TextStyle(color: Colors.white.withValues(alpha: 0.9)),
|
||||
),
|
||||
if (detail.establishmentName != null)
|
||||
Text(
|
||||
detail.establishmentName!,
|
||||
style: TextStyle(
|
||||
color: Colors.white.withValues(alpha: 0.75),
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withValues(alpha: 0.2),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Text(
|
||||
MachineStatusTheme.label(machine.status),
|
||||
style: const TextStyle(color: Colors.white, fontWeight: FontWeight.w600, fontSize: 12),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: _InfoTile(
|
||||
icon: Icons.euro,
|
||||
label: 'Prix du cycle',
|
||||
value: currency.format(detail.price),
|
||||
color: AppColors.primary,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: _InfoTile(
|
||||
icon: Icons.schedule,
|
||||
label: 'Durée estimée',
|
||||
value: '~${detail.estimatedDurationMinutes} min',
|
||||
color: AppColors.secondary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (!canStart) ...[
|
||||
const SizedBox(height: 16),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(14),
|
||||
decoration: BoxDecoration(
|
||||
color: statusColor.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Text(
|
||||
machine.status == 'running'
|
||||
? 'Machine en cours d\'utilisation — vous pouvez réserver un créneau ultérieur.'
|
||||
: 'Machine indisponible pour le moment — réservez un créneau.',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: statusColor, fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
],
|
||||
const SizedBox(height: 28),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: 60,
|
||||
child: ElevatedButton.icon(
|
||||
onPressed: canStart && !isStarting ? onStart : null,
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppColors.machineAvailable,
|
||||
disabledBackgroundColor: AppColors.machineAvailable.withValues(alpha: 0.4),
|
||||
foregroundColor: Colors.white,
|
||||
disabledForegroundColor: Colors.white70,
|
||||
elevation: canStart ? 2 : 0,
|
||||
shadowColor: AppColors.machineAvailable.withValues(alpha: 0.4),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||
textStyle: const TextStyle(fontSize: 18, fontWeight: FontWeight.w700),
|
||||
),
|
||||
icon: isStarting
|
||||
? const SizedBox(
|
||||
width: 24,
|
||||
height: 24,
|
||||
child: CircularProgressIndicator(strokeWidth: 2.5, color: Colors.white),
|
||||
)
|
||||
: const Icon(Icons.play_arrow_rounded, size: 28),
|
||||
label: Text(isStarting ? 'Démarrage…' : 'Commencer un lavage'),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 14),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: 56,
|
||||
child: ElevatedButton.icon(
|
||||
onPressed: onReserve,
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppColors.primary,
|
||||
foregroundColor: Colors.white,
|
||||
elevation: 2,
|
||||
shadowColor: AppColors.primary.withValues(alpha: 0.35),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||
textStyle: const TextStyle(fontSize: 17, fontWeight: FontWeight.w600),
|
||||
),
|
||||
icon: const Icon(Icons.event_available_outlined, size: 24),
|
||||
label: const Text('Réserver un créneau'),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _InfoTile extends StatelessWidget {
|
||||
const _InfoTile({
|
||||
required this.icon,
|
||||
required this.label,
|
||||
required this.value,
|
||||
required this.color,
|
||||
});
|
||||
|
||||
final IconData icon;
|
||||
final String label;
|
||||
final String value;
|
||||
final Color color;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(14),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Icon(icon, color: color, size: 22),
|
||||
const SizedBox(height: 8),
|
||||
Text(label, style: Theme.of(context).textTheme.bodyMedium?.copyWith(fontSize: 12)),
|
||||
const SizedBox(height: 2),
|
||||
Text(value, style: Theme.of(context).textTheme.titleMedium),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import '../../../core/router/app_router.dart';
|
||||
import '../../../core/theme/app_colors.dart';
|
||||
import '../../../core/theme/machine_status_theme.dart';
|
||||
import '../../booking/data/booking_repository.dart';
|
||||
import '../data/machine_repository.dart';
|
||||
import '../domain/machine_detail.dart';
|
||||
|
||||
/// Réservation de créneau pour une machine.
|
||||
class MachineBookingScreen extends ConsumerStatefulWidget {
|
||||
const MachineBookingScreen({super.key, required this.machineUuid});
|
||||
|
||||
final String machineUuid;
|
||||
|
||||
@override
|
||||
ConsumerState<MachineBookingScreen> createState() => _MachineBookingScreenState();
|
||||
}
|
||||
|
||||
class _MachineBookingScreenState extends ConsumerState<MachineBookingScreen> {
|
||||
DateTime _selectedDate = DateTime.now();
|
||||
TimeSlot? _selectedSlot;
|
||||
bool _isBooking = false;
|
||||
|
||||
Future<void> _confirmBooking(MachineDetail detail) async {
|
||||
final slot = _selectedSlot;
|
||||
if (slot == null) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text('Sélectionnez un créneau horaire')),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
setState(() => _isBooking = true);
|
||||
try {
|
||||
await ref.read(bookingRepositoryProvider).createBooking(
|
||||
machineUuid: detail.machine.uuid,
|
||||
slotStart: slot.start,
|
||||
slotEnd: slot.end,
|
||||
);
|
||||
ref.invalidate(bookingsProvider);
|
||||
if (mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Créneau réservé avec succès'),
|
||||
backgroundColor: AppColors.success,
|
||||
),
|
||||
);
|
||||
context.go(AppRoutes.bookings);
|
||||
}
|
||||
} on BookingException catch (e) {
|
||||
if (mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(e.message), backgroundColor: AppColors.error),
|
||||
);
|
||||
}
|
||||
} finally {
|
||||
if (mounted) setState(() => _isBooking = false);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final detailAsync = ref.watch(machineDetailProvider(widget.machineUuid));
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.background,
|
||||
appBar: AppBar(title: const Text('Réserver un créneau')),
|
||||
body: detailAsync.when(
|
||||
loading: () => const Center(child: CircularProgressIndicator()),
|
||||
error: (_, __) => Center(child: Text('Machine introuvable', style: Theme.of(context).textTheme.titleMedium)),
|
||||
data: (detail) {
|
||||
final machine = detail.machine;
|
||||
final availabilityAsync = ref.watch(
|
||||
machineAvailabilityProvider((uuid: machine.uuid, date: _selectedDate)),
|
||||
);
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
children: [
|
||||
Card(
|
||||
child: ListTile(
|
||||
leading: CircleAvatar(
|
||||
backgroundColor: AppColors.primary.withValues(alpha: 0.1),
|
||||
child: Icon(
|
||||
MachineStatusTheme.iconForType(machine.type),
|
||||
color: AppColors.primary,
|
||||
),
|
||||
),
|
||||
title: Text(machine.name),
|
||||
subtitle: Text(
|
||||
[
|
||||
machine.typeLabel,
|
||||
if (detail.establishmentName != null) detail.establishmentName,
|
||||
].join(' · '),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text('Choisir un jour', style: Theme.of(context).textTheme.titleMedium),
|
||||
const SizedBox(height: 10),
|
||||
SizedBox(
|
||||
height: 44,
|
||||
child: ListView.separated(
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemCount: 6,
|
||||
separatorBuilder: (_, __) => const SizedBox(width: 8),
|
||||
itemBuilder: (context, index) {
|
||||
final date = DateTime.now().add(Duration(days: index));
|
||||
final normalized = DateTime(date.year, date.month, date.day);
|
||||
final isSelected = normalized.year == _selectedDate.year &&
|
||||
normalized.month == _selectedDate.month &&
|
||||
normalized.day == _selectedDate.day;
|
||||
|
||||
return ChoiceChip(
|
||||
label: Text(DateFormat('EEE dd/MM', 'fr_FR').format(normalized)),
|
||||
selected: isSelected,
|
||||
onSelected: (_) => setState(() {
|
||||
_selectedDate = normalized;
|
||||
_selectedSlot = null;
|
||||
}),
|
||||
selectedColor: AppColors.primary.withValues(alpha: 0.15),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text('Créneaux disponibles', style: Theme.of(context).textTheme.titleMedium),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
'Vous aurez 30 min pour démarrer après le début du créneau.',
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
availabilityAsync.when(
|
||||
loading: () => const Center(child: Padding(
|
||||
padding: EdgeInsets.all(24),
|
||||
child: CircularProgressIndicator(),
|
||||
)),
|
||||
error: (_, __) => const Text('Impossible de charger les créneaux.'),
|
||||
data: (slots) {
|
||||
if (slots.isEmpty) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
child: Text(
|
||||
'Aucun créneau disponible ce jour.',
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
),
|
||||
);
|
||||
}
|
||||
return Wrap(
|
||||
spacing: 8,
|
||||
runSpacing: 8,
|
||||
children: slots.map((slot) {
|
||||
final label =
|
||||
'${DateFormat('HH:mm').format(slot.start)} – ${DateFormat('HH:mm').format(slot.end)}';
|
||||
final isSelected = _selectedSlot?.start == slot.start;
|
||||
|
||||
return FilterChip(
|
||||
label: Text(label),
|
||||
selected: isSelected,
|
||||
onSelected: (_) => setState(() => _selectedSlot = slot),
|
||||
selectedColor: AppColors.primary.withValues(alpha: 0.15),
|
||||
checkmarkColor: AppColors.primary,
|
||||
);
|
||||
}).toList(),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SafeArea(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 8, 16, 16),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 56,
|
||||
child: ElevatedButton.icon(
|
||||
onPressed: _isBooking ? null : () => _confirmBooking(detail),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppColors.primary,
|
||||
foregroundColor: Colors.white,
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
|
||||
textStyle: const TextStyle(fontSize: 17, fontWeight: FontWeight.w600),
|
||||
),
|
||||
icon: _isBooking
|
||||
? const SizedBox(
|
||||
width: 22,
|
||||
height: 22,
|
||||
child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white),
|
||||
)
|
||||
: const Icon(Icons.event_available_rounded, size: 24),
|
||||
label: Text(_isBooking ? 'Réservation…' : 'Confirmer la réservation'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user