mirrored_repositories/flutter_movie_deep_dive_test/lib/src
import 'package:flutter/material.dart';
import 'package:flutter_movie_deep_dive_test/src/models/models.dart';

class MovieCard extends StatelessWidget {
  final Movie data;

  const MovieCard({Key key, this.data}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.all(8.0),
      child: Card(
        child: Padding(
          padding: const EdgeInsets.all(8.0),
          child: Column(
            children: <Widget>[
              SizedBox(
                height: 284,
                child: Image.network(
                  data.posterPathResolved,
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: Text(
                  data.title,
                  key: Key("${data.id}-title"),
                  textAlign: TextAlign.left,
                  style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
                ),
              ),
              Text(
                data.overview,
                key: Key("${data.id}-overview"),
                style: TextStyle(color: Colors.black54),
              ),
              Padding(
                padding: const EdgeInsets.symmetric(vertical: 16),
                child: Row(
                  children: <Widget>[
                    Icon(Icons.movie),
                    Text('release-date:'),
                    Expanded(
                      child: Padding(
                        padding: const EdgeInsets.only(left: 8),
                        child: Text(
                          data.releaseDate,
                          key: Key("${data.id}-releaseDate"),
                        ),
                      ),
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
