rand dart fix
This commit is contained in:
@@ -10,7 +10,7 @@ class MyApp extends StatelessWidget {
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: 'NavigationRail Demo',
|
||||
theme: _theme(ThemeData.light().copyWith(
|
||||
accentColor: Colors.red,
|
||||
colorScheme: ColorScheme.fromSwatch().copyWith(secondary: Colors.red),
|
||||
)),
|
||||
darkTheme: ThemeData.dark(),
|
||||
home: Directionality(
|
||||
@@ -26,7 +26,7 @@ class MyApp extends StatelessWidget {
|
||||
appBarTheme: base.appBarTheme.copyWith(elevation: 0.0),
|
||||
floatingActionButtonTheme: base.floatingActionButtonTheme.copyWith(
|
||||
elevation: 2.0,
|
||||
backgroundColor: base.accentColor,
|
||||
backgroundColor: base.colorScheme.secondary,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -96,19 +96,19 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
),
|
||||
tabs: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
title: Text("Folders"),
|
||||
label: Text("Folders"),
|
||||
icon: Icon(Icons.folder),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
title: Text("History"),
|
||||
label: Text("History"),
|
||||
icon: Icon(Icons.history),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
title: Text("Gallery"),
|
||||
label: Text("Gallery"),
|
||||
icon: Icon(Icons.photo_library),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
title: Text("Camera"),
|
||||
label: Text("Camera"),
|
||||
icon: Icon(Icons.camera),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -144,10 +144,10 @@ class NavRail extends StatelessWidget {
|
||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
minWidth: isDense ? _denseRailSize : _railSize,
|
||||
selectedIconTheme: IconThemeData(
|
||||
color: Theme.of(context).accentColor,
|
||||
color: Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
selectedLabelTextStyle: TextStyle(
|
||||
color: Theme.of(context).accentColor,
|
||||
color: Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
unselectedIconTheme: IconThemeData(
|
||||
color: Colors.grey,
|
||||
@@ -157,7 +157,7 @@ class NavRail extends StatelessWidget {
|
||||
onDestinationSelected: (val) => onTap(val),
|
||||
destinations: tabs
|
||||
.map((e) => NavigationRailDestination(
|
||||
label: e.title,
|
||||
label: e.label,
|
||||
icon: e.icon,
|
||||
))
|
||||
.toList(),
|
||||
@@ -169,15 +169,15 @@ class NavRail extends StatelessWidget {
|
||||
child: SafeArea(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
if (drawerHeaderBuilder != null) ...[
|
||||
drawerHeaderBuilder(context),
|
||||
],
|
||||
...[
|
||||
drawerHeaderBuilder(context),
|
||||
],
|
||||
if (showTabs) ...[
|
||||
Expanded(child: buildRail(context, true)),
|
||||
],
|
||||
if (drawerFooterBuilder != null) ...[
|
||||
drawerFooterBuilder(context),
|
||||
],
|
||||
...[
|
||||
drawerFooterBuilder(context),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user