showSuccessBar<T> method

Future<T?> showSuccessBar<T>({
  1. required Widget content,
  2. FlashPosition position = FlashPosition.bottom,
  3. Duration duration = const Duration(seconds: 3),
  4. Icon? icon = const Icon(Icons.check_circle_outline),
  5. Color? indicatorColor = const Color(0xFF81C784),
  6. FlashBuilder<T>? primaryActionBuilder,
})

Show a success flash bar.

Implementation

Future<T?> showSuccessBar<T>({
  required Widget content,
  FlashPosition position = FlashPosition.bottom,
  Duration duration = const Duration(seconds: 3),
  Icon? icon = const Icon(Icons.check_circle_outline),
  Color? indicatorColor = const Color(0xFF81C784),
  FlashBuilder<T>? primaryActionBuilder,
}) {
  return showFlash<T>(
    context: this,
    duration: duration,
    builder: (context, controller) {
      return FlashBar(
        controller: controller,
        position: position,
        indicatorColor: indicatorColor,
        icon: icon,
        content: content,
        primaryAction: primaryActionBuilder?.call(context, controller),
      );
    },
  );
}