configure method

void configure({
  1. String getImageStoreDir()?,
  2. String getSessionId()?,
  3. Future<Uint8List> imageProcessor(
    1. Uint8List buffer, {
    2. int? colors,
    3. int? compressionLevel,
    4. String? format,
    5. int? height,
    6. bool? palette,
    7. int? quality,
    8. int? width,
    })?,
  4. Future<({String? format, int? height, int? width})> getImageMetadata(
    1. Uint8List buffer
    )?,
  5. void logForDebugging(
    1. String, {
    2. String? level,
    })?,
  6. void logError(
    1. Object
    )?,
  7. void logEvent(
    1. String,
    2. Map<String, dynamic>
    )?,
})

Implementation

void configure({
  String Function()? getImageStoreDir,
  String Function()? getSessionId,
  Future<Uint8List> Function(
    Uint8List buffer, {
    int? width,
    int? height,
    String? format,
    int? quality,
    int? compressionLevel,
    bool? palette,
    int? colors,
  })?
  imageProcessor,
  Future<({int? width, int? height, String? format})> Function(
    Uint8List buffer,
  )?
  getImageMetadata,
  void Function(String, {String? level})? logForDebugging,
  void Function(Object)? logError,
  void Function(String, Map<String, dynamic>)? logEvent,
}) {
  if (getImageStoreDir != null) _getImageStoreDir = getImageStoreDir;
  if (getSessionId != null) _getSessionId = getSessionId;
  if (imageProcessor != null) _imageProcessor = imageProcessor;
  if (getImageMetadata != null) _getImageMetadata = getImageMetadata;
  if (logForDebugging != null) _logForDebugging = logForDebugging;
  if (logError != null) _logError = logError;
  if (logEvent != null) _logEvent = logEvent;
}