|
|
@@ -2,6 +2,7 @@ import 'package:application/widget.dart';
|
|
|
import 'package:common_pub/ui/map_view/map_view.dart';
|
|
|
import 'package:common_pub/ui/map_view/view_map_image.dart';
|
|
|
import 'package:common_pub/ui/map_view/view_map_touch.dart';
|
|
|
+import 'package:common_pub/ui/map_view/view_map_user_point.dart';
|
|
|
import 'package:common_pub/ui/map_view/view_plug_loading.dart';
|
|
|
import 'package:common_pub/utils.dart';
|
|
|
import 'field_control_controller.dart';
|
|
|
@@ -50,6 +51,7 @@ class FieldControlPage extends StatelessWidget{
|
|
|
Expanded(child: ViewMapStack(plug: map.plugMap, children: [
|
|
|
ViewPlugLoading(map.plugMap),
|
|
|
ViewMapImage(map.plugMap),
|
|
|
+ _ViewTrace(map: map),
|
|
|
ViewMapTouch(map.plugMap)
|
|
|
])),
|
|
|
_MsgView(),
|
|
|
@@ -60,7 +62,37 @@ class FieldControlPage extends StatelessWidget{
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
+class _ViewTrace extends GetView<FieldControlController>{
|
|
|
+ const _ViewTrace({required this.map});
|
|
|
+ final MapWatchService map;
|
|
|
|
|
|
+ @override
|
|
|
+ Widget build(BuildContext context) {
|
|
|
+ return Obx((){
|
|
|
+ final children = <Widget>[
|
|
|
+
|
|
|
+ ];
|
|
|
+
|
|
|
+ for(final act in controller.activeList){
|
|
|
+ for(final user in act.userList){
|
|
|
+ if(user.isHide.value){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ final trace = user.trace.lastOrNull;
|
|
|
+ if(trace != null){
|
|
|
+ children.add(ViewMapUserPoint(map.plugMap, trace));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return Stack(
|
|
|
+ alignment: Alignment.topLeft,
|
|
|
+ children: children
|
|
|
+ );
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
class _ActiveInfoView extends GetView<FieldControlController>{
|
|
|
|
|
|
@override
|
|
|
@@ -140,7 +172,7 @@ class _UserInfoView extends GetView<FieldControlController>{
|
|
|
Row(
|
|
|
children: [
|
|
|
container(null, cpInfo, Colors.blue),
|
|
|
- container(const Icon(Icons.favorite, size: 13, color: Colors.white,), hrInfo, Colors.blue),
|
|
|
+ container(const Icon(Icons.favorite, size: 13, color: Colors.white,), ' ${hr==0?'--':hr}', 0.toHRPColor()),
|
|
|
container(null, paceInfo, Colors.blue)
|
|
|
],
|
|
|
),
|
|
|
@@ -169,16 +201,17 @@ class _UserInfoView extends GetView<FieldControlController>{
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
- String get hrInfo{
|
|
|
- return ' ${data.gameInfo.hrInfo.hrInfo.lastOrNull??0}';
|
|
|
+ int get hr{
|
|
|
+ return data.gameInfo.hrInfo.hrInfo.lastOrNull?.hr??0;
|
|
|
}
|
|
|
+
|
|
|
String get cpInfo{
|
|
|
- final next = data.gameInfo.gameSaveInfo.nextControlPoint;
|
|
|
- return '${next.orderNo}号点(${next.sn})';
|
|
|
+ final next = data.nextWant;
|
|
|
+ return '${data.gameInfo.gameSaveInfo.nextControlPoint.orderNo}号点(${next?.sn})';
|
|
|
}
|
|
|
String get paceInfo{
|
|
|
Duration;
|
|
|
- return '${data.pace.toMinSecondString()}/km';
|
|
|
+ return data.pace.toString();
|
|
|
}
|
|
|
|
|
|
Widget container(Widget? icon, String text, Color color){
|