fabrik_snackbar
fabrik_snackbar is a customizable, production-ready solution for showing snackbars and toasts in your Flutter app. It ships with prebuilt semantic variants — success, error, info, warning — and a fully configurable custom mode.
Installation
Section titled “Installation”Add the package to your pubspec.yaml:
dependencies: fabrik_snackbar: ^0.1.7Then run:
flutter pub getImport it in your Dart files:
import 'package:fabrik_snackbar/fabrik_snackbar.dart';Snackbars
Section titled “Snackbars”Choose from prebuilt semantic variants or create a fully custom snackbar.
Success
Section titled “Success”FabrikSnackbar.success( context, title: 'Registration Successful', message: 'You have been successfully registered.',);FabrikSnackbar.error( context, title: 'Something went wrong', message: 'Please try again later.',);FabrikSnackbar.info( context, title: 'Update Available', message: 'A new version of the app is ready to install.',);Warning
Section titled “Warning”FabrikSnackbar.warning( context, title: 'Unstable Connection', message: 'Your internet connection may be slow.',);Custom
Section titled “Custom”FabrikSnackbar.custom( context, title: 'Custom Snackbar', message: 'Fully styled to your design.', backgroundColor: Colors.deepPurple, borderRadius: BorderRadius.circular(16), duration: const Duration(seconds: 3),);Toasts
Section titled “Toasts”FabrikToast is a lightweight, floating message that appears above the UI — ideal for short, non-blocking feedback.
FabrikToast.show( context, message: 'Copied to clipboard',);Toasts use sensible defaults and disappear automatically.
When to Use Which
Section titled “When to Use Which”| Use case | Recommended |
|---|---|
| Form submission result | FabrikSnackbar.success / .error |
| Network or API errors | FabrikSnackbar.error |
| Passive system notifications | FabrikSnackbar.info |
| Low-priority confirmations | FabrikToast.show |
| Fully branded feedback | FabrikSnackbar.custom |