showToast method

void showToast(
  1. BuildContext context,
  2. String message
)

Implementation

void showToast(BuildContext context, String message) {
  WidgetsBinding.instance!
      .addPostFrameCallback((_) => ScaffoldMessenger.of(context).showSnackBar(
            SnackBar(content: Text(message)),
          ));
}