From 5cffe348c108e0515e657b8cccbddbe178039982 Mon Sep 17 00:00:00 2001 From: SimpleLove520 <1960997571@qq.com> Date: Mon, 23 Sep 2024 14:06:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtestcamera=E6=91=84?= =?UTF-8?q?=E5=83=8F=E5=A4=B4=E6=97=8B=E8=BD=AC=E4=BA=8690=C2=B0=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: SimpleLove520 <1960997571@qq.com> --- ohos/testcamera/lib/CameraPage.dart | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/ohos/testcamera/lib/CameraPage.dart b/ohos/testcamera/lib/CameraPage.dart index 9bf592da..b1448ccf 100644 --- a/ohos/testcamera/lib/CameraPage.dart +++ b/ohos/testcamera/lib/CameraPage.dart @@ -74,20 +74,13 @@ class _CameraPageState extends State { appBar: AppBar( title: Text("daex_texture"), ), - body: AspectRatio( - aspectRatio: 1, - child:Transform.rotate( - angle: 90 * math.pi / 180, - child: Container( - color: Colors.white, - height: 500, - width: 500, - child: Center( - child: body, - ), - ), + body: Container( + color: Colors.white, + height: 500, + child: Center( + child: body, ), - ), + ),` ); } } -- Gitee From 791c44d5c4c4df0f0fd0a67c8a20095ccb599b9e Mon Sep 17 00:00:00 2001 From: SimpleLove520 <1960997571@qq.com> Date: Mon, 23 Sep 2024 14:42:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=AC=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: SimpleLove520 <1960997571@qq.com> --- ohos/testcamera/lib/CameraPage.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ohos/testcamera/lib/CameraPage.dart b/ohos/testcamera/lib/CameraPage.dart index b1448ccf..00efebb4 100644 --- a/ohos/testcamera/lib/CameraPage.dart +++ b/ohos/testcamera/lib/CameraPage.dart @@ -39,7 +39,7 @@ class _CameraPageState extends State { @override void dispose() { super.dispose(); - if (textureId >= 0){ + if (textureId >= 0) { _channel.invokeMethod('unregisterTexture', {'textureId': textureId}); } } @@ -67,7 +67,7 @@ class _CameraPageState extends State { @override Widget build(BuildContext context) { - Widget body = textureId>=0 ? getTextureBody(context) : Text('loading...'); + Widget body = textureId >= 0 ? getTextureBody(context) : Text('loading...'); print('build textureId :$textureId'); return Scaffold( @@ -80,7 +80,7 @@ class _CameraPageState extends State { child: Center( child: body, ), - ),` + ), ); } } -- Gitee