diff --git a/lib/pages/main_page.dart b/lib/pages/main_page.dart index ef396ef..9d6c77b 100644 --- a/lib/pages/main_page.dart +++ b/lib/pages/main_page.dart @@ -40,7 +40,7 @@ class MyHomePage extends StatelessWidget { body: pageProvider.currentPageData['page'], bottomNavigationBar: NavigationBar( onDestinationSelected: isConfigured - ? pageProvider.currentPage + ? pageProvider.setCurrentPage : (value) => AwesomeDialog( context: context, dialogType: DialogType.info, diff --git a/lib/providers/page_provider.dart b/lib/providers/page_provider.dart index ce1741a..8184ee7 100644 --- a/lib/providers/page_provider.dart +++ b/lib/providers/page_provider.dart @@ -14,7 +14,7 @@ class PageProvider extends ChangeNotifier { int get currentPageIndex => _currentPage.index; - void currentPage(int index) { + void setCurrentPage(int index) { showForm = false; _currentPage = Pages.values[index]; notifyListeners();