FlexibleTimeRange.fromJson constructor

FlexibleTimeRange.fromJson(
  1. Object? j
)

Implementation

factory FlexibleTimeRange.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return FlexibleTimeRange(
    maxDuration: switch (json['maxDuration']) {
      null => null,
      Object $1 => decodeString($1),
    },
    minDuration: switch (json['minDuration']) {
      null => null,
      Object $1 => decodeString($1),
    },
    startTimeNotEarlierThan: switch (json['startTimeNotEarlierThan']) {
      null => null,
      Object $1 => decodeString($1),
    },
    startTimeNotLaterThan: switch (json['startTimeNotLaterThan']) {
      null => null,
      Object $1 => decodeString($1),
    },
  );
}