AccountLinkCreateOptions.fromJson constructor
AccountLinkCreateOptions.fromJson(
- Object? json
Implementation
factory AccountLinkCreateOptions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return AccountLinkCreateOptions(
account: (map['account'] as String),
collect: map['collect'] == null
? null
: AccountLinkCollect.fromJson(map['collect']),
collectionOptions: map['collection_options'] == null
? null
: AccountLinkCollectionOptions.fromJson(map['collection_options']),
expand: map['expand'] == null
? null
: (map['expand'] as List<Object?>)
.map((el) => (el as String))
.toList(),
refreshUrl:
map['refresh_url'] == null ? null : (map['refresh_url'] as String),
returnUrl:
map['return_url'] == null ? null : (map['return_url'] as String),
type: AccountLinkType.fromJson(map['type']),
);
}