{"id":13549711,"url":"https://github.com/bizz84/tmdb_movie_app_riverpod","last_synced_at":"2025-04-07T16:19:19.910Z","repository":{"id":136549878,"uuid":"535574730","full_name":"bizz84/tmdb_movie_app_riverpod","owner":"bizz84","description":"Flutter Movies app with Riverpod (TMDB API)","archived":false,"fork":false,"pushed_at":"2024-05-15T13:57:47.000Z","size":556,"stargazers_count":259,"open_issues_count":2,"forks_count":48,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T14:11:24.228Z","etag":null,"topics":["flutter"],"latest_commit_sha":null,"homepage":"https://codewithandrea.com/","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bizz84.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-12T08:28:12.000Z","updated_at":"2025-03-27T03:07:50.000Z","dependencies_parsed_at":"2023-11-27T11:47:24.055Z","dependency_job_id":"ad44b617-6bf6-4356-89d4-caaa6ed6c5a7","html_url":"https://github.com/bizz84/tmdb_movie_app_riverpod","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bizz84%2Ftmdb_movie_app_riverpod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bizz84%2Ftmdb_movie_app_riverpod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bizz84%2Ftmdb_movie_app_riverpod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bizz84%2Ftmdb_movie_app_riverpod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bizz84","download_url":"https://codeload.github.com/bizz84/tmdb_movie_app_riverpod/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247685634,"owners_count":20979085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flutter"],"created_at":"2024-08-01T12:01:24.691Z","updated_at":"2025-04-07T16:19:19.890Z","avatar_url":"https://github.com/bizz84.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"# Flutter Movies app with Riverpod (TMDB API)\n\nThis is an improved version of my [old movies app](https://github.com/bizz84/movie_app_state_management_flutter) based on the latest Riverpod 2.0 APIs.\n\n\u003cimg src=\"https://github.com/bizz84/tmdb_movie_app_riverpod/blob/main/.github/images/movies-app-preview.png?raw=true\" alt=\"Movies app preview\" width=50% height=50%\u003e\n\n## Motivation\n\nI built this app to showcase the **latest APIs** for popular packages such as Riverpod and GoRouter.\n\nThis is not meant to be a complete movies app, yet it should implement common use cases and features. 👇\n\n## Current Features\n\n- Infinite scrolling with pagination\n- Pull to refresh\n- Search functionality\n- Loading UI with the [Shimmer](https://pub.dev/packages/shimmer) package\n- Stateful nested routing with [`StatefulShellRoute`](https://pub.dev/documentation/go_router/latest/go_router/StatefulShellRoute-class.html)\n\nHere's a detailed tutorial explaining how the pagination and search UI works:\n\n- [Flutter Pagination with Riverpod: The Ultimate Guide](https://codewithandrea.com/articles/flutter-riverpod-pagination/)\n\n## Planned Features (no promises 😅)\n\n- Favourites\n- Responsive UI\n\n## Packages in use\n\n- [flutter_riverpod](https://pub.dev/packages/riverpod) and [riverpod_generator](https://pub.dev/packages/riverpod_generator) for data caching (and much more!)\n- [freezed](https://pub.dev/packages/freezed) for JSON serialization\n- [dio](https://pub.dev/packages/dio) for networking\n- [go_router](https://pub.dev/packages/go_router) for navigation\n- [shimmer](https://pub.dev/packages/shimmer) for the loading UI\n- [envied](https://pub.dev/packages/envied) for handling API keys\n- [cached_network_image](https://pub.dev/packages/cached_network_image) for caching images\n\n## App Architecture \u0026 Folder structure\n\nThe project follows my Riverpod app architecture with a feature-first project structure.\n\nMore details here:\n\n- [Flutter App Architecture with Riverpod: An Introduction](https://codewithandrea.com/articles/flutter-app-architecture-riverpod-introduction/)\n- [Flutter Project Structure: Feature-first or Layer-first?](https://codewithandrea.com/articles/flutter-project-structure/)\n\nIt also uses the new [Riverpod Generator](https://pub.dev/packages/riverpod_generator) package, which I have covered here:\n\n- [How to Auto-Generate your Providers with Flutter Riverpod Generator](https://codewithandrea.com/articles/flutter-riverpod-generator/)\n\n## Getting a TMDB API Key and Running the Project\n\nThis project uses the TMDB API to get the latest movies data.\n\nBefore running the app, you need to [sign up on the TMDB website](https://www.themoviedb.org/signup), then obtain an API key on the [settings API page](https://www.themoviedb.org/settings/api).\n\nOnce you have this, create an `.env` file **at the root of the project** and add your key:\n\n```dart\n// .env\nTMDB_KEY=your-api-key\n```\n\nThen, run the code generator:\n\n```\ndart run build_runner build -d\n```\n\nThis will generate a `env.g.dart` file inside `lib/env`. This contains the `tmdbApiKey` that is used when making requests to the TMDB API.\n\nCongratulations, you're good to go. 😎\n\n## Note: Loading images from insecure HTTP endpoints\n\nThe data returned by the TMBD API points to image URLs using http rather than https. For the images to load correctly, the following changes have been made:\n\n### Android\n\nCreated a file at `android/app/src/main/res/xml/network_security_config.xml` with these contents:\n\n```\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cnetwork-security-config\u003e\n    \u003cbase-config cleartextTrafficPermitted=\"true\" /\u003e\n\u003c/network-security-config\u003e\n```\n\nAdded this to the application tag in the `AndroidManifest.xml`:\n\n```\nandroid:networkSecurityConfig=\"@xml/network_security_config\"\n```\n\n### iOS\n\nAdd the following to `ios/Runner/info.pList`:\n\n```\n  \u003ckey\u003eNSAppTransportSecurity\u003c/key\u003e\n  \u003cdict\u003e\n      \u003ckey\u003eNSAllowsArbitraryLoads\u003c/key\u003e\n      \u003ctrue/\u003e\n  \u003c/dict\u003e\n```\n\nMore information here:\n\n- [Insecure HTTP connections are disabled by default on iOS and Android.](https://flutter.dev/docs/release/breaking-changes/network-policy-ios-android)\n\n### macOS\n\nSince macOS applications are sandboxed by default, we get a `SocketException` if we haven't added the required entitlements. This has been fixes by adding these lines to `macos/Runner/DebugProfile.entitlements` and `macos/Runner/Release.entitlements`:\n\n```\n\u003ckey\u003ecom.apple.security.network.client\u003c/key\u003e\n\u003ctrue/\u003e\n```\n\nMore info here:\n\n- [How to fix \"SocketException: Connection failed (Operation not permitted)\" with Flutter on macOS](https://codewithandrea.com/tips/socket-exception-connection-failed-macos/)\n\n## [LICENSE: MIT](LICENSE.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbizz84%2Ftmdb_movie_app_riverpod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbizz84%2Ftmdb_movie_app_riverpod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbizz84%2Ftmdb_movie_app_riverpod/lists"}