isCanceled function

bool isCanceled(
  1. String status
)

Returns true if the status is 'cancelled' or 'canceled' API is inconsistent with the spelling of the word.

Implementation

bool isCanceled(String status) {
  return status.toLowerCase() == 'cancelled' ||
      status.toLowerCase() == 'canceled';
}