toJson method

dynamic toJson(
  1. dynamic value,
  2. TypeContext context
)
override

Implementation

toJson(value, TypeContext context) {
  if (value == null) return null;
  Uint8List? bytes = value is Uint8List ? value : null;
  return bytes != null
    ? toByteArray(bytes)
    : null;
}