远程遥控开发中
This commit is contained in:
@@ -27,14 +27,24 @@ class CenterControlArea extends StatelessWidget {
|
||||
final double emergencyStopButtonWidth = constraints.maxWidth * 0.5;
|
||||
|
||||
return Container(
|
||||
height: 180,
|
||||
// 这里不再使用 Row 包装三个 Expanded,而是直接固定宽度
|
||||
child: Row(
|
||||
//mainAxisSize: MainAxisSize.min, // 极其重要:防止在 spaceBetween 下挤压
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
// 左摇杆 (3份)
|
||||
_buildSliderBox(expandedWidth, "底盘", true),
|
||||
// _buildSliderBox(expandedWidth, "底盘", true),
|
||||
SizedBox(
|
||||
width: expandedWidth,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
_buildSliderBox(expandedWidth, "底盘", true),
|
||||
SizedBox(height: totalWidth * 0.01),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// 急停 (2份)
|
||||
SizedBox(
|
||||
@@ -48,17 +58,21 @@ class CenterControlArea extends StatelessWidget {
|
||||
|
||||
const Text(
|
||||
'双击空白处切换视角',
|
||||
style: TextStyle(
|
||||
fontSize: 8,
|
||||
color: Colors.grey,
|
||||
),
|
||||
style: TextStyle(fontSize: 8, color: Colors.grey),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// 右摇杆 (3份)
|
||||
_buildSliderBox(expandedWidth, "备用", false),
|
||||
// _buildSliderBox(expandedWidth, "备用", false),
|
||||
SizedBox(
|
||||
width: expandedWidth,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [_buildSliderBox(expandedWidth, "备用", false)],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -78,9 +92,9 @@ class CenterControlArea extends StatelessWidget {
|
||||
svgStart: "assets/svgs/remote_up.svg",
|
||||
svgCenter: "assets/svgs/remote_layers.svg",
|
||||
svgEnd: "assets/svgs/remote_down.svg",
|
||||
onStart: () => print("$label start"),
|
||||
onCenter: () => print("$label center"),
|
||||
onEnd: () => print("$label end"),
|
||||
onStart: () => debugPrint("$label start"),
|
||||
onCenter: () => debugPrint("$label center"),
|
||||
onEnd: () => debugPrint("$label end"),
|
||||
iconSize: boxWidth * 0.6 * 0.35,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user