AccountCreateOptionsTosAcceptance.fromJson constructor

AccountCreateOptionsTosAcceptance.fromJson(
  1. Object? json
)

Implementation

factory AccountCreateOptionsTosAcceptance.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return AccountCreateOptionsTosAcceptance(
    date: map['date'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch((map['date'] as int).toInt()),
    ip: map['ip'] == null ? null : (map['ip'] as String),
    serviceAgreement: map['service_agreement'] == null
        ? null
        : (map['service_agreement'] as String),
    userAgent:
        map['user_agent'] == null ? null : (map['user_agent'] as String),
  );
}