GET_CAPSULES_LDE-EKA
Lucas Delanier 2 years ago
parent 50bee2f529
commit 20def43443

@ -53,7 +53,7 @@ class _PostComponentState extends State<PostComponent> {
onTap: switchChoice, onTap: switchChoice,
child: LayoutBuilder( child: LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) { builder: (BuildContext context, BoxConstraints constraints) {
if (choice && widget.callback == null) { if (widget.callback == null) {
return SizedBox( return SizedBox(
width: double.infinity, width: double.infinity,
child: FutureBuilder( child: FutureBuilder(
@ -119,7 +119,9 @@ class _PostComponentState extends State<PostComponent> {
SizedBox(height: 10), SizedBox(height: 10),
ZoomTapAnimation( ZoomTapAnimation(
onTap: () { onTap: () {
widget.callback!(widget.index); if (widget.post.selfie != null) {
switchChoice();
}
}, },
enableLongTapRepeatEvent: false, enableLongTapRepeatEvent: false,
longTapRepeatDuration: const Duration(milliseconds: 100), longTapRepeatDuration: const Duration(milliseconds: 100),
@ -151,11 +153,12 @@ class _PostComponentState extends State<PostComponent> {
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
children: [ children: [
Image( Image(
image: NetworkImage(user.pp), image: NetworkImage(choice ? widget.post.selfie! : music.cover!),
fit: BoxFit.cover, fit: BoxFit.cover,
width: double.infinity, width: double.infinity,
), ),
Positioned( widget.post.selfie != null
? Positioned(
top: 0, top: 0,
right: 0, right: 0,
child: Padding( child: Padding(
@ -175,12 +178,14 @@ class _PostComponentState extends State<PostComponent> {
borderRadius: BorderRadius.circular(13), borderRadius: BorderRadius.circular(13),
// implement image // implement image
child: Image( child: Image(
image: NetworkImage(music.cover!), image:
NetworkImage(choice ? music.cover! : widget.post.selfie!),
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
), ),
)) ))
: Container(),
], ],
), ),
), ),
@ -246,6 +251,7 @@ class _PostComponentState extends State<PostComponent> {
} }
})); }));
} }
return SizedBox( return SizedBox(
width: double.infinity, width: double.infinity,
child: FutureBuilder( child: FutureBuilder(
@ -363,7 +369,8 @@ class _PostComponentState extends State<PostComponent> {
maxLines: 1, maxLines: 1,
), ),
), ),
Positioned( widget.post.selfie != null
? Positioned(
top: 0, top: 0,
right: 0, right: 0,
child: Padding( child: Padding(
@ -383,12 +390,13 @@ class _PostComponentState extends State<PostComponent> {
borderRadius: BorderRadius.circular(13), borderRadius: BorderRadius.circular(13),
// implement image // implement image
child: Image( child: Image(
image: NetworkImage(user.pp), image: NetworkImage(widget.post.selfie!),
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
), ),
)) ))
: Container(),
], ],
), ),
), ),

Loading…
Cancel
Save