This Flutter app interacts with The Movie Database (TMDB) API to display and manage movie information. Made by LLM
The app offers the following key features:
- Browse movies by different categories (popular, top-rated, upcoming, now playing)
- Search for movies
- View detailed movie information
- Mark movies as favorites
- Apply filters (genre, release year, rating range)
- Toggle between light and dark themes
- Persistent storage of favorites
- Get a TMDB API key from themoviedb.org.
- Create a
lib/config.dartfile based on thelib/config.template.dartfile:class Config { static const String apiKey = 'your_api_key_here'; }
- Run
flutter pub getto install dependencies. - Run the app using
flutter run.
- Language: Dart
- UI Framework: Flutter
- Architecture: Stateful Widgets with some separation of concerns
- Networking: http package
- JSON Parsing: dart:convert
- State Management: setState and StreamController for favorites
- Navigation: Flutter's built-in navigation
- Data Persistence: shared_preferences for storing favorites
- UI Components: Material Design
- Build System: Flutter's built-in build system
- Minimum SDK: Flutter 3.5.3
- Browse movies by different categories (popular, top-rated, upcoming, now playing)
- Search for movies
- View detailed movie information
- Mark movies as favorites
- Apply filters (genre, release year, rating range)
- Toggle between light and dark themes
- Persistent storage of favorites
The app uses a simple architecture based on stateful widgets:
- Model: Represented by the movie data structure (Map<String, dynamic>)
- View: Flutter widgets in various screen files
- Controller: Logic embedded within stateful widgets (e.g., _MovieListPageState)
- The
_MovieListPageStatefetches data directly from the TMDB API - Data is stored in the widget's state and exposed to the UI components
- UI components rebuild when the state changes using setState
