warn function

dynamic warn(
  1. bool condition,
  2. String message, {
  3. int backgroundColor = 229,
  4. int foregroundColor = 0,
})

Create a warning message if the condition is false.

Implementation

warn(
  bool condition,
  String message, {
  int backgroundColor = 229,
  int foregroundColor = 0,
}) {
  if (condition) return;
  debugPrint('${_bg(backgroundColor)}${_fg(foregroundColor)}[Warn] $message');
}