远程遥控界面编写

This commit is contained in:
CC
2026-01-19 18:24:24 +08:00
parent 289e706337
commit 32b702fb6d
48 changed files with 1118 additions and 303 deletions

View File

@@ -7,8 +7,13 @@ import '../bloc/remote_control_cubit.dart';
class LeftJoystickArea extends StatelessWidget {
final bool isLocked;
final double width;
const LeftJoystickArea({super.key, required this.isLocked});
const LeftJoystickArea({
Key? key,
required this.isLocked,
required this.width,
}) : super(key: key);
@override
Widget build(BuildContext context) {
@@ -22,7 +27,7 @@ class LeftJoystickArea extends StatelessWidget {
duration: const Duration(milliseconds: 300),
opacity: isLocked ? 0.3 : 1.0, // 锁定后变透明
child: CCJoystick(
radius: 100, // 对应 size(200.dp)
radius: width, // 对应 size(200.dp)
axisHint: AxisHint.forwardBackward,
onValueChanged: (value) {
// 对应 viewModel.updateOriginY(y)
@@ -35,15 +40,16 @@ class LeftJoystickArea extends StatelessWidget {
),
),
),
const SizedBox(height: 8),
const Text(
const SizedBox(height: 18),
Text(
"前后控制",
style: TextStyle(
color: Colors.grey,
color: Colors.white.withValues(alpha: 0.5),
fontSize: 12,
fontWeight: FontWeight.w500,
),
),
const SizedBox(height: 2),
],
);
}