displayError function
void
displayError(
- dynamic error
Implementation
void displayError(dynamic error) {
log("Error: $error");
Fluttertoast.showToast(
msg: "An error occurred: ${error.toString()}",
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.BOTTOM,
timeInSecForIosWeb: 1,
backgroundColor: Colors.red,
textColor: Colors.white,
fontSize: 16.0,
);
}