calorimeter/lib/calendar.dart

21 lines
531 B
Dart
Raw Normal View History

2024-06-09 12:42:17 +00:00
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(),
),
);
}
}