muq_snackbar 0.0.2 muq_snackbar: ^0.0.2 copied to clipboard
With this pack you can create beautiful and stylish snackbars. It can be used as Toast and Snackbar.
MuqSnackbar - #
Media #
How to Use #
OutlinedButton(
onPressed: () {
MuqSnackbar(
context: context,
title: "MuqSnackbar",
content: "This is a MuqSnackbar with bottom position",
leading: const Icon(Icons.info, color: Colors.blue),
position: MuqPosition.bottom,
closeBuilder: (context, closeFunction) {
return IconButton(
onPressed: closeFunction,
icon: const Icon(Icons.close),
);
},
);
},
child: const Text(
"Show MuqSnackbar",
style: TextStyle(color: Colors.black, fontSize: 18),
),
),
and all parameters
/// BuildContext of snackbar
final BuildContext context;
/// Duration of snackbar when autoDismiss is true
final Duration duration;
/// Snackbar position on screen
final MuqPosition position;
/// WidgetBuilder of snackbar
final WidgetBuilder? builder;
/// Set true to dismiss snackbar automatically
final bool autoDismiss;
/// Snackbar title widget
final String? title;
/// Snackbar message widget
final String? content;
/// Animation duration of snackbar
final Duration animationDuration;
/// Animation curve of snackbar
final Curve? animationCurve;
/// BorderRadius of snackbar
final BorderRadiusGeometry? borderRadius;
/// Background color of snackbar
final Color? backgroundColor;
/// Border of snackbar
final BorderSide? border;
/// Leading widget of snackbar
final Widget? leading;
/// Trailing widget of snackbar
final Widget? trailing;
/// Card shadow of snackbar
final List<BoxShadow>? shadows;
/// Card padding of snackbar
final EdgeInsetsGeometry? padding;
/// Card margin of snackbar
final EdgeInsetsGeometry? margin;
/// Snackbar's close function returns a widget
final CloseBuilder? closeBuilder;