SmoothFloatingSnackbar.positive constructor

SmoothFloatingSnackbar.positive({
  1. required BuildContext context,
  2. required String text,
  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

SmoothFloatingSnackbar.positive({
  required BuildContext context,
  required String text,
  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,
       backgroundColor: context
           .extension<SmoothColorsThemeExtension>()
           .success,
       content: Row(
         children: <Widget>[
           Expanded(child: Text(text)),
           const SizedBox(width: SMALL_SPACE),
           const Icon(Icons.check_circle, color: Colors.white),
         ],
       ),
     );