snacky 0.0.1 copy "snacky: ^0.0.1" to clipboard
snacky: ^0.0.1 copied to clipboard

A super simple way to show custom snackbars in Flutter.

Snacky #

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.

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.