truthyEnv function

bool truthyEnv(
  1. String? v
)

Treats true, 1, yes and on (any case, trimmed) as true.

Implementation

bool truthyEnv(String? v) {
  final s = v?.trim().toLowerCase();
  return s == 'true' || s == '1' || s == 'yes' || s == 'on';
}