showSuccessSnackBar method

void showSuccessSnackBar(
  1. String message, {
  2. Duration? duration,
})

Implementation

void showSuccessSnackBar(String message, {Duration? duration}) {
  ScaffoldMessenger.of(this).showSnackBar(
    SnackBar(
      content: Row(
        children: [
          const Icon(Icons.check_circle, color: CustomColors.success),
          SizedBox(width: Dimens.standardSpacing),
          Expanded(child: Text(message)),
        ],
      ),
      duration: duration ?? const Duration(seconds: 3),
    ),
  );
}