Omri
Omri

Reputation: 803

Adjust image size to card flutter

I'm trying to adjust all pictures (in trailing ListTile) to be as the THIRD one (to lower card).

enter image description here

This is my code so far :

return Card(
child:ListTile(...
...
   trailing: LayoutBuilder(
            builder: (BuildContext context, BoxConstraints constraints) {
              return FadeInImage.memoryNetwork(
                height: constraints.maxHeight,
                placeholder: kTransparentImage,
                image: picture,
              );
            },
          ),

I appreciate any help

Upvotes: 1

Views: 1446

Answers (1)

Omri
Omri

Reputation: 803

By @Manuel suggestion - this is how it worked:

            ...trailing: LayoutBuilder(
          builder: (BuildContext context, BoxConstraints constraints) {
            return FadeInImage.memoryNetwork(
              fit: BoxFit.cover,
              height: constraints.maxHeight,
              width: constraints.maxWidth/3,
              placeholder: kTransparentImage,
              image: picture,
            );
          },
        ),

Upvotes: 1

Related Questions