showInfo static method

void showInfo(
  1. BuildContext context,
  2. String message, {
  3. Duration duration = const Duration(seconds: 2),
})

Shows an info snackbar.

Implementation

static void showInfo(
  BuildContext context,
  String message, {
  Duration duration = const Duration(seconds: 2),
}) {
  ScaffoldMessenger.of(context).showSnackBar(
    SnackBar(
      content: Text(message),
      behavior: SnackBarBehavior.floating,
      duration: duration,
    ),
  );
}