flutter显示track和网格

This commit is contained in:
LiXiaoqi 2024-09-09 11:56:38 +08:00
parent 3497e3fd1c
commit aeccf2eacf
3 changed files with 16 additions and 7 deletions

6
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"cmake.ignoreCMakeListsMissing": true,
"files.associations": {
"dart_native_api.h": "c"
}
}

View File

@ -86,11 +86,11 @@ class _PasstrackState extends State<PassTrackWidget> {
// });
});
var f = initPlatformState();
var future = controller.getHisFileList(_passTrackPlugin);
f.then((void _) {
_passTrackPlugin.setGridColor(const Color.fromARGB(255, 0, 0, 0).value);
_passTrackPlugin.drawGrid();
var future = controller.getHisFileList(_passTrackPlugin);
future.then((value) {
_passTrackPlugin.setScale(1);
for (var TID in controller.deviceMap.keys) {
@ -102,12 +102,15 @@ class _PasstrackState extends State<PassTrackWidget> {
//
var start = DateTime.now().millisecondsSinceEpoch;
// _passTrackPlugin.generateTile(0, value);
_passTrackPlugin.waitForTile();
// _passTrackPlugin.drawGrid();
_passTrackPlugin.waitForTile((){
var start = DateTime.now().millisecondsSinceEpoch;
print("len: ${_passTrackPlugin.allTileCnt()}");
_passTrackPlugin.playTrack(0, value, true, 0, ffi.nullptr);
//
var end = DateTime.now().millisecondsSinceEpoch;
print("耗时:${end - start}");
print("play: ${end - start}");
});
// _passTrackPlugin.drawGrid();
//
});
});
}

@ -1 +1 @@
Subproject commit bc4de9cc6145dd03116e9b0557902d87776e9671
Subproject commit 65de63acc0c565de548b02b15be6554b24ebad11