AccountPermissionModel.fromJson constructor

AccountPermissionModel.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory AccountPermissionModel.fromJson(Map<String, dynamic> json) {
  return AccountPermissionModel._(
    type: json['type'] ?? PermissionType.owner.name,
    id: json['id'],
    permissionName: json['permission_name'],
    threshold: BigintUtils.parse(json['threshold']),
    operations: json['operations'],
    keys: (json['keys'] as List?)
            ?.map((e) => PermissionKeysModel.fromJson(e))
            .toList() ??
        <PermissionKeysModel>[],
  );
}