feat: 优化设备配对UI展示
This commit is contained in:
parent
1a97c428bc
commit
87bc982707
@ -71,7 +71,10 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
// 左侧按钮
|
||||
ConstrainedBox(
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: maxWidth),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
@ -114,11 +117,14 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
||||
),
|
||||
),
|
||||
),
|
||||
// 按钮间距
|
||||
if (showRight) SizedBox(width: 12.w),
|
||||
),
|
||||
),
|
||||
// 右侧按钮
|
||||
if (showRight)
|
||||
ConstrainedBox(
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: maxWidth),
|
||||
child: TextButton(
|
||||
onPressed: () async {
|
||||
@ -141,7 +147,9 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
||||
elevation: 2,
|
||||
),
|
||||
child: Text(
|
||||
state.otaState.value ? '点击返回设备配对'.tr : '无法连接?尝试升级'.tr,
|
||||
state.otaState.value
|
||||
? '点击返回设备配对'.tr
|
||||
: '无法连接?尝试升级'.tr,
|
||||
style: TextStyle(fontSize: 22.sp),
|
||||
maxLines: 3,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@ -149,6 +157,8 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user