showSnackBar function
Implementation
showSnackBar(String? message, BuildContext? context) {
try {
return ScaffoldMessenger.of(context!).showSnackBar(
SnackBar(
behavior: SnackBarBehavior.floating,
backgroundColor: black,
content: Text(message!, style: const TextStyle(color: white, fontSize: 16, fontWeight: FontWeight.w400)),
duration: const Duration(seconds: 1),
),
);
} catch (e) {
if (kDebugMode) {
print(e);
}
}
}