AwesomeCameraSwitchButton constructor

AwesomeCameraSwitchButton({
  1. Key? key,
  2. required CameraState state,
  3. AwesomeTheme? theme,
  4. Widget iconBuilder()?,
  5. void onSwitchTap(
    1. CameraState
    )?,
  6. double scale = 1.3,
})

Implementation

AwesomeCameraSwitchButton({
  super.key,
  required this.state,
  this.theme,
  Widget Function()? iconBuilder,
  void Function(CameraState)? onSwitchTap,
  double scale = 1.3,
})  : iconBuilder = iconBuilder ??
          (() {
            return AwesomeCircleWidget.icon(
              theme: theme,
              icon: Icons.cameraswitch,
              scale: scale,
            );
          }),
      onSwitchTap = onSwitchTap ?? ((state) => state.switchCameraSensor());