import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'package:oc_front/pages/abstract_page.dart'; import 'package:table_calendar/table_calendar.dart'; class SchedulerFactory implements AbstractFactory { static GlobalKey key = GlobalKey(); @override bool searchFill() { return false; } @override Widget factory(GoRouterState state, List args) { return SchedulerPageWidget(); } @override void search(BuildContext context) { } } class SchedulerPageWidget extends StatefulWidget { SchedulerPageWidget(): super(key: SchedulerFactory.key); @override SchedulerPageWidgetState createState() => SchedulerPageWidgetState(); static void search(BuildContext context) { } static Widget factory() { return SchedulerPageWidget(); } } class SchedulerPageWidgetState extends State { @override Widget build(BuildContext context) { return TableCalendar( firstDay: DateTime.utc(2010, 10, 16), lastDay: DateTime.utc(2030, 3, 14), focusedDay: DateTime.now(), ); } }