toMap method

Map<String, dynamic> toMap()

Converts this session replay configuration to a platform-channel map.

Returns values consumed by the Android and Apple session replay implementations.

Implementation

Map<String, dynamic> toMap() {
  return {
    'captureTouches': captureTouches,
    'maskAllImages': maskAllImages,
    'maskAllTexts': maskAllTexts,
    'throttleDelayMs': throttleDelay.inMilliseconds,
    'maskAllPlatformViews': maskAllPlatformViews,
    'captureNativeScreens': captureNativeScreens,
    'verifyScreenshotMaskAlignment': verifyScreenshotMaskAlignment,
    if (screenshotScale != null) 'screenshotScale': screenshotScale,
    'screenshotCompressionQuality': screenshotCompressionQuality,
    'screenshotColorMode': screenshotColorMode.name,
    if (sampleRate != null) 'sampleRate': sampleRate,
  };
}