snacky 0.0.11 snacky: ^0.0.11 copied to clipboard
Easily display customizable snackbars in Flutter with minimal configuration. Ideal for quick notifications and alerts in your app.
You deserve a simple snack! #
A lot of the current snackbar & toast libraries are too complicated for simple use cases. Snacky is a simple library that allows you to create a snackbar with minimal setup and an easy to use API.
Demo #
https://github.com/Impaktfull/flutter_snacky/assets/21172855/daf176b6-77b1-44d4-a065-5e625d0ee50c
Usage #
@override
Widget build(BuildContext context) {
return SnackyConfiguratorWidget(
app: MaterialApp(
...
),
);
}
Show a snacky #
final snacky = Snacky(
title: 'My super simple snacky title',
);
SnackyController.instance.showMessage(snacky);
Cancel the active snacky #
SnackyController.instance.cancelActiveSnacky()
Cancel all snackies #
SnackyController.instance.cancelAll()
Easy to extend #
You can use your own SnackyController
, SnackyBuilder
and Snacky
-messages. This allows you to create your own snacky messages and use your own snacky controller.
By default the SnackyController
is a singleton, but you can create your own instance of the SnackyController
and use it in your app. Make sure to pass it to the SnackyConfiguratorWidget
so that it can be used in the app.
By default the SnackyBuilder
is a SimpleSnackyBuilder
, but you can create your own SnackyBuilder
and use it in your app. Make sure to pass it to the SnackyConfiguratorWidget
so that it can be used in the app.
Todo #
- ❌ Add tests
- ❌ Add support for "material"-like snackies