This widget is a simple snackbar of the flutter that contains animations and icons.
- Easier
- Animated Icons
dependencies:
flutter_icon_snackbar: ^<latest_version>
Default type of icon_snackbar.
IconSnackBar.show(
context: context,
snackBarType: SnackBarType.success,
label: 'Save successfully'
);
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.
IconSnackBar.show(context: context, snackBarType: SnackBarType.error, label: 'Save failed!');
IconSnackBar.show(context: context, snackBarType: SnackBarType.alert, label: 'Data required');
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()});
}