displayError function

void displayError(
  1. 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,
  );
}