21 lines
531 B
Dart
21 lines
531 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
class CalendarWidget extends StatelessWidget {
|
|
const CalendarWidget({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: CalendarDatePicker(
|
|
onDateChanged: (value) {
|
|
context.goNamed('perDay', extra: value);
|
|
},
|
|
initialDate: DateTime.now(),
|
|
firstDate: DateTime.now().subtract(const Duration(days: 30)),
|
|
lastDate: DateTime.now(),
|
|
),
|
|
);
|
|
}
|
|
}
|