responsive_navigation_bar 0.1.3 copy "responsive_navigation_bar: ^0.1.3" to clipboard
responsive_navigation_bar: ^0.1.3 copied to clipboard

outdated

A responsive bottom navigation bar. Very beginner friendly. Feel free to contribute.

example/lib/main.dart

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

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  int selectedIndex = 0;

  void changeTab() {
    if (mounted) setState(() {});
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        bottomNavigationBar: NavigationBar(
          selectedIndex: selectedIndex,
          onTabChange: (int index) {
            selectedIndex = index;
            changeTab();
          },
          // showActiveButtonText: false,
          textStyle:
              TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
          navigationBarButtons: [
            NavigationBarButton(
              text: 'Tab 1',
              icon: Icons.people,
              backgroundGradient: const LinearGradient(
                colors: [Colors.yellow, Colors.green, Colors.blue],
              ),
            ),
            NavigationBarButton(
              text: 'Tab 2',
              icon: Icons.star,
              backgroundGradient: const LinearGradient(
                colors: [Colors.cyan, Colors.teal],
              ),
            ),
            NavigationBarButton(
              text: 'Tab 3',
              icon: Icons.settings,
              backgroundGradient: const LinearGradient(
                colors: [Colors.green, Colors.yellow],
              ),
            )
          ],
        ),
      ),
    );
  }
}
49
likes
0
pub points
84%
popularity

Publisher

verified publisherachim.io

A responsive bottom navigation bar. Very beginner friendly. Feel free to contribute.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, flutter_web_plugins

More

Packages that depend on responsive_navigation_bar