toText method

String toText({
  1. required RruleL10n l10n,
})

Converts this rule to a human-readable string.

This may only be called on rules that are fully convertable to text.

Implementation

String toText({required RruleL10n l10n}) {
  assert(
    canFullyConvertToText,
    "This recurrence rule can't fully be converted to text. See "
    '[RecurrenceRule.canFullyConvertToText] for more information.',
  );

  return RecurrenceRuleToTextEncoder(l10n).convert(this);
}