accomodate for situations where theres no site icon
This commit is contained in:
parent
c3c6c05f7f
commit
1f304344b2
|
@ -117,16 +117,18 @@ class InstancePage extends HookWidget {
|
|||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 40),
|
||||
child: FullscreenableImage(
|
||||
url: site.site.icon,
|
||||
child: CachedNetworkImage(
|
||||
width: 100,
|
||||
height: 100,
|
||||
imageUrl: site.site.icon,
|
||||
errorWidget: (_, __, ___) =>
|
||||
const Icon(Icons.warning),
|
||||
),
|
||||
),
|
||||
child: site.site.icon == null
|
||||
? const SizedBox(height: 100, width: 100)
|
||||
: FullscreenableImage(
|
||||
url: site.site.icon,
|
||||
child: CachedNetworkImage(
|
||||
width: 100,
|
||||
height: 100,
|
||||
imageUrl: site.site.icon,
|
||||
errorWidget: (_, __, ___) =>
|
||||
const Icon(Icons.warning),
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(site.site.name,
|
||||
style: theme.textTheme.headline6),
|
||||
|
|
Loading…
Reference in New Issue