{"id":19197158,"url":"https://github.com/verygoodopensource/flutter_web_preloader","last_synced_at":"2025-03-31T08:08:46.001Z","repository":{"id":150199924,"uuid":"597153540","full_name":"VeryGoodOpenSource/flutter_web_preloader","owner":"VeryGoodOpenSource","description":"A brick that creates a smart web entrypoint for Flutter and preloads any type of asset before starting an app.","archived":false,"fork":false,"pushed_at":"2024-10-22T13:52:39.000Z","size":39,"stargazers_count":77,"open_issues_count":3,"forks_count":7,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-22T18:42:23.893Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://brickhub.dev/bricks/flutter_web_preloader/0.2.0","language":"JavaScript","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/VeryGoodOpenSource.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-03T18:43:47.000Z","updated_at":"2025-02-08T15:58:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"598cfd91-3792-40fd-9358-62fe87eef1c4","html_url":"https://github.com/VeryGoodOpenSource/flutter_web_preloader","commit_stats":{"total_commits":25,"total_committers":8,"mean_commits":3.125,"dds":0.6799999999999999,"last_synced_commit":"5a45a97c6dbfe5b6377ceb33bd09e0b1a75c7a54"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VeryGoodOpenSource%2Fflutter_web_preloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VeryGoodOpenSource%2Fflutter_web_preloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VeryGoodOpenSource%2Fflutter_web_preloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VeryGoodOpenSource%2Fflutter_web_preloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VeryGoodOpenSource","download_url":"https://codeload.github.com/VeryGoodOpenSource/flutter_web_preloader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246436390,"owners_count":20776995,"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":[],"created_at":"2024-11-09T12:15:42.795Z","updated_at":"2025-03-31T08:08:45.979Z","avatar_url":"https://github.com/VeryGoodOpenSource.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flutter_web_preloader\n\n[![Powered by Mason](https://img.shields.io/endpoint?url=https%3A%2F%2Ftinyurl.com%2Fmason-badge)](https://github.com/felangel/mason)\n[![Available on Brickhub][brickhub_badge]][brickhub_link]\n\n\nA brick that creates a smart web entrypoint for Flutter and preloads any type of asset before starting an app.\n\n_Generated by [mason][1] 🧱_\n\n## Flutter Web Preloader\n\nThis brick will override the default `web/index.html` that is created with a web Flutter project.\n\nThe `index.html` file generated by this brick will add additional JavaScript code\nin order to preload assets used by the Flutter app. Ensuring that when the app is\npresented to the user, the assets are already cached by the browser. Doing so prevents\nthe application from loading piece by piece.\n\nWhile the assets are being preloaded, a progress bar will be presented\nto the user.\n\n## Variables\n\n| Name                  | Description                                     | Default value                                 |\n| --------------------- | ----------------------------------------------- | --------------------------------------------- |\n| `project_title`       | The title of the project                        | `name` attribute in the `pubspec.yaml`        |\n| `project_description` | The project description                         | `description` attribute in the `pubspec.yaml` |\n| `batch_size`          | How many assets will be loaded at the same time | `20`                                          |\n| `canvaskit`           | If the app uses `canvaskit` mode or not         | `true`                                        |\n\n## FAQ\n\n### Can I customize the progress bar?\n\nYes, the progress bar can be customized. The generated `web/index.html` has a content division element (`div`) with an identifier of `progress-indicator`. This element can be styled using Cascading Style Sheets (CSS).\nFor example, we can change the `background-color` to red by doing:\n\n```html\n\u003cdiv\n  id=\"progress-bar\"\n  style=\"border: 1px solid blue; width: 250px; height: 50px;\"\n\u003e\n  \u003cdiv\n    id=\"progress-indicator\"\n    style=\"background-color: red; height: 100%; width: 0%;\"\n  \u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n\n### What would be the optimal `batch_size`?\n\nThe `batch_size` depends on the number and average size of your assets.\n\nThe `batch_size` can be increased when the average size of the assets is small, since the requests will finish sooner. However, keep in mind that a large `batch_size` may trigger too many requests at the same time and it may cause unexpected issues in the browser.\nOn the other hand, the `batch_size` should be decreased when the size of the assets are large.\n\nThe default `batch_size` is `20`, this should be a good number for most projects. It is not too high to cause unexpected browser issues, but also not low enough to cause the loading to take too much time.\n\nIn any case, we advise on testing when changing this value to make sure that it\nwon't break your app.\n\n[1]: https://github.com/felangel/mason\n[brickhub_badge]: https://img.shields.io/endpoint?url=https%3A%2F%2Fbit.ly%2Fflutter-web-preloader\n[brickhub_link]: https://brickhub.dev/bricks/flutter_web_preloader/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverygoodopensource%2Fflutter_web_preloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverygoodopensource%2Fflutter_web_preloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverygoodopensource%2Fflutter_web_preloader/lists"}