How to paint image size in flutter

Viewed 28

a trying to change this code to become more User Friendly like picture 2, but cant seem to find the right widget. I tried using StaggeredGrid byut there isn't any builder property

class MovieCard extends StatelessWidget {
  const MovieCard({
    Key? key,
    required this.movies,
    required this.index,
  }) : super(key: key);

  final List<Movie> movies;
  final int index;

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [ Container(
        decoration: BoxDecoration(
          color: const Color(0xFFECEFF1),
          borderRadius: BorderRadius.circular(10),
          image: DecorationImage(
            image: NetworkImage('https://image.tmdb.org/t/p/w500${movies[index].poster_path}'),
            fit: BoxFit.fitHeight,
          ),
          border: Border.all(
            color: Colors.black,
            width: 2,
          ),
        ), 
        ),
      ]
    );
  }
} 

change to MovieDblist

0 Answers
Related