Permission.deserialize constructor

Permission.deserialize(
  1. List<int> bytes
)

Implementation

factory Permission.deserialize(List<int> bytes) {
  final decode = TronProtocolBufferImpl.decode(bytes);
  return Permission(
      type: PermissionType.fromValue(decode.getField(1),
          defaultPermission: PermissionType.owner),
      id: decode.getField(2),
      permissionName: decode.getField(3),
      operations: decode.getField(6),
      keys: decode
          .getFields<List<int>>(7)
          .map((e) => TronKey.deserialize(e))
          .toList(),
      parentId: decode.getField(5),
      threshold: decode.getField(4));
}