diff --git a/tracking_flutter/lib/graph/view/widgets/months_selection.dart b/tracking_flutter/lib/graph/view/widgets/months_selection.dart index bb4bd56..c7c2a79 100644 --- a/tracking_flutter/lib/graph/view/widgets/months_selection.dart +++ b/tracking_flutter/lib/graph/view/widgets/months_selection.dart @@ -33,7 +33,7 @@ class _MonthsSelectionState extends State<_MonthsSelection> { super.initState(); scrollController = ScrollController( - initialScrollOffset: getScrollOffset(), + initialScrollOffset: _getScrollOffset(), ); WidgetsBinding.instance.addPostFrameCallback((_) { @@ -56,7 +56,7 @@ class _MonthsSelectionState extends State<_MonthsSelection> { } void _scrollToSelectedMonth() { - final scrollOffset = getScrollOffset(); + final scrollOffset = _getScrollOffset(); if (scrollController.hasClients && scrollOffset != scrollController.offset) { @@ -162,7 +162,7 @@ class _MonthsSelectionState extends State<_MonthsSelection> { ); } - double getScrollOffset() { + double _getScrollOffset() { final selectedMonthIndex = widget.selectedMonth - 1; return math .max( diff --git a/tracking_flutter/lib/graph/view/widgets/weeks_selection.dart b/tracking_flutter/lib/graph/view/widgets/weeks_selection.dart index 4449d1c..5ee6612 100644 --- a/tracking_flutter/lib/graph/view/widgets/weeks_selection.dart +++ b/tracking_flutter/lib/graph/view/widgets/weeks_selection.dart @@ -32,7 +32,7 @@ class _WeeksSelectionState extends State<_WeeksSelection> { super.initState(); scrollController = ScrollController( - initialScrollOffset: getScrollOffset(), + initialScrollOffset: _getScrollOffset(), ); WidgetsBinding.instance.addPostFrameCallback((_) { @@ -55,7 +55,7 @@ class _WeeksSelectionState extends State<_WeeksSelection> { } void _scrollToSelectedWeek() { - final scrollOffset = getScrollOffset(); + final scrollOffset = _getScrollOffset(); if (scrollController.hasClients) { scrollController.animateTo( @@ -159,7 +159,7 @@ class _WeeksSelectionState extends State<_WeeksSelection> { ); } - double getScrollOffset() { + double _getScrollOffset() { final selectedWeekIndex = widget.selectedWeek - 1; return math .max(