release_schedule/lib/view/movie_item.dart

22 lines
648 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
2023-11-11 15:05:11 +01:00
import 'package:release_schedule/model/date_format.dart';
import 'package:release_schedule/model/movie.dart';
class MovieItem extends StatelessWidget {
final MovieData movie;
const MovieItem(this.movie, {super.key});
@override
Widget build(BuildContext context) {
return AnimatedBuilder(
animation: movie,
builder: (context, widget) {
return ListTile(
title: Text(movie.title),
subtitle: Text(
2023-11-16 12:51:45 +01:00
"${dateRelativeToNow(movie.releaseDate.date)}, ${movie.releaseDate.toString()}, ${movie.genres?.join(", ") ?? ""}"));
},
);
}
}