requiredBool method

bool requiredBool(
  1. String name
)

Returns the boolean stored for name.

Implementation

bool requiredBool(String name) {
  final value = requiredString(name);
  return switch (value) {
    'true' || '1' => true,
    'false' || '0' => false,
    _ => throw ParameterFormatException(
      'Path parameter "$name" must be true or false.',
      source: value,
    ),
  };
}