Uint8ListConverter class

JSON converter for Uint8List byte arrays.

This converter enables automatic JSON serialization and deserialization of Uint8List objects in classes annotated with @JsonSerializable. Uint8List objects are converted to List

Used with the @Uint8ListConverter() annotation on fields:

@JsonSerializable()
class MyClass {
  @Uint8ListConverter()
  final Uint8List publicKey;
}

Constructors

Uint8ListConverter()
Creates a const Uint8ListConverter.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fromJson(List<int> json) Uint8List
Converts a JSON list of integers to a Uint8List.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson(Uint8List object) List<int>
Converts a Uint8List to a JSON-compatible list of integers.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited