MuqSnackbar constructor

MuqSnackbar({
  1. Duration duration = const Duration(seconds: 4),
  2. MuqPosition position = MuqPosition.top,
  3. bool autoDismiss = true,
  4. String? title,
  5. String? content,
  6. Duration animationDuration = const Duration(milliseconds: 500),
  7. Curve? animationCurve,
  8. WidgetBuilder? builder,
  9. BorderRadiusGeometry? borderRadius,
  10. Color? backgroundColor = Colors.white,
  11. BorderSide? border,
  12. Widget? leading,
  13. Widget? trailing,
  14. List<BoxShadow>? shadows,
  15. EdgeInsetsGeometry? padding = const EdgeInsets.all(16),
  16. EdgeInsetsGeometry? margin = const EdgeInsets.symmetric(horizontal: 16),
  17. CloseBuilder? closeBuilder,
})

Constructor of MuqSnackbar

Implementation

MuqSnackbar({
  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();
}