Skip to main content

prism_banner 0.1.0 copy "prism_banner: ^0.1.0" to clipboard
prism_banner: ^0.1.0 copied to clipboard

Dismissible in-app announcement banners for Flutter — release notes, promos, and maintenance notices with persistence, scheduling, and theming. Part of the Prism package family.

example/lib/main.dart

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

/// Demo app for prism_banner.
void main() => runApp(const DemoApp());

/// Root widget showing banner variants.
class DemoApp extends StatelessWidget {
  /// Creates the demo.
  const DemoApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('prism_banner demo')),
        body: Column(
          children: [
            PrismBanner(
              announcements: const [
                PrismAnnouncement(
                  id: 'release-2-1',
                  title: 'New in 2.1',
                  message: 'Dark mode, faster sync, and keyboard shortcuts.',
                  actionLabel: 'See what’s new',
                ),
                PrismAnnouncement(
                  id: 'maintenance',
                  message: 'Scheduled maintenance Sunday 02:00–03:00 UTC.',
                  severity: PrismSeverity.warning,
                ),
              ],
              priority: PrismBannerPriority.severity,
            ),
            Expanded(
              child: Center(
                child: Text(
                  'App content',
                  style: Theme.of(context).textTheme.headlineSmall,
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
0
likes
160
points
33
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Dismissible in-app announcement banners for Flutter — release notes, promos, and maintenance notices with persistence, scheduling, and theming. Part of the Prism package family.

Repository (GitHub)
View/report issues

Topics

#banner #widget #ui #announcement

License

MIT (license)

Dependencies

flutter, shared_preferences

More

Packages that depend on prism_banner