import 'package:wanisdriver/utils/colors.dart'; import 'package:flutter/material.dart'; class CalendarFloatingButton extends StatelessWidget { final String date; final VoidCallback onPrevious; final VoidCallback onNext; final VoidCallback onCenterTap; const CalendarFloatingButton({ required this.date, required this.onPrevious, required this.onNext, required this.onCenterTap, }); @override Widget build(BuildContext context) { return Container( alignment: Alignment.center, child: Row( mainAxisSize: MainAxisSize.min, children: [ GestureDetector( onTap: onPrevious, child: Icon(Icons.arrow_back_ios, color: Theme.of(context).brightness == Brightness.dark ? AppColors.whiteCardColor : AppColors.darkCardColor, size: 16), ), const SizedBox(width: 8), GestureDetector( onTap: onCenterTap, // Open date picker on center tap child: Text( date, style: TextStyle( color: Theme.of(context).brightness == Brightness.dark ? AppColors.whiteCardColor : AppColors.darkCardColor, fontSize: 14, fontFamily: 'Inter', fontWeight: FontWeight.w600, height: 1.71, ), ), ), const SizedBox(width: 8), GestureDetector( onTap: onNext, child: Icon(Icons.arrow_forward_ios, color: Theme.of(context).brightness == Brightness.dark ? AppColors.whiteCardColor : AppColors.darkCardColor, size: 16), ), ], ), ); } }