111
This commit is contained in:
parent
2f0cd3ef37
commit
36680ec187
|
|
@ -1,6 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:app_upgrade_plugin/widgets/market_selection_dialog.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
|
||||
|
|
@ -413,6 +412,8 @@ mixin _UpgradeDialogLogic<T extends StatefulWidget> on State<T> {
|
|||
context: context,
|
||||
isScrollControlled: false,
|
||||
useRootNavigator: true,
|
||||
isDismissible: !info.isForceUpdate, // 强制更新时不允许通过手势关闭
|
||||
enableDrag: !info.isForceUpdate, // 强制更新时不允许拖拽关闭
|
||||
// UI Beautification: Rounded corners
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
|
||||
|
|
@ -434,13 +435,14 @@ mixin _UpgradeDialogLogic<T extends StatefulWidget> on State<T> {
|
|||
borderRadius: BorderRadius.circular(2),
|
||||
),
|
||||
),
|
||||
// Title and Close Button
|
||||
// Title and Close Button - 强制更新时不显示关闭按钮
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 8.0),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
const Text('选择更新方式', style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)),
|
||||
if (!info.isForceUpdate)
|
||||
Positioned(
|
||||
right: -12,
|
||||
child: IconButton(
|
||||
|
|
@ -470,7 +472,8 @@ mixin _UpgradeDialogLogic<T extends StatefulWidget> on State<T> {
|
|||
|
||||
const Divider(height: 24),
|
||||
|
||||
// Cancel Button
|
||||
// Cancel Button - 强制更新时不显示取消按钮
|
||||
if (!info.isForceUpdate)
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: ElevatedButton(
|
||||
|
|
|
|||
Loading…
Reference in New Issue