lazy method

  1. @override
FutureOr<EncodedData> lazy(
  1. DataProvider<Uint8List> provider
)
override

Encodes the provided lazy data. Some platforms support providing the data on demand. In which case the provider callback will be invoked when the data is requested. On platforms that do not support this (iOS, web) the provider callback will be called eagerly.

Implementation

@override
FutureOr<EncodedData> lazy(DataProvider<Uint8List> provider) {
  return EncodedData([
    raw.DataRepresentation.lazy(
      format: providerFormat,
      dataProvider: provider,
    ),
  ]);
}