showSnackbar function
dynamic
showSnackbar(
- String text, {
- int? seconds,
- required BuildContext context,
- bool debugMode = false,
- bool storeLogs = false,
Implementation
showSnackbar(String text,{int? seconds, required BuildContext context, bool debugMode = false, bool storeLogs = false}){
if(debugMode==false || kDebugMode==false)
ScaffoldMessenger.of(context!).showSnackBar(
SnackBar(content: Text(text),
duration: Duration(seconds:seconds??2),
// margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
// behavior: SnackBarBehavior.floating,
)
);
// if(storeLogs==true ){
//
// Map<String,dynamic> request = {
// 'time': Timestamp.now(),
// 'message': text
// };
//
// if(userData!=null){
// FirebaseCollections.users.doc(userData?.userId).collection("snackbarlogs").add(request);
// }
// roughPageLogs.add('${DateTime.now()} $text');
//
// }
}