Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created December 9, 2019 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azamsharp/5f0206ff75efa7e67e46b0184b989cba to your computer and use it in GitHub Desktop.
Save azamsharp/5f0206ff75efa7e67e46b0184b989cba to your computer and use it in GitHub Desktop.
class MovieListViewModel extends ChangeNotifier {
List<MovieViewModel> movies = List<MovieViewModel>();
Future<void> fetchMovies(String keyword) async {
// TODO
}
}
class MovieViewModel {
final Movie movie;
MovieViewModel({this.movie});
String get title {
return this.movie.title;
}
String get poster {
return this.movie.poster;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment