Skip to content

Commit

Permalink
feat: openfoodfacts#678 - renaming getCurrentPage to getDefaultPage
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurtanuki committed Nov 25, 2021
1 parent 49b21a6 commit 5b51a2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/smooth_app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class SmoothAppGetLanguage extends StatelessWidget {
DefaultAssetBundle.of(context),
languageCode,
);
return SmoothBottomNavigationBar.getCurrentPage();
return SmoothBottomNavigationBar.getDefaultPage();
}

Future<void> _refresh(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ class SmoothBottomNavigationBar extends StatelessWidget {
),
};

static Widget getCurrentPage({
final SmoothBottomNavigationTab tab = _defaultTab,
}) =>
static Widget getDefaultPage() => _getTabPage(_defaultTab);

static Widget _getTabPage(final SmoothBottomNavigationTab tab) =>
_pages[tab]!.body;

@override
Expand All @@ -67,7 +67,7 @@ class SmoothBottomNavigationBar extends StatelessWidget {
onTap: (final int index) async => Navigator.push<Widget>(
context,
MaterialPageRoute<Widget>(
builder: (BuildContext context) => _pages[_tabs[index]]!.body,
builder: (BuildContext context) => _getTabPage(_tabs[index]),
),
),
items: <BottomNavigationBarItem>[
Expand Down

0 comments on commit 5b51a2a

Please sign in to comment.