call method

  1. @override
FutureOr<EncodedData> call(
  1. Uint8List data
)
override

Encodes the provided data to platform specific format. The encoded data can be added to DataWriterItem.

final item = DataWriterItem();
item.add(Format.plainText('Hello World'));

Implementation

@override
FutureOr<EncodedData> call(Uint8List data) {
  return EncodedData([
    raw.DataRepresentation.simple(
      format: providerFormat,
      data: data,
    ),
  ]);
}