TokenAccount.fromJson constructor

TokenAccount.fromJson(
  1. Object? json
)

Implementation

factory TokenAccount.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return TokenAccount(
    businessType: map['business_type'] == null
        ? null
        : AccountCreateOptionsBusinessType.fromJson(map['business_type']),
    company:
        map['company'] == null ? null : TokenCompany.fromJson(map['company']),
    individual: map['individual'] == null
        ? null
        : AccountIndividual.fromJson(map['individual']),
    tosShownAndAccepted: map['tos_shown_and_accepted'] == null
        ? null
        : (map['tos_shown_and_accepted'] as bool),
  );
}