jbh_bottom_nav_magnifier 1.0.0 copy "jbh_bottom_nav_magnifier: ^1.0.0" to clipboard
jbh_bottom_nav_magnifier: ^1.0.0 copied to clipboard

Long-press lens and callout bubble for BottomNavigationBar with customizable shape, colors, and animations.

example/lib/main.dart

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

void main() {
  runApp(const ExampleApp());
}

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'jbh_bottom_nav_magnifier Example',
      theme: ThemeData(useMaterial3: true, colorSchemeSeed: Colors.blue),
      home: const HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  int _currentIndex = 0;

  static const List<IconData> _icons = <IconData>[
    Icons.home,
    Icons.search,
    Icons.person,
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('JBH Magnifier Example')),
      body: Center(
        child: Text(
          'Tab: $_currentIndex',
          style: Theme.of(context).textTheme.headlineMedium,
        ),
      ),
      bottomNavigationBar: JbhBottomNavMagnifier(
        currentIndex: _currentIndex,
        child: BottomNavigationBar(
          unselectedItemColor: Colors.red,
          currentIndex: _currentIndex,
          selectedItemColor: Colors.white,
          onTap: (int i) => setState(() => _currentIndex = i),
          items: List.generate(_icons.length, (int i) {
            return BottomNavigationBarItem(
              icon: Icon(_icons[i]),
              label: ['Home', 'Search', 'Profile'][i],
            );
          }),
        ),
      ),
    );
  }
}
1
likes
160
points
14
downloads

Publisher

verified publisherahmetaliasik.com

Weekly Downloads

Long-press lens and callout bubble for BottomNavigationBar with customizable shape, colors, and animations.

Repository (GitHub)
View/report issues

Topics

#bottom-navigation #animation #user-interface #widget #navigation

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on jbh_bottom_nav_magnifier