setters method

  1. @override
Map<String, Function> setters()
override

Implementation

@override
Map<String, Function> setters() => {
      'initialCamera': (value) => controller
          .setInitialCamera(Utils.getString(value, fallback: 'front')),
      'message': (value) =>
          controller.updateConfig({'message': Utils.optionalString(value)}),
      'messageStyle': (value) =>
          controller.updateConfig({'messageStyle': value}),
      'showControls': (value) => controller.updateConfig(
          {'showControls': Utils.getBool(value, fallback: true)}),
      'showCaptureControl': (value) => controller.updateConfig(
          {'showCaptureControl': Utils.getBool(value, fallback: true)}),
      'showFlashControl': (value) => controller.updateConfig(
          {'showFlashControl': Utils.getBool(value, fallback: true)}),
      'showCameraLensControl': (value) => controller.updateConfig(
          {'showCameraLensControl': Utils.getBool(value, fallback: true)}),
      'showStatusMessage': (value) => controller.updateConfig(
          {'showStatusMessage': Utils.getBool(value, fallback: true)}),
      'indicatorShape': (value) =>
          controller.updateConfig({'indicatorShape': value}),
      'autoDisableCaptureControl': (value) => controller.updateConfig({
            'autoDisableCaptureControl': Utils.getBool(value, fallback: false)
          }),
      'autoCapture': (value) => controller.updateConfig(
          {'autoCapture': Utils.getBool(value, fallback: false)}),
      'imageResolution': (value) =>
          controller.updateConfig({'imageResolution': value}),
      'defaultFlashMode': (value) =>
          controller.updateConfig({'defaultFlashMode': value}),
      'orientation': (value) =>
          controller.updateConfig({'orientation': value}),
      'performanceMode': (value) =>
          controller.updateConfig({'performanceMode': value}),
      'accuracyConfig': (value) =>
          controller.updateConfig({'accuracyConfig': value}),
    };