Skip to content

Commit

Permalink
feat: expose ToStringOptions directly in rule.toString(…)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasWanke committed Apr 28, 2021
1 parent 19456d8 commit c5291d1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/src/recurrence_rule.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:meta/meta.dart';

import 'by_week_day_entry.dart';
import 'codecs/string/decoder.dart';
import 'codecs/string/encoder.dart';
import 'codecs/string/string.dart';
import 'codecs/text/encoder.dart';
import 'codecs/text/l10n/l10n.dart';
Expand Down Expand Up @@ -254,7 +255,11 @@ class RecurrenceRule {

/// Converts this rule to a machine-readable, RFC-5545-compliant string.
@override
String toString() => RecurrenceRuleStringCodec().encode(this);
String toString({
RecurrenceRuleToStringOptions options =
const RecurrenceRuleToStringOptions(),
}) =>
RecurrenceRuleToStringEncoder(options: options).convert(this);

/// Converts this rule to a human-readable string.
///
Expand Down

0 comments on commit c5291d1

Please sign in to comment.