buildCameraSwitch method
The button to switch between cameras. 切换相机的按钮
Implementation
Widget buildCameraSwitch(BuildContext context) {
return MergeSemantics(
child: IconButton(
tooltip: textDelegate.sSwitchCameraLensDirectionLabel(
nextCameraDescription.lensDirection,
),
onPressed: () => switchCameras(),
icon: Icon(
switch (defaultTargetPlatform) {
TargetPlatform.iOS ||
TargetPlatform.macOS =>
Icons.flip_camera_ios_outlined,
_ => Icons.flip_camera_android_outlined,
},
size: 24,
),
),
);
}