Skip to content

Commit

Permalink
calendar per default on week tab in landscape
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobkoerber committed Oct 18, 2023
1 parent bdae9e3 commit ef0e342
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/calendarComponent/views/calendars_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CalendarsView extends ConsumerStatefulWidget {
}

class _CalendarsViewState extends ConsumerState<CalendarsView> {
int _selectedCalendarTab = 0;
late int _selectedCalendarTab;

final CalendarController _calendarController = CalendarController();

Expand All @@ -30,6 +30,13 @@ class _CalendarsViewState extends ConsumerState<CalendarsView> {
super.initState();
}

@override
void didChangeDependencies() {
_selectedCalendarTab =
MediaQuery.orientationOf(context) == Orientation.landscape ? 1 : 0;
super.didChangeDependencies();
}

@override
Widget build(BuildContext context) {
return StreamBuilder(
Expand Down

0 comments on commit ef0e342

Please sign in to comment.