Prechádzať zdrojové kódy

我的页面,蓝牙搜索列表添加SafeArea外层

daxu0403 7 rokov pred
rodič
commit
da41d60f35
1 zmenil súbory, kde vykonal 19 pridanie a 17 odobranie
  1. 19 17
      lib/pages/my_page.dart

+ 19 - 17
lib/pages/my_page.dart

@@ -532,23 +532,25 @@ class _MyPageState extends State < MyPage > with AutomaticKeepAliveClientMixin {
     String btAddress = obj.name.substring(tempIndex + 2, obj.name.length);
     // print(btAddress);
     return InkWell(
-      child: Padding(
-        padding: EdgeInsets.only(bottom: ScreenUtil.getInstance().setHeight(30)),
-        child: Row(
-          mainAxisAlignment: MainAxisAlignment.spaceBetween,
-          children: < Widget > [
-            Text(name),
-            obj.showLoadStauts ? SizedBox(
-              width: ScreenUtil.getInstance().setWidth(35),
-              height: ScreenUtil.getInstance().setHeight(35),
-              child: Image.asset('lib/images/loading.gif'),
-            ) :
-            CircleAvatar(
-              backgroundColor: obj.connectStatus ? Color.fromRGBO(64, 98, 254, 1) : Colors.grey,
-              radius: 6,
-            )
-          ],
-        )
+      child:SafeArea(
+        child:Padding(
+          padding: EdgeInsets.only(bottom: ScreenUtil.getInstance().setHeight(30)),
+          child: Row(
+            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+            children: < Widget > [
+              Text(name),
+              obj.showLoadStauts ? SizedBox(
+                width: ScreenUtil.getInstance().setWidth(35),
+                height: ScreenUtil.getInstance().setHeight(35),
+                child: Image.asset('lib/images/loading.gif'),
+              ) :
+              CircleAvatar(
+                backgroundColor: obj.connectStatus ? Color.fromRGBO(64, 98, 254, 1) : Colors.grey,
+                radius: 6,
+              )
+            ],
+          )
+        ),
       ),
       onTap: () {
         //bluetooth.connnectBT(btAddress);