Reputation: 486
The Flutter stack below is not working as it should, or I'm doing something wrong. I want to create the following stack:
1 and 3 show, but number 2 is not showing. I'm at a loss here since practically the same setup is working fine somewhere else and I've been breaking my head over this. Can anyone tell me what's going on here?
Stack(alignment: Alignment.center, fit: StackFit.passthrough, children: [
widget.currentTrick.imageUrl != null
? Hero(tag: widget.currentTrick.id + "image", child: CachedNetworkImage(imageUrl: widget.currentTrick.imageUrl, fit: BoxFit.cover))
: Container(color: AppTheme.colorPrimary),
Container(
color: Colors.black.withOpacity(0.9),
),
Center(
child: Hero(
tag: widget.currentTrick.id + "title",
child: Text(
widget.currentTrick.title,
textAlign: TextAlign.center,
style: AppTheme.bitTitleWhite,
),
),
),
]),
Upvotes: 1
Views: 1785