showErrorSnackBar method

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

Implementation

void showErrorSnackBar(String message, {Duration? duration}) {
  ScaffoldMessenger.of(this).showSnackBar(
    SnackBar(
      content: Row(
        children: [
          const Icon(Icons.error, color: CustomColors.error),
          SizedBox(width: Dimens.standardSpacing),
          Expanded(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [Text(message)],
            ),
          ),
        ],
      ),
      duration: duration ?? const Duration(seconds: 6),
    ),
  );
}