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

A global, animated, queued notification bar for Flutter apps. Supports top/bottom positioning, multiple styles, and tap-to-navigate actions.

example/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'NotificationBar Demo',
      home: const DemoPage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('NotificationBar Demo')),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            ElevatedButton(
              onPressed: () {
                NotificationBar().show(
                  context: context,
                  message: 'Feature is off. Tap to enable.',
                  style: NotificationStyle.warning,
                  position: NotificationPosition.top,
                  onTap: () => print('Tapped warning'),
                );
              },
              child: const Text('Show Top Warning'),
            ),
            ElevatedButton(
              onPressed: () {
                NotificationBar().show(
                  context: context,
                  message: 'Settings saved successfully!',
                  style: NotificationStyle.success,
                  position: NotificationPosition.bottom,
                  onTap: () => print('Tapped success'),
                );
              },
              child: const Text('Show Bottom Success'),
            ),
          ],
        ),
      ),
    );
  }
}
0
likes
150
points
14
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A global, animated, queued notification bar for Flutter apps. Supports top/bottom positioning, multiple styles, and tap-to-navigate actions.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on notification_bar