|
|
@@ -65,7 +65,8 @@ class DataDetailPage extends StatelessWidget {
|
|
|
..cpPunchedColor = cpColor,
|
|
|
));
|
|
|
|
|
|
- children.add(ViewMapTrace(map.plugMap, data.traceList));
|
|
|
+ children.add(ViewMapTrace(map.plugMap, data.traceList,
|
|
|
+ controller: c.viewMapTraceController));
|
|
|
}
|
|
|
|
|
|
children.add(ViewMapTouch(map.plugMap));
|
|
|
@@ -89,26 +90,28 @@ class DataDetailPage extends StatelessWidget {
|
|
|
final children = <Widget>[];
|
|
|
|
|
|
if (detail != null) {
|
|
|
- final data = detail.dataChartPage.pace.data
|
|
|
- .map((e) =>
|
|
|
- TraceBarData(DataOne(e.x, e.y).toPace())..ts = e.x.milliseconds)
|
|
|
- .toList();
|
|
|
- if (data.isNotEmpty) {
|
|
|
- final ts = data.first.ts - 1.seconds;
|
|
|
- if (ts > Duration.zero) {
|
|
|
- data.insert(0, TraceBarData(null)..ts = ts);
|
|
|
- }
|
|
|
- }
|
|
|
+ final data =
|
|
|
+ detail.traceList.map((e) => TraceBarData(e.pace)..ts = e.ts).toList();
|
|
|
+
|
|
|
children.addAll([
|
|
|
+ const SizedBox(height: 8),
|
|
|
const Text('配速(按时间)'),
|
|
|
- SizedBox(
|
|
|
- child: TraceBar(data, controller: c.traceBarController),
|
|
|
- )
|
|
|
+ TraceBar(
|
|
|
+ data,
|
|
|
+ controller: c.traceBarController,
|
|
|
+ direction: Axis.horizontal,
|
|
|
+ trackWidth: 10,
|
|
|
+ paddingStart: 100,
|
|
|
+ paddingEnd: 100,
|
|
|
+ mask: true,
|
|
|
+ isShowCp: true,
|
|
|
+ cpList: detail.controlPoints,
|
|
|
+ ),
|
|
|
]);
|
|
|
}
|
|
|
|
|
|
return Container(
|
|
|
- decoration: BoxDecoration(color: Colors.white),
|
|
|
+ decoration: const BoxDecoration(color: Colors.white),
|
|
|
height: 73,
|
|
|
width: double.infinity,
|
|
|
child: Column(children: children),
|