import 'package:gluestack_ui/gluestack_ui.dart';
//...
GSNavigationRail(
selectedIndex: _selectedIndex,
groupAlignment: groupAlignment,
onDestinationSelected: (int index) {
setState(() {
_selectedIndex = index;
});
},
labelType: labelType,
destinations: const <GSNavigationRailDestination>[
GSNavigationRailDestination(
icon: Icon(Icons.favorite_border),
selectedIcon: Icon(Icons.favorite),
label: Text('First'),
),
GSNavigationRailDestination(
icon: Badge(child: Icon(Icons.bookmark_border)),
selectedIcon: Badge(child: Icon(Icons.book)),
label: Text('Second'),
),
GSNavigationRailDestination(
icon: Badge(
label: Text('4'),
child: Icon(Icons.star_border),
),
selectedIcon: Badge(
label: Text('4'),
child: Icon(Icons.star),
),
label: Text('Third'),
),
],
),
To use this widget in your project, include the following import statement in your file.