ChargeOrId.fromJson constructor

ChargeOrId.fromJson(
  1. Object? json
)

Implementation

factory ChargeOrId.fromJson(Object? json) {
  if (json is String) {
    return ChargeId(id: json);
  }
  return Charge.fromJson(json);
}