obtainKey method

  1. @override
Future<PictureKey<String>> obtainKey(
  1. PictureConfiguration picture
)
override

Converts a pictureProvider's settings plus a pictureConfiguration to a key that describes the precise picture to load.

The type of the key is determined by the subclass. It is a value that unambiguously identifies the picture (including its scale) that the load method will fetch. Different PictureProviders given the same constructor arguments and PictureConfiguration objects should return keys that are '==' to each other (possibly by using a class for the key that itself implements ==).

Implementation

@override
Future<PictureKey<String>> obtainKey(PictureConfiguration picture) {
  return SynchronousFuture<PictureKey<String>>(
    PictureKey<String>(
      string,
      colorFilter: colorFilter,
      theme: theme,
    ),
  );
}