setEmulatedVisionDeficiency method

Future<void> setEmulatedVisionDeficiency(
  1. @Enum(['none', 'blurredVision', 'reducedContrast', 'achromatopsia', 'deuteranopia', 'protanopia', 'tritanopia']) String type
)

Emulates the given vision deficiency. type Vision deficiency to emulate. Order: best-effort emulations come first, followed by any physiologically accurate emulations for medically recognized color vision deficiencies.

Implementation

Future<void> setEmulatedVisionDeficiency(
  @Enum([
    'none',
    'blurredVision',
    'reducedContrast',
    'achromatopsia',
    'deuteranopia',
    'protanopia',
    'tritanopia',
  ])
  String type,
) async {
  assert(
    const [
      'none',
      'blurredVision',
      'reducedContrast',
      'achromatopsia',
      'deuteranopia',
      'protanopia',
      'tritanopia',
    ].contains(type),
  );
  await _client.send('Emulation.setEmulatedVisionDeficiency', {'type': type});
}