fix: Content banner

This commit is contained in:
Krille Fear 2022-12-30 09:04:46 +01:00
parent 338331d6e1
commit d2f472e86c

View File

@ -42,20 +42,27 @@ class ContentBanner extends StatelessWidget {
bottom: 0, bottom: 0,
child: Opacity( child: Opacity(
opacity: opacity, opacity: opacity,
child: LayoutBuilder( child: Hero(
builder: (BuildContext context, BoxConstraints constraints) { tag: heroTag,
return Hero( child: mxContent == null
tag: heroTag, ? Center(
child: MxcImage( child: Icon(
key: Key(mxContent?.toString() ?? 'NoKey'), defaultIcon,
uri: mxContent, color: Theme.of(context)
animated: true, .colorScheme
fit: BoxFit.cover, .onSecondaryContainer,
height: 400, size: 128,
width: 800, ),
), )
); : MxcImage(
}), key: Key(mxContent?.toString() ?? 'NoKey'),
uri: mxContent,
animated: true,
fit: BoxFit.cover,
height: 400,
width: 800,
),
),
), ),
), ),
if (onEdit != null) if (onEdit != null)