showToast function

void showToast(
  1. String? text, {
  2. bool isSuccess = true,
})

Shows a toast message

@param text The text to display in the toast @param isSuccess Whether the operation was successful (default: true)

Implementation

void showToast(String? text, {bool isSuccess = true}) {
  if (isNotNullOrEmpty(text)) {
    ScaffoldMessenger.of(DevLoggerUI.instance.navigatorKey!.currentContext!)
        .showSnackBar(SnackBar(content: Text(text!)));
  }
}