rand dart fix
This commit is contained in:
@@ -18,21 +18,21 @@ class MyApp extends StatelessWidget {
|
||||
screen: Screen1(),
|
||||
tab: BottomNavigationBarItem(
|
||||
icon: Icon(Icons.home),
|
||||
title: Text('Home'),
|
||||
label: Text('Home'),
|
||||
),
|
||||
),
|
||||
ScreenTab(
|
||||
screen: Screen2(),
|
||||
tab: BottomNavigationBarItem(
|
||||
icon: Icon(Icons.event),
|
||||
title: Text('Calendar'),
|
||||
label: Text('Calendar'),
|
||||
),
|
||||
),
|
||||
ScreenTab(
|
||||
screen: Screen3(),
|
||||
tab: BottomNavigationBarItem(
|
||||
icon: Icon(Icons.search),
|
||||
title: Text('Search'),
|
||||
label: Text('Search'),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -61,7 +61,7 @@ class _ScaffoldTabBarState extends State<ScaffoldTabBar> {
|
||||
_screens = widget.children;
|
||||
_currentIndex = 0;
|
||||
for (var screen in _screens) {
|
||||
_keys.add(GlobalKey<NavigatorState>(debugLabel: screen?.debugLabel));
|
||||
_keys.add(GlobalKey<NavigatorState>(debugLabel: screen.debugLabel));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,23 +98,23 @@ class _ScaffoldTabBarState extends State<ScaffoldTabBar> {
|
||||
));
|
||||
}
|
||||
return Scaffold(
|
||||
backgroundColor: widget?.backgroundColor,
|
||||
key: widget?.scaffoldKey,
|
||||
drawer: widget?.drawer,
|
||||
endDrawer: widget?.endDrawer,
|
||||
persistentFooterButtons: widget?.persistentFooterButtons,
|
||||
floatingActionButton: widget?.floatingActionButton,
|
||||
floatingActionButtonAnimator: widget?.floatingActionButtonAnimator,
|
||||
floatingActionButtonLocation: widget?.floatingActionButtonLocation,
|
||||
backgroundColor: widget.backgroundColor,
|
||||
key: widget.scaffoldKey,
|
||||
drawer: widget.drawer,
|
||||
endDrawer: widget.endDrawer,
|
||||
persistentFooterButtons: widget.persistentFooterButtons,
|
||||
floatingActionButton: widget.floatingActionButton,
|
||||
floatingActionButtonAnimator: widget.floatingActionButtonAnimator,
|
||||
floatingActionButtonLocation: widget.floatingActionButtonLocation,
|
||||
body: IndexedStack(
|
||||
index: _currentIndex,
|
||||
children: _children,
|
||||
),
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
type: widget?.bottomNavigationBarType,
|
||||
type: widget.bottomNavigationBarType,
|
||||
currentIndex: _currentIndex,
|
||||
onTap: (val) => _onTap(val, context),
|
||||
backgroundColor: widget?.bottomNavigationBarBackgroundColor ??
|
||||
backgroundColor: widget.bottomNavigationBarBackgroundColor ??
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
items: _screens.map((s) => s.tab).toList(),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user