Skip to content

fabrik_snackbar

pub.dev

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.

Add the package to your pubspec.yaml:

dependencies:
fabrik_snackbar: ^0.1.7

Then run:

Terminal window
flutter pub get

Import it in your Dart files:

import 'package:fabrik_snackbar/fabrik_snackbar.dart';

Choose from prebuilt semantic variants or create a fully custom snackbar.

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.',
);
FabrikSnackbar.warning(
context,
title: 'Unstable Connection',
message: 'Your internet connection may be slow.',
);
FabrikSnackbar.custom(
context,
title: 'Custom Snackbar',
message: 'Fully styled to your design.',
backgroundColor: Colors.deepPurple,
borderRadius: BorderRadius.circular(16),
duration: const Duration(seconds: 3),
);

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.


Use caseRecommended
Form submission resultFabrikSnackbar.success / .error
Network or API errorsFabrikSnackbar.error
Passive system notificationsFabrikSnackbar.info
Low-priority confirmationsFabrikToast.show
Fully branded feedbackFabrikSnackbar.custom