parseBoolean function

bool parseBoolean(
  1. CalendarProperty property
)

Parses a CalendarProperty into a boolean value.

Implementation

bool parseBoolean(CalendarProperty property) {
  final value = property.value.toUpperCase();
  if (value == 'TRUE') return true;
  if (value == 'FALSE') return false;
  throw ParseException(
    'Invalid boolean value "${property.value}" for property "${property.name}"',
    lineNumber: property.lineNumber,
  );
}