showSnackBar method
void
showSnackBar(})
Implementation
void showSnackBar(
String message, {
bool isError = false,
Duration duration = const Duration(seconds: 3),
}) {
ScaffoldMessenger.of(this)
..hideCurrentSnackBar()
..showSnackBar(
SnackBar(
content: Text(message),
backgroundColor: isError ? colors.error : colors.textPrimary,
duration: duration,
),
);
}