Skip to content

Instantly share code, notes, and snippets.

@rrifafauzikomara
Last active December 14, 2019 16:01
Show Gist options
  • Save rrifafauzikomara/170522bba950287a04cf02ea9a06ce57 to your computer and use it in GitHub Desktop.
Save rrifafauzikomara/170522bba950287a04cf02ea9a06ce57 to your computer and use it in GitHub Desktop.
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_modularization/common/color_helper.dart';
class CardListMovies extends StatelessWidget {
final String image;
final String vote;
final String title;
final String releaseDate;
final List<Widget> genre;
final String overview;
const CardListMovies({Key key, this.image, this.vote, this.title, this.releaseDate, this.genre, this.overview}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.all(5),
child: Card(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
// image
Container(
width: 130,
height: 200,
child: CachedNetworkImage(
imageUrl: image,
errorWidget: (context, url, error) => Icon(Icons.error),
),
),
// content
Container(),
],
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment