titled_nav_bar 1.0.1 copy "titled_nav_bar: ^1.0.1" to clipboard
titled_nav_bar: ^1.0.1 copied to clipboard

A titled simple bottom navigation bar with creamy animation on click.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:titled_nav_bar/titled_nav_bar.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(primarySwatch: Colors.green),
      title: 'Titled Bar',
      home: HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  @override
  State createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  final List<TitledNavBarItem> items = [
    TitledNavBarItem(title: Text('Home'), logo: Icon(Icons.home)),
    TitledNavBarItem(title: Text('Search'), logo: Icon(Icons.search)),
    TitledNavBarItem(
        title: Text('Fire hydrant'), logo: Icon(Icons.fire_hydrant)),
    TitledNavBarItem(title: Text('Profile'), logo: Icon(Icons.person)),
  ];

  bool navBarMode = false;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Titled Bottom Bar"),
      ),
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            Text("Reversed mode:"),
            Switch(
              value: navBarMode,
              onChanged: (v) {
                setState(() => navBarMode = v);
              },
            ),
          ],
        ),
      ),
      bottomNavigationBar: TitledBottomNavBar(
        onTap: (index) => print("Selected Index: $index"),
        reverse: navBarMode,
        curve: Curves.easeInBack,
        items: items,
        activeColor: Colors.green,
        inactiveColor: Colors.blueGrey,
      ),
    );
  }
}
2
likes
40
pub points
0%
popularity

Publisher

verified publisherarman.pw

A titled simple bottom navigation bar with creamy animation on click.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on titled_nav_bar