fromString static method

bool fromString(
  1. String? value
)

Implementation

static bool fromString(String? value) {
  if (value == null) return false;

  final lowered = value.toLowerCase().trim();
  return ['true', 'yes', 'on', '1', 'enabled'].contains(lowered);
}