buildCameraSwitch method

Widget buildCameraSwitch(
  1. BuildContext context
)

The button to switch between cameras. 切换相机的按钮

Implementation

Widget buildCameraSwitch(BuildContext context) {
  return MergeSemantics(
    child: IconButton(
      tooltip: textDelegate.sSwitchCameraLensDirectionLabel(
        nextCameraDescription.lensDirection,
      ),
      onPressed: () => switchCameras(),
      icon: Icon(
        Platform.isIOS
            ? Icons.flip_camera_ios_outlined
            : Icons.flip_camera_android_outlined,
        size: 24,
      ),
    ),
  );
}