settings static method

void settings({
  1. int? maxCacheSize,
  2. int? maxImages,
  3. ImageProvider<Object>? defaultPlaceholder,
})

Sets the configuration for the PImageService

Implementation

static void settings({
  int? maxCacheSize,
  int? maxImages,
  ImageProvider? defaultPlaceholder,
}) {
  if (maxImages != null) {
    PImageGlobals.pImageInMemoryImages = maxImages;
  }

  if (maxCacheSize != null) {
    PImageGlobals.pImageInMemorySize = maxCacheSize;
  }

  if (defaultPlaceholder != null) {
    _defaultPlaceholder = defaultPlaceholder;
  }
}