CreateRule.fromJson constructor

CreateRule.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory CreateRule.fromJson(Map<String, dynamic> json) {
  return CreateRule(
    cronExpression: json['CronExpression'] as String?,
    interval: json['Interval'] as int?,
    intervalUnit: (json['IntervalUnit'] as String?)?.toIntervalUnitValues(),
    times: (json['Times'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
  );
}