SmoothFloatingSnackbar constructor

const SmoothFloatingSnackbar({
  1. required Widget content,
  2. Color? backgroundColor,
  3. double? elevation,
  4. EdgeInsetsGeometry? margin,
  5. EdgeInsetsGeometry? padding,
  6. double? width,
  7. ShapeBorder? shape,
  8. HitTestBehavior? hitTestBehavior,
  9. SnackBarAction? action,
  10. double? actionOverflowThreshold,
  11. bool? showCloseIcon,
  12. Color? closeIconColor,
  13. Animation<double>? animation,
  14. VoidCallback? onVisible,
  15. DismissDirection? dismissDirection,
  16. Clip clipBehavior = Clip.hardEdge,
  17. Duration? duration,
  18. Key? key,
})

Implementation

const SmoothFloatingSnackbar({
  required super.content,
  super.backgroundColor,
  super.elevation,
  EdgeInsetsGeometry? margin,
  super.padding,
  super.width,
  super.shape,
  super.hitTestBehavior,
  super.action,
  super.actionOverflowThreshold,
  super.showCloseIcon,
  super.closeIconColor,
  super.animation,
  super.onVisible,
  super.dismissDirection,
  super.clipBehavior = Clip.hardEdge,
  Duration? duration,
  super.key,
}) : super(
       margin: margin ?? const EdgeInsetsDirectional.all(SMALL_SPACE),
       duration:
           duration ??
           (action != null
               ? const Duration(seconds: 10)
               : SnackBarDuration.short),
       behavior: SnackBarBehavior.floating,
     );