rename function
parent
3d0c8d3724
commit
6c3915b6ab
|
@ -40,7 +40,7 @@ class MyHomePage extends StatelessWidget {
|
||||||
body: pageProvider.currentPageData['page'],
|
body: pageProvider.currentPageData['page'],
|
||||||
bottomNavigationBar: NavigationBar(
|
bottomNavigationBar: NavigationBar(
|
||||||
onDestinationSelected: isConfigured
|
onDestinationSelected: isConfigured
|
||||||
? pageProvider.currentPage
|
? pageProvider.setCurrentPage
|
||||||
: (value) => AwesomeDialog(
|
: (value) => AwesomeDialog(
|
||||||
context: context,
|
context: context,
|
||||||
dialogType: DialogType.info,
|
dialogType: DialogType.info,
|
||||||
|
|
|
@ -14,7 +14,7 @@ class PageProvider extends ChangeNotifier {
|
||||||
|
|
||||||
int get currentPageIndex => _currentPage.index;
|
int get currentPageIndex => _currentPage.index;
|
||||||
|
|
||||||
void currentPage(int index) {
|
void setCurrentPage(int index) {
|
||||||
showForm = false;
|
showForm = false;
|
||||||
_currentPage = Pages.values[index];
|
_currentPage = Pages.values[index];
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
|
Loading…
Reference in New Issue