MuqSnackbar constructor
MuqSnackbar({
- required BuildContext context,
- Duration duration = const Duration(seconds: 4),
- MuqPosition position = MuqPosition.top,
- bool autoDismiss = true,
- String? title,
- String? content,
- Duration animationDuration = const Duration(milliseconds: 500),
- Curve? animationCurve,
- WidgetBuilder? builder,
- BorderRadiusGeometry? borderRadius,
- Color? backgroundColor = Colors.white,
- BorderSide? border,
- Widget? leading,
- Widget? trailing,
- List<
BoxShadow> ? shadows, - EdgeInsetsGeometry? padding = const EdgeInsets.all(16),
- EdgeInsetsGeometry? margin = const EdgeInsets.symmetric(horizontal: 16),
- CloseBuilder? closeBuilder,
Constructor of MuqSnackbar
Implementation
MuqSnackbar({
required this.context,
this.duration = const Duration(seconds: 4),
this.position = MuqPosition.top,
this.autoDismiss = true,
this.title,
this.content,
this.animationDuration = const Duration(milliseconds: 500),
this.animationCurve,
this.builder,
this.borderRadius,
this.backgroundColor = Colors.white,
this.border,
this.leading,
this.trailing,
this.shadows,
this.padding = const EdgeInsets.all(16),
this.margin = const EdgeInsets.symmetric(horizontal: 16),
this.closeBuilder,
}) : assert(duration.inMilliseconds > animationDuration.inMilliseconds),
assert((content != null) || builder != null,
'If content are null, builder cannot be null. If builder is null, title and content cannot be null.') {
_show();
}