TransferSchedule.fromJson constructor

TransferSchedule.fromJson(
  1. Object? json
)

Implementation

factory TransferSchedule.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return TransferSchedule(
    delayDays: (map['delay_days'] as num).toInt(),
    interval: (map['interval'] as String),
    monthlyAnchor: map['monthly_anchor'] == null
        ? null
        : (map['monthly_anchor'] as num).toInt(),
    weeklyAnchor: map['weekly_anchor'] == null
        ? null
        : (map['weekly_anchor'] as String),
  );
}