calendar_bottom_sheet.dart 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import 'package:cs_resources/theme/app_colors_theme.dart';
  2. import 'package:flutter/material.dart';
  3. import 'full_calendar.dart';
  4. class CustomCalendarBottomSheet extends StatelessWidget {
  5. final DateTime firstDate;
  6. final DateTime? lastDate;
  7. final String locale;
  8. final DateTime selectedDate;
  9. final Function(DateTime) onDateChange;
  10. const CustomCalendarBottomSheet({
  11. Key? key,
  12. required this.firstDate,
  13. this.lastDate,
  14. required this.selectedDate,
  15. required this.locale,
  16. required this.onDateChange,
  17. }) : super(key: key);
  18. @override
  19. Widget build(BuildContext context) {
  20. return Column(
  21. mainAxisSize: MainAxisSize.min,
  22. children: [
  23. const SizedBox(height: 20),
  24. Container(
  25. width: 60,
  26. height: 6,
  27. decoration: BoxDecoration(borderRadius: BorderRadius.circular(3.0), color: const Color(0xFFE0E0E0)),
  28. ),
  29. const SizedBox(height: 13.0),
  30. FullCalendar(
  31. startDate: firstDate,
  32. endDate: lastDate,
  33. selectedDate: selectedDate,
  34. padding: 25,
  35. locale: locale,
  36. dateColor: context.appColors.textBlack,
  37. dateSelectedBg: context.appColors.btnBgDefault,
  38. dateSelectedColor: Colors.white,
  39. events: [],
  40. onDateChange: onDateChange,
  41. ),
  42. ],
  43. );
  44. }
  45. }