Search packages, repositories and app categories

Package detailsv2.0.0

snack

An extension library for easier access to commonly used functionality for SnackBars

AndroidiOSWebmacOSWindowsLinux
30-day downloads
160
Likes
22
Pub points
155

Install package

flutter pub add snack

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Snack is a lightweight Flutter/Dart package that simplifies the creation and management of SnackBars with intuitive extensions. It enhances the standard Snackbar API by providing concise, readable syntax for displaying temporary notifications across all major platforms. The library reduces boilerplate code, enabling developers to quickly show messages with customizable duration, actions, and styling. Ideal for improving user feedback in apps with minimal setup. Built with simplicity and developer experience in mind, it integrates seamlessly into existing Flutter projects.

Use cases

  • Quickly display user feedback messages
  • Enhance UI with consistent snack bar patterns
  • Reduce boilerplate in notification handling
  • Improve accessibility with structured APIs
  • Support multi-platform snack bar implementations

Key features

  • Extension methods for easy Snackbar creation
  • Customizable duration and actions
  • Consistent API across platforms
  • Minimal setup and configuration
  • Built-in support for all Flutter platforms

Suitable for

  • Flutter developers seeking simple snack bar solutions
  • Projects requiring rapid UI feedback
  • Teams prioritizing clean, readable code
  • Cross-platform mobile and web applications
  • Apps with frequent user interaction prompts

Considerations

  • Limited to Snackbar-specific functionality
  • Does not replace full toast libraries
  • Requires understanding of Flutter's Scaffold context
  • May need additional styling for complex designs
  • Not suitable for persistent notifications

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

snack

snack pub style: pedantic license

Extensions for SnackBars and other goodies 🍭

Usage

SnackBar().show(context);

Example

class Example extends StatelessWidget {
  final bar = SnackBar(content: Text('Hello, world!'));
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: RaisedButton(
        child: Text('Show snack'),
        onPressed: () => bar.show(context),
      ),
    );
  }
}

Categories

Source repository

Projects using this package

No data available yet.