mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-18 07:44:26 +01:00
fix: logo url dist null check
This commit is contained in:
@@ -161,11 +161,12 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
||||
if (logoUrl == null) return UIs.placeholder;
|
||||
|
||||
final dist = si.status.more[StatusCmdType.sys]?.dist;
|
||||
if (dist == null && (logoUrl.contains('{DIST}') || logoUrl.contains('{BRIGHT}')) ) return UIs.placeholder;
|
||||
if (dist != null) {
|
||||
logoUrl = logoUrl.replaceFirst('{DIST}', dist.name);
|
||||
}
|
||||
logoUrl =
|
||||
logoUrl.replaceFirst('{BRIGHT}', context.isDark ? 'dark' : 'light');
|
||||
|
||||
logoUrl = logoUrl
|
||||
.replaceFirst('{DIST}', dist.name)
|
||||
.replaceFirst('{BRIGHT}', context.isDark ? 'dark' : 'light');
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 13),
|
||||
child: ExtendedImage.network(
|
||||
|
||||
Reference in New Issue
Block a user