warning static method

void warning(
  1. BuildContext context,
  2. String message, {
  3. Duration duration = _defaultShowDuration,
})

Displays a warning-themed SnackBar message.

显示带有警告主题的 SnackBar 消息。

Implementation

static void warning(
  BuildContext context,
  String message, {
  Duration duration = _defaultShowDuration,
}) {
  _showStyledSnackBar(
    context,
    message,
    Colors.orange,
    Icons.warning,
    duration,
  );
}