From 42fb5c21937cc777607450619b9867b4ec5328ec Mon Sep 17 00:00:00 2001 From: tanlinxing Date: Tue, 10 Sep 2024 14:31:09 +0800 Subject: [PATCH] 1234 --- lib/pages/pass_track/controller.dart | 4 ++-- lib/pages/pass_track/view.dart | 13 ++++++------- lib/service/base.dart | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/pages/pass_track/controller.dart b/lib/pages/pass_track/controller.dart index 43dae7f..4da7be8 100644 --- a/lib/pages/pass_track/controller.dart +++ b/lib/pages/pass_track/controller.dart @@ -177,8 +177,8 @@ class PassTrackController extends GetxController { } on Exception { platformVersion = 'Failed to get platform version.'; } - await _passTrackPlugin.create(600, 600); - // mapcontroller.height.toInt(), mapcontroller.width.toInt()); + await _passTrackPlugin.create( + mapcontroller.height.toInt(), mapcontroller.width.toInt()); fileHandle.textureId = await _passTrackPlugin.getTextureId() ?? -1; print("textureId: ${fileHandle.textureId}"); print("${mapcontroller.height.toInt()}"); diff --git a/lib/pages/pass_track/view.dart b/lib/pages/pass_track/view.dart index 8b9bb39..f6320e5 100644 --- a/lib/pages/pass_track/view.dart +++ b/lib/pages/pass_track/view.dart @@ -141,13 +141,7 @@ class PassTrackView extends GetView { children: [ ScenceMapView( children: [ - - ], - onUpdate: (Offset center, double scale, double rotation) { - print("center:$center scale:$scale rotation:$rotation"); - }, - ), - Positioned( + Positioned( top: mapcontroller.top, left: mapcontroller.left, child: SizedBox( @@ -155,6 +149,11 @@ class PassTrackView extends GetView { height: mapcontroller.height, // child: Text('Running on: $_platformVersion\n'), child: Texture(textureId: fileHandle.textureId))), + ], + onUpdate: (Offset center, double scale, double rotation) { + print("center:$center scale:$scale rotation:$rotation"); + }, + ), Positioned( width: isPortrait ? size.width * .63 : size.width * .41, left: isPortrait ? 190 : 200, diff --git a/lib/service/base.dart b/lib/service/base.dart index 2f448b0..ed7c0f2 100644 --- a/lib/service/base.dart +++ b/lib/service/base.dart @@ -10,7 +10,7 @@ class BaseService { //创建client实例 final _client = http.Client(); final String token = - "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc1IiOjAsInJvbGVJZHMiOlsiODMiXSwidXNlcm5hbWUiOiJseWNzIiwidXNlcklkIjozNTYsIlBWIjoyLCJvcmciOiJhIiwiaWF0IjoxNzI1NTI2MDc0LCJleHAiOjE3MjY4MjIwNzR9.l47sd4L8OswBcHJxamGe9M5ttWqiukoJvE5QfwPARlw"; + "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc1IiOjAsInJvbGVJZHMiOlsiODMiXSwidXNlcm5hbWUiOiJseWNzIiwidXNlcklkIjozNTYsIlBWIjoyLCJvcmciOiJhIiwiaWF0IjoxNzI1OTQ5NDUxLCJleHAiOjE3MjcyNDU0NTF9.o3cwloJcWAPclGXMzlmjIMM2x5GhBseToJe99vM4uVA"; // String baseUrl = "http://192.168.1.189:8001";//本地 String baseUrl = "http://1.82.251.83:8001"; //线上