flutter_icon_snackbar 1.1.0
flutter_icon_snackbar: ^1.1.0 copied to clipboard
Flutter icon snackbar | Animated snackbar with icons | Easier snackbar over native
flutter_icon_snackbar #
This widget is a simple snackbar of the flutter that contains animations and icons.
Features #
- Easier
- Animated Icons
⚡ Installation #
dependencies:
flutter_icon_snackbar: ^<latest_version>
💪 Usage #
1. common usage #
Default type of icon_snackbar.
![](https://github.com/GiYeongUM/flutter_icon_snackbar/raw/main/images/snackbar_type_1.gif)
IconSnackBar.show(
context: context,
snackBarType: SnackBarType.save,
label: 'Save successfully'
);
2. snackbar type #
Snackbar has many types, and you can set the types of Save, Fail, and Alert. and icon includes animation, and here are the icons that you can use.
![](https://github.com/GiYeongUM/flutter_icon_snackbar/raw/main/images/snackbar_type_2.gif)
![](https://github.com/GiYeongUM/flutter_icon_snackbar/raw/main/images/snackbar_type_3.gif)
IconSnackBar.show(context: context, snackBarType: SnackBarType.error, label: 'Save failed!');
IconSnackBar.show(context: context, snackBarType: SnackBarType.alert, label: 'Data required');
3. custom theme #
Also modify the theme of Snackbar. The theme contains the following data.
class SnackBarStyle {
final Color? backgroundColor;
final Color iconColor;
final TextStyle labelTextStyle;
const SnackBarStyle({this.backgroundColor, this.iconColor = Colors.white, this.labelTextStyle = const TextStyle()});
}