A feature-rich Flutter application for discovering and exploring trending movies and TV shows. Built with the TMDB API, Showtime delivers a seamless browsing experience with detailed information, personalized favorites, and an elegant dark-themed interface.
- Browse Trending Movies - Discover the latest trending movies with infinite scrolling pagination
- Browse Trending TV Shows - Stay updated with trending television series
- Detailed Content Pages - View comprehensive information including:
- High-quality backdrop and poster images
- Plot overview and synopsis
- Release dates and ratings (out of 10)
- Trailer carousel with YouTube integration
- Favorites Management - Add or remove movies and TV shows to a personalized favorites list
- Unified Favorites View - Access both saved movies and series from a single tab
- Infinite Scroll Pagination - Seamlessly load more content as you scroll to the bottom
- Dark Theme UI - Eye-friendly dark interface optimized for content discovery
- Responsive Grid Layout - Optimized 3-column poster grid for mobile and tablet devices
- Smooth Navigation - Intuitive bottom navigation bar for easy tab switching
- Fast Load Times - Efficient caching and network management
- Flutter 3.0+ - Cross-platform mobile framework
- Dart - Primary programming language
- Provider 6.1.2 - Reactive state management with ChangeNotifier pattern
- Three Dedicated Providers:
MoviesProvider- Handles trending movies and movie favoritesSeriesProvider- Manages TV series and series favoritesVideosProvider- Fetches and manages video trailers
- TMDB API - The Movie Database for comprehensive entertainment data
- HTTP 1.2.2 - Network requests and API communication
- Material Design - Flutter's Material Design system
- Carousel Slider 5.0.0 - Interactive carousel for trailers and clips
- YouTube Player Flutter 9.1.3 - Embedded YouTube video playback
- Shared Preferences 2.3.2 - Local key-value storage for app preferences
- SQLite 2.3.3+1 - Database support for potential future features
- Flutter InAppWebView 6.0.0 - Web content viewing capabilities
- Flutter DotEnv 6.0.0 - Environment variable management for secure API key storage
- Flutter Lints 3.0.0 - Code quality and style guidelines
- Flutter Native Splash 2.4.1 - Beautiful splash screen configuration
lib/
βββ main.dart # App entry point with MultiProvider setup
βββ models/
β βββ movies.dart # Movies data model with TMDB JSON parsing
β βββ series.dart # Series data model with TMDB JSON parsing
β βββ videos.dart # Videos/trailers data model
βββ pages/
β βββ home_page.dart # Main navigation hub with bottom nav bar
β βββ movies_page.dart # Movies grid with infinite scroll
β βββ series_page.dart # TV series grid with infinite scroll
β βββ movies_details_page.dart # Movie detail view with trailers
β βββ series_details_page.dart # TV series detail view
β βββ favs_page.dart # Combined favorites display
βββ provider/
β βββ movies_provider.dart # Movies state management
β βββ series_provider.dart # TV series state management
β βββ videos_provider.dart # Video trailers state management
βββ utils/
βββ constants.dart # TMDB API key and image base URL
βββ colors.dart # App color scheme definitions
Before you begin, ensure you have the following installed:
- Flutter SDK - Version 3.0 or higher
- Dart SDK - Comes bundled with Flutter
- TMDB API Key - Free account at The Movie Database
- Android Studio or Xcode (for iOS development)
- Clone the repository
git clone https://github.com/AritraC1/Showtime.git
cd Showtime- Install dependencies
flutter pub get- Get your TMDB API Key
- Visit themoviedb.org and create a free account
- Go to Settings β API to generate your API key
- Create a
.envfile
In the root of your project, create a .env file with your TMDB API key:
TMDB_API_KEY=your_tmdb_api_key_here- Verify
.gitignore
Make sure your .gitignore includes .env to keep your API key secure:
.env
- How It Works
The app uses flutter_dotenv to load environment variables at runtime. The main.dart initializes the dotenv package:
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await dotenv.load(fileName: ".env");
// ... rest of app initialization
}The API key is accessed from lib/utils/constants.dart:
class Constants {
static String get apiKey => dotenv.env['TMDB_API_KEY'] ?? '';
static const imagePath = 'https://image.tmdb.org/t/p/w500';
}flutter runflutter devices # List available devices
flutter run -d <device_id> # Run on specific deviceflutter run --releaseflutter build apk --releaseflutter build ios --release- Movies Tab - Swipe up to explore trending movies
- TV Series Tab - Swipe up to explore trending series
- Tap any poster - View detailed information about a title
- Overview - Read full plot synopsis
- Release Date - Check when the content was released
- Rating - View average community ratings (0-10 scale)
- Trailers - Watch video clips via YouTube Player
- Add to Favorites - Tap the heart icon on any detail page
- View Favorites - Go to the Favorites tab
- Remove Favorites - Tap the heart icon again to unfavorite
- Favorites persist - During the current app session
- Trending Movies:
/trending/movie/day - Trending TV:
/trending/tv/day - Movie Videos:
/movie/{id}/videos
- Both movies and series support page-based pagination
- Automatic page increments as user scrolls to bottom
- Loading state prevents duplicate requests
| Package | Version | Purpose |
|---|---|---|
provider |
6.1.2 | State management |
http |
1.2.2 | HTTP requests |
carousel_slider |
5.0.0 | Image carousels |
youtube_player_flutter |
9.1.3 | Video playback |
flutter_native_splash |
2.4.1 | App splash screen |
shared_preferences |
2.3.2 | Local storage |
sqflite |
2.3.3+1 | Database support |
flutter_inappwebview |
6.0.0 | Web content |
flutter_dotenv |
6.0.0 | Environment vars |
- Search Functionality - Search for specific movies or series
- Persistent Favorites - Save favorites using SharedPreferences or SQLite
- User Reviews - Read and write user reviews
- Rating & Sorting - Filter content by rating or release date
- Watchlist - "Want to Watch" list alongside favorites
- Dark/Light Theme Toggle - Dynamic theme switching
- Multiple Languages - Localization support
- Cast Information - Display actor and crew details
- Similar Recommendations - Suggest similar movies/shows
- YouTube Player Flutter - Updated to 9.1.3 for improved video playback
- Flutter SDK - Minimum version updated to 3.24.0
- Dart SDK - Minimum version updated to 3.5.0
- Added
flutter_dotenv6.0.0 - Secure environment variable management - Removed hardcoded API key - Now uses
.envfile for sensitive data - Added INTERNET permission - Android manifest now explicitly includes internet permission
- Improved code formatting - Better readability and adherence to Dart style guide
- Dynamic API URL construction - URL builders now use getters for better integration with dotenv
- Async main initialization - App properly initializes dotenv before running
- flutter_inappwebview - Upgraded and properly configured as direct dependency
- YouTube Player Flutter - Updated to latest stable version for better compatibility
Contributions are welcome! We appreciate any improvements, bug fixes, or new features.
- Fork the repository - Create your own copy
- Create a feature branch -
git checkout -b feature/amazing-feature - Make your changes - Implement your improvements
- Commit your changes -
git commit -m 'Add amazing feature' - Push to the branch -
git push origin feature/amazing-feature - Open a Pull Request - Submit your changes for review
- Follow Dart style guide
- Use meaningful variable and function names
- Add comments for complex logic
- Keep methods focused and small
If you encounter any issues or have suggestions:
- Open an Issue on GitHub
- Check existing issues before creating new ones
- Provide detailed information about your problem