your_snackbar 1.1.0
your_snackbar: ^1.1.0 copied to clipboard
Snackbar with customizable feature
π« Your SnackBar #
Your SnackBar is a customizable Snackbar widget for Flutter that lets you create beautiful animations and flexible notification styles.
π Usage #
Add the showYourSnackbar function to display a Snackbar with any content:
onPressed: () => showYourSnackbar(
context,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.airplane_ticket, color: Colors.white),
SizedBox(width: 20),
Flexible(
child: Text(
'Ticket Added',
style: TextStyle(color: Colors.white),
),
),
],
),
),
),
π¨ Styles #
You can use predefined styles or customize your own:
β Success
style: YourSnackbarStyle.success(context),
β Error
style: YourSnackbarStyle.error(context),
βοΈ Custom
style: YourSnackbarStyle(
contentDecoration: const BoxDecoration(),
contentPadding: const EdgeInsets.symmetric(),
showContentCurve: Curves.ease,
hideContentCurve: Curves.bounceIn,
),
Other features #
- You can also set the
isPersistentproperty to true to keep the content in place until itβs swiped away. - You can control when the snackbar should hide with
durationproperty
π§© Animation Example #

π License #
This project is licensed under the MIT License.