smart_nav_rail 0.0.2
smart_nav_rail: ^0.0.2 copied to clipboard
A smart customizable NavigationRail widget.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:smart_nav_rail/smart_nav_rail.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Smart Nav Rail Demo',
home: Scaffold(
body: Row(
children: [
SmartNavRail(
selectedIndex: 0,
onDestinationSelected: (index) {},
destinations: const [
NavigationRailDestination(
icon: Icon(Icons.home),
label: Text('Home'),
),
NavigationRailDestination(
icon: Icon(Icons.settings),
label: Text('Settings'),
),
],
),
const VerticalDivider(thickness: 1, width: 1),
const Expanded(child: Center(child: Text('Content Area'))),
],
),
),
);
}
}