thumbDataWithOption method

Future<Uint8List?> thumbDataWithOption(
  1. ThumbOption option, {
  2. PMProgressHandler? progressHandler,
})

Get thumb with size of option.

Implementation

Future<Uint8List?> thumbDataWithOption(
  ThumbOption option, {
  PMProgressHandler? progressHandler,
}) async {
  assert(() {
    option.checkAssert();
    return true;
  }());

  /// Return null if asset is audio or other type, because they don't have such a thing.
  if (type == AssetType.audio || type == AssetType.other) {
    return null;
  }

  return PhotoManager._getThumbDataWithOption(
    id,
    option,
    progressHandler,
  );
}