buildCaptureTips method

Widget buildCaptureTips(
  1. CameraController? controller
)

Text widget for shooting tips. 拍摄的提示文字

Implementation

Widget buildCaptureTips(CameraController? controller) {
  final String tips;
  if (pickerConfig.enableRecording) {
    if (pickerConfig.onlyEnableRecording) {
      if (pickerConfig.enableTapRecording) {
        tips = textDelegate.shootingTapRecordingTips;
      } else {
        tips = textDelegate.shootingOnlyRecordingTips;
      }
    } else {
      tips = textDelegate.shootingWithRecordingTips;
    }
  } else {
    tips = textDelegate.shootingTips;
  }
  return AnimatedOpacity(
    duration: recordDetectDuration,
    opacity: controller?.value.isRecordingVideo ?? false ? 0 : 1,
    child: Padding(
      padding: const EdgeInsets.all(20),
      child: Text(
        tips,
        style: const TextStyle(fontSize: 15),
        textAlign: TextAlign.center,
      ),
    ),
  );
}