This commit is contained in:
DESKTOP-I3JPKHK\wy 2025-11-28 11:30:49 +08:00
parent 8cefc0007b
commit 6520720767
1 changed files with 43 additions and 28 deletions

View File

@ -897,24 +897,39 @@ mixin _UpgradeDialogLogic<T extends StatefulWidget> on State<T> {
], ],
), ),
), ),
if (info.isForceUpdate) ...[ Container(
const SizedBox(width: 8), padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2),
Container( decoration: BoxDecoration(
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2), color: Colors.white,
decoration: BoxDecoration( borderRadius: BorderRadius.circular(4),
color: colorScheme.error, ),
borderRadius: BorderRadius.circular(4), child: Text(
), formatBytes(info.apkSize!),
child: Text( style: TextStyle(
'强制更新', color: Colors.black,
style: TextStyle( fontSize: 10,
color: colorScheme.onError, fontWeight: FontWeight.w500,
fontSize: 10,
fontWeight: FontWeight.w500,
),
), ),
), ),
], ),
// if (info.isForceUpdate) ...[
// const SizedBox(width: 8),
// Container(
// padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
// decoration: BoxDecoration(
// color: colorScheme.error,
// borderRadius: BorderRadius.circular(4),
// ),
// child: Text(
// '强制更新',
// style: TextStyle(
// color: colorScheme.onError,
// fontSize: 10,
// fontWeight: FontWeight.w500,
// ),
// ),
// ),
// ],
], ],
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
@ -932,18 +947,18 @@ mixin _UpgradeDialogLogic<T extends StatefulWidget> on State<T> {
colorScheme: colorScheme, colorScheme: colorScheme,
), ),
), ),
if (info.apkSize != null) ...[ // if (info.apkSize != null) ...[
const SizedBox(width: 8), // const SizedBox(width: 8),
Expanded( // Expanded(
child: _buildInfoChip( // child: _buildInfoChip(
context, // context,
icon: Icons.file_download, // icon: Icons.file_download,
label: '新版体积', // label: '新版体积',
value: formatBytes(info.apkSize!), // value: formatBytes(info.apkSize!),
colorScheme: colorScheme, // colorScheme: colorScheme,
), // ),
), // ),
], // ],
], ],
), ),
], ],