configure static method

void configure({
  1. String? telegramToken,
  2. String? telegramChatId,
  3. int? imageQuality,
  4. String? savePath,
  5. ShareMode? shareMode,
  6. List<Map<String, dynamic>>? screenSizes,
  7. List<DeviceType>? deviceTypes,
  8. String? fileNamePrefix,
  9. bool? showButtonsInDebugOnly,
})

Configure the screenshot package with custom settings

Implementation

static void configure({
  String? telegramToken,
  String? telegramChatId,
  int? imageQuality,
  String? savePath,
  ShareMode? shareMode,
  List<Map<String, dynamic>>? screenSizes,
  List<DeviceType>? deviceTypes,
  String? fileNamePrefix,
  bool? showButtonsInDebugOnly,
}) {
  if (telegramToken != null) {
    _instance._telegramToken = telegramToken;
  }
  if (telegramChatId != null) {
    _instance._telegramChatId = telegramChatId;
  }
  if (imageQuality != null) {
    _instance._imageQuality = imageQuality;
  }
  if (savePath != null) {
    _instance._savePath = savePath;
  }
  if (shareMode != null) {
    _instance._shareMode = shareMode;
  }
  if (screenSizes != null) {
    _instance._customScreenSizes = screenSizes;
  }
  if (deviceTypes != null) {
    _instance._deviceTypes = deviceTypes.toSet();
  }
  if (fileNamePrefix != null) {
    _instance._fileNamePrefix = fileNamePrefix;
  }
  if (showButtonsInDebugOnly != null) {
    _instance._showButtonsInDebugOnly = showButtonsInDebugOnly;
  }
}