{"id":41309649,"url":"https://github.com/vbalagovic/flutter-presetup","last_synced_at":"2026-01-23T05:19:14.235Z","repository":{"id":65240484,"uuid":"588118369","full_name":"vbalagovic/flutter-presetup","owner":"vbalagovic","description":"Pre setup flutter application with flavors, riverpod, go router and localizations","archived":false,"fork":false,"pushed_at":"2025-11-30T08:46:48.000Z","size":1197,"stargazers_count":127,"open_issues_count":0,"forks_count":31,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-12-02T13:39:44.021Z","etag":null,"topics":["admob","dart","firebase","flutter","flutter-app","flutter-builder","flutter-examples","flutter-firebase-auth","flutter-flavors","flutterbuilder","riverpod"],"latest_commit_sha":null,"homepage":"","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/vbalagovic.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.txt","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["vbalagovic"],"ko_fi":"vedranbalagovic"}},"created_at":"2023-01-12T11:19:16.000Z","updated_at":"2025-11-30T08:46:53.000Z","dependencies_parsed_at":"2023-01-15T20:00:34.512Z","dependency_job_id":"0de1908a-4aff-4f33-9b17-44de02d7a5af","html_url":"https://github.com/vbalagovic/flutter-presetup","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/vbalagovic/flutter-presetup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbalagovic%2Fflutter-presetup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbalagovic%2Fflutter-presetup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbalagovic%2Fflutter-presetup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbalagovic%2Fflutter-presetup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vbalagovic","download_url":"https://codeload.github.com/vbalagovic/flutter-presetup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbalagovic%2Fflutter-presetup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28680633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T04:33:33.518Z","status":"ssl_error","status_checked_at":"2026-01-23T04:33:30.433Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["admob","dart","firebase","flutter","flutter-app","flutter-builder","flutter-examples","flutter-firebase-auth","flutter-flavors","flutterbuilder","riverpod"],"created_at":"2026-01-23T05:19:13.477Z","updated_at":"2026-01-23T05:19:14.227Z","avatar_url":"https://github.com/vbalagovic.png","language":"Dart","funding_links":["https://github.com/sponsors/vbalagovic","https://ko-fi.com/vedranbalagovic"],"categories":[],"sub_categories":[],"readme":"# Flutter Presetup project\n\n## Coming soon\n\n[Flutter Builder](https://flutter-builder.app)\nFlutter Builder is a powerful tool that simplifies Flutter project setup, allowing you to generate new projects quickly with pre-configured integrations for Firebase, AdMob, Firebase Auth, Push Notifications, and more. Flutter Builder is based on this pre-setup project, which provides a solid foundation for building Flutter apps with essential features and best practices. It comes with GUI and new features!\n\u003cimg width=\"1920\" alt=\"Screenshot 2024-10-29 at 15 12 47\" src=\"https://github.com/user-attachments/assets/0ea9e20a-23f5-4548-a3a1-1b612d761747\"\u003e\n\n## More structured documentation\n\n[Flutter Presetup Gitbook](https://flutterapid.gitbook.io/flutter-presetup/)\n\nThis is a small project that saves me time when I need to start new project from scratch including flavors and firebase. It's kinda suited to my needs but it may help someone. Currently it's focused on iOS and Android.\n\nRelated article: \u003chttps://medium.com/itnext/flutter-new-app-setup-with-flavors-in-one-go-331471b127e3\u003e\n\nNOTE: dev \u0026 prod scheme must be added manually in xcode (check the article above if explanation is needed)\n\n## Screenshots\n\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/f726ec0c-43b0-439a-bfba-b687b6902cbd\" width=\"250\" /\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/44b83a60-254a-4397-99a3-66935e94fd66\" width=\"250\" /\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/ee8e2a85-21fa-4a2d-a1b4-480c873adf1e\" width=\"250\" /\u003e\n\u003c/p\u003e\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/5fc70921-0cc3-45be-8f3f-9ad23dcfef62\" width=\"250\" /\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/43347c12-d21f-4912-a0a0-6405e1eda0a4\" width=\"250\" /\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/e9198183-c70e-4b03-b200-35a45f6ab1cf\" width=\"250\" /\u003e\n\u003c/p\u003e\n\n### Task list [project from scratch with assembled features listed below]\n\n- [x] Flavors with different icons\n- [x] Renaming\n- [x] Firebase setup\n- [x] Auth setup with firebase\n- [x] Social logins (google, apple, facebook)\n- [x] Routing with auth session listener\n- [x] Google Ads (native, reward int. banner)\n- [ ] Select features you need on setup (now you need to finish all tasks to make app up and running, even admob key)\n- [ ] Write better documentation\n- [x] Push notifications\n- [ ] Dynamic links\n- [x] Fastlane deployment to App distribution and both Stores\n- [ ] Create widgetbook\n- [ ] Pack everything in GUI\n\n## Dependencies \u0026 versions\n\nCurrent Flutter version 3.38.2\n\nInstall all dependecies:\n\n```bash\nfvm flutter pub get\n```\n\nDependencies used:\n\n- Easy localization\n- Go router\n- Riverpod\n- Flutter launcher icons\n- flavors\n\n### Step 1) Update project name\n\nI made a little script that will update everything accordingly so run:\n\n```bash\nsh rename.sh\n```\n\nNOTE if script does not execute till the end:\nIf the last command grep and replace is not working on your OS just search and replace inside your text editor for \"presetup\" which is current package name and replace every occurance with something you want.\n\n### Step 2) Create Signature key for Android\n\nI made a little script that should run everything accordingly so run (use the code from the script manually if something is not working). key.properties file will be updated or created:\n\n```bash\nsh create_signature.sh\n```\n\n### Step 3) Update icons\n\nUpdate the icons in assets/launcher icons folder and use same naming. Run following command since project uses flutter launcher icons.\n\n```bash\nfvm flutter pub get \u0026\u0026 fvm flutter pub run flutter_launcher_icons -f flutter_launcher_icons*\n```\n\n### Step 4) Generate freezed files\n\n```bash\nfvm flutter pub run build_runner build --delete-conflicting-outputs\n```\n\n### Step 5) Adding firebase\n\nYou can use approach where you create firebase project for ios and android, and just update google services dev/prod and GoogleInfo.plist accordingly. I'll try to fasten things up with new firebase flutter option, using FlutterFire CLI. (Scroll to First use for the first time setup)\n\nRun the following command that will trigger flutterfire configure, check ios and android let te script update build gradle and then it will move files where needed.\n\n```bash\nsh setup_firebase.sh\n```\n\n#### First use of firebase CLI setup\n\nBefore you continue, make sure to:\n\n- Install the Firebase CLI and log in (run firebase login)\n- From any directory, run this command:\n\n```bash\ndart pub global activate flutterfire_cli\n```\n\nThen, at the root of your Flutter project directory, run this command:\n\n```bash\nsh setup_firebase.sh\n```\n\nthat will trigger command below and put the files where they are needed for this setup\n\nThis automatically registers your per-platform apps with Firebase and adds a lib/firebase_options.dart configuration file to your Flutter project.\n\n___________\n\n## Authentication\n\n### Firebase login\n\n- Riverpod with go router is added to listen for changes in auth state\n- Anonymus login works by default when you enable it on firebase with this code\n- Social Login updates are coming\n\n#### Google social login\n\nSocial login with google has been implemented as example. You need to add google login to your firebase auth and then run this script. It'll ask for a Google Reversed Id to update ios data per environment.\n\n```bash\nsh setup_google_login.sh\n```\n\n#### Facebook social login\n\nSocial login with facebook has been implemented as example. You need to add facebook login to your firebase auth and then run this script. It'll ask for a app id, token(secret) and app name. Package that was used is \u003chttps://facebook.meedu.app/docs/5.x.x/intro\u003e but no implementation to code should be done. Just create facebook app for credentials.\n\n```bash\nsh setup_facebook_login.sh\n```\n\n#### Apple social login\n\nApple social login for iOS should work when you setup your Firebase (enable apple signup) and add \"Sign in with apple capabilities\" on your apple developer account to this identifier. Update provision file or just open xcode and recheck automatic provisioning if it's not working.\n\n___________\n\n## Google Ads\n\n### Setup admob\n\n- First you need to create admob account\n- Create iOS and android application and get ad mob id in admob app settings\n- Run script to add this ad mob id-s everywhere where needed\n\n```bash\nsh setup_admob_credentials.sh\n```\n\nAfter running this script all 3 types of ads should be working.\n\nThere are three examples of apps so you can create them and update `ad_helper.dart`with correct id per type of app. Current values are test ids so you can use them for test purposes.\n\n#### Banner Ads\n\nCreate banner add and update `ad_helper.dart` file `bannerAdUnitId` variable, link to banner ad if you have some issues [Banner ad](https://developers.google.com/admob/flutter/banner/get-started)\n\n#### Rewarded Interstitial As\n\nCreate banner add and update `ad_helper.dart` file `rewardedInterstitialAdUnitId` variable, link to reward int. ad if you have some issues [Rewarded Interstitial ad](https://developers.google.com/admob/flutter/rewarded-interstitial)\n\n#### Native Ads\n\nThere is a example of native list ad. Design can be changed in `list_tile_native_ad.xml` file for android \u0026 `ListTileNativeAdView.xib` for iOS. For any updates check the article about native ads in flutter. [Native Ads](https://medium.com/itnext/flutter-native-ads-92d802fbd927)\n\n___________\n\n## Dynamic links\n\nDynamic links should all be setup, run the following command and enter dev or prod dynamic link. You can handle dynamic links on `splash_screen.dart` in `initSystem()` function.\n\n```bash\nsh setup_dynamic_links.sh\n```\n\n___________\n\n## Deployment (via Fastlane)\n\nFor more detailed articles (slightly different .env organization of files only) you can check [App distribution Deploy](https://medium.com/itnext/flutter-fastlane-deployment-to-the-firebase-app-distribution-easy-way-d5ca2fbdcdf9) \u0026 [Store Deploy](https://medium.com/itnext/flutter-fastlane-deployment-to-the-google-play-app-store-easy-way-baa1f491cc51)\n\n### Firebase app distribution (example will be for dev environment)\n\nInstall fastlane:\n\n  ```bash\n  sh setup_fastlane.sh\n  ```\n\nPopulate `.env.development` in root folder with data and keys, for firebase you'll need to create new service account for selected app in [Google Cloud Console](https://console.cloud.google.com/projectselector2/iam-admin/serviceaccounts) follow the steps below:\n\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"https://miro.medium.com/v2/resize:fit:1400/format:webp/1*jUjckYyRYStsFeSLFbEcPw.png\" width=\"215\" /\u003e\n  \u003cimg src=\"https://miro.medium.com/v2/resize:fit:1400/format:webp/1*H8914HGCrmtUqS075yHeeA.png\" width=\"235\" /\u003e\n  \u003cimg src=\"https://miro.medium.com/v2/resize:fit:1400/0*eQvVMwj5BUbPtGgr\" width=\"250\" /\u003e\n\u003c/p\u003e\n\nStore the json file as `firebase-distribution-creds-dev.json` in root folder if you don't want to change the path in .env.development file\n\nUpdate chengelog.txt file in root folder for release notes \u0026 deploy dev app to Firebase app distibution:\n\n  ```bash\n  sh deploy_dev.sh\n  ```\n\n### Google Play Store (example will be for prod environment)\n\nPopulate `.env.production` in root folder with data and keys, for that we need a JSON key file that will give us access to the play store which is explained [official docs](https://docs.fastlane.tools/actions/supply/#setup) I will add a screenshot for a sake of speed:\n\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"https://miro.medium.com/v2/resize:fit:1400/0*HBIA0v_QIk23UiHc\" width=\"700\" /\u003e\n\u003c/p\u003e\n\nPopulate `ANDROID_FIREBASE_APP_DISTRIBUTION_CREDENTIALS_FILE_PATH` (or for the path store the file to root directory and name it `google-creds-prod.json`)\n\n### Apple Store Test Flight (example will be for prod environment)\n\nPopulate `.env.production` in root folder, As we did with google play here we’ll also create an API key to handle authentication from fastlane to the app store, copied from [testflight documentation](https://docs.fastlane.tools/app-store-connect-api/):\n\nCreating an App Store Connect API Key:\n\n- Create a new App Store Connect API Key in the [Users page](https://appstoreconnect.apple.com/access/api)\n- For more info, go to the [App Store Connect API Docs](https://developer.apple.com/documentation/appstoreconnectapi/creating_api_keys_for_app_store_connect_api)\n- Select the “Keys” tab\n- Give your API Key an appropriate role for the task at hand. You can read more about roles in [Permissions in App Store Connect](https://developer.apple.com/support/roles/)\n- Note the Issuer ID as you will need it for the configuration steps below\n- Download the newly created API Key file (.p8)\n- This file cannot be downloaded again after the page has been refreshed\nAlthough the app manager or developer role should be enough, you can create a key with Admin permission if needed.\n\nIMPORTANT: store the key somewhere safe!\n\nPopulate `KEY_ID`, `KEY_ISSUER_ID` \u0026 `PATH_TO_THE_P8_KEY` (or for the path store the file to root directory and name it `applestore_key.p8`)\n\n## Deploy production to both stores\n\nUpdate chengelog.txt file in root folder for release notes \u0026 deploy dev app to Firebase app distibution:\n\n  ```bash\n  sh deploy_prod.sh\n  ```\n\n___________\n\n## Push notifications\n\n### Integration\n\nFor android it is straight forward, but for iOS you need to add Push notifications capability to indentifier and add certificate to firebase: Follow the first few steps on [official documentation](https://firebase.flutter.dev/docs/messaging/apple-integration) if you're not familiar with this. Background modes \u0026 push notifications are added (at least should be) in Xcode already.\n\n### Handle notifications in code\n\nStates that are handled in code are in app, background mode and terminated state.\n\n- For handling In app local notifications package is used\n- To update anything related to push notification or handle onTap events etc. check `push_notif_service.dart` \u0026 `local_notif_service.dart` files\n\n___________\n\n## Extracted widgets\n\n### Theme\n\n- theme is extracted to FPTheme class and can be used and updated also the dark version data is there\n- FPButton is extracted component with integrated loader\n\n___________\n\n## Cleaner\n\nYou can clean project build with this script\n\n```bash\nsh flutter_cleaner.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvbalagovic%2Fflutter-presetup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvbalagovic%2Fflutter-presetup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvbalagovic%2Fflutter-presetup/lists"}