优化了 启动录制效果

This commit is contained in:
2026-06-05 18:52:47 +08:00
parent 26098114d2
commit e1446337e9
4 changed files with 22 additions and 5 deletions

View File

@@ -298,7 +298,10 @@ class _RecordingPageState extends ConsumerState<RecordingPage> {
onUnlocked: () => viewModel.setTouchLocked(false),
),
if (state.isStartingRecording)
const RecordingLoadingOverlayWidget(message: '正在开始录制…'),
RecordingLoadingOverlayWidget(
message: '正在开始录制…',
backgroundColor: Colors.black.withValues(alpha: 0.24),
),
],
),
),

View File

@@ -46,8 +46,8 @@ class RecordingControlButton extends StatelessWidget {
),
),
AnimatedContainer(
duration: const Duration(milliseconds: 300),
curve: Curves.easeInOutCubic,
duration: const Duration(milliseconds: 500),
curve: Curves.ease,
width: innerSize,
height: innerSize,
decoration: BoxDecoration(

View File

@@ -3,15 +3,20 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
/// 录制加载遮罩(相机启动/开始录制)
class RecordingLoadingOverlayWidget extends StatelessWidget {
const RecordingLoadingOverlayWidget({super.key, required this.message});
const RecordingLoadingOverlayWidget({
super.key,
required this.message,
this.backgroundColor = Colors.black,
});
final String message;
final Color backgroundColor;
@override
/// 显示加载动画与提示文案
Widget build(BuildContext context) {
return ColoredBox(
color: Colors.black,
color: backgroundColor,
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,