pure static method

Map<String, dynamic> pure(
  1. dynamic data, [
  2. String? type
])

Implementation

static Map<String, dynamic> pure(dynamic data, [String? type]) {
  if (data is! Uint8List && type == null) {
    throw ArgumentError.notNull("type");
  }

  return {
    "Pure": List<int>.from(data is Uint8List
        ? data
        : // NOTE: We explicitly set this to be growable to infinity, because we have maxSize validation at the builder-level:
        builder.ser(type, data).toBytes())
  };
}