Skip to content

Commit

Permalink
chore 🔧: rename getScrollOffset to _getScrollOffset
Browse files Browse the repository at this point in the history
  • Loading branch information
krolmic committed Oct 15, 2024
1 parent a933542 commit 7dde9e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tracking_flutter/lib/graph/view/widgets/months_selection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class _MonthsSelectionState extends State<_MonthsSelection> {
super.initState();

scrollController = ScrollController(
initialScrollOffset: getScrollOffset(),
initialScrollOffset: _getScrollOffset(),
);

WidgetsBinding.instance.addPostFrameCallback((_) {
Expand All @@ -56,7 +56,7 @@ class _MonthsSelectionState extends State<_MonthsSelection> {
}

void _scrollToSelectedMonth() {
final scrollOffset = getScrollOffset();
final scrollOffset = _getScrollOffset();

if (scrollController.hasClients &&
scrollOffset != scrollController.offset) {
Expand Down Expand Up @@ -162,7 +162,7 @@ class _MonthsSelectionState extends State<_MonthsSelection> {
);
}

double getScrollOffset() {
double _getScrollOffset() {
final selectedMonthIndex = widget.selectedMonth - 1;
return math
.max(
Expand Down
6 changes: 3 additions & 3 deletions tracking_flutter/lib/graph/view/widgets/weeks_selection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class _WeeksSelectionState extends State<_WeeksSelection> {
super.initState();

scrollController = ScrollController(
initialScrollOffset: getScrollOffset(),
initialScrollOffset: _getScrollOffset(),
);

WidgetsBinding.instance.addPostFrameCallback((_) {
Expand All @@ -55,7 +55,7 @@ class _WeeksSelectionState extends State<_WeeksSelection> {
}

void _scrollToSelectedWeek() {
final scrollOffset = getScrollOffset();
final scrollOffset = _getScrollOffset();

if (scrollController.hasClients) {
scrollController.animateTo(
Expand Down Expand Up @@ -159,7 +159,7 @@ class _WeeksSelectionState extends State<_WeeksSelection> {
);
}

double getScrollOffset() {
double _getScrollOffset() {
final selectedWeekIndex = widget.selectedWeek - 1;
return math
.max(
Expand Down

0 comments on commit 7dde9e8

Please sign in to comment.