showWarning static method

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

显示警告提示

Implementation

static void showWarning(
  BuildContext context,
  String message, {
  Duration duration = const Duration(seconds: 2),
}) {
  _showToast(
    context,
    message,
    icon: Icons.warning_amber_rounded,
    iconColor: AppColors.warningOrange,
    backgroundColor: AppColors.lightBeige,
    textColor: AppColors.warningOrangeDark,
    duration: duration,
  );
}