-
-
Notifications
You must be signed in to change notification settings - Fork 170
Add support for deferred components #576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for deferred components #576
Conversation
Also we need a test to make sure it works well |
Hi @AlexV525, I pushed fixups for this pr, if this is okay please let me know so can rebase squashing those fixups. |
Changes are good but still missing tests. You don't need to squash them as we'll squash them to commit eventually. |
859d10e
to
564f01b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #576 +/- ##
==========================================
+ Coverage 96.49% 96.52% +0.03%
==========================================
Files 24 24
Lines 914 922 +8
==========================================
+ Hits 882 890 +8
Misses 32 32 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSLGTM
# Conflicts: # packages/core/lib/settings/pubspec.dart
## 5.11.0 **Feature** - [#576](#576) Add support for deferred components. by [@ianmaciel](https://github.com/ianmaciel) - [#676](#676) Add new option `parse_animation` to parse metadata for animated images. by [@huandu](https://github.com/huandu) - [#680](#680) Add svg `ColorMapper` to svg loader. by [@AlexV525](https://github.com/AlexV525) - [#685](#685) Use `.vec` SVG class for `vector_graphics_compiler` transformed assets. by [@Albert221](https://github.com/Albert221) - [#697](#697) Refactor how generated files are being formatted. by [@AlexV525](https://github.com/AlexV525) **Development** - [#681](#682) Bump `dart_style` v3 which also requires Dart 3.4. by [@AlexV525](https://github.com/AlexV525) - [#682](#682) Add Facts generate utils. by [@AlexV525](https://github.com/AlexV525) - [#694](#694) Use fine-grained logger instead of `stdout.writeln`. by [@AlexV525](https://github.com/AlexV525) - [#698](#698) Improve workflow with automatic formatting. by [@AlexV525](https://github.com/AlexV525) - [#699](#699) Allow `build 3.0.0`. by [@davidmorgan](https://github.com/davidmorgan)
What does this change?
This PR include support for Flutter Deferred Components.
Deferred components allow developers to the app into multiple apk to reduce its size. This can be used to optimize the initial download and download components only on necessary but it is also mandatory for apk with more than 200MB.
This library initially looks for assets listed on
flutter.assets
ofpubspec.yaml
, with this change the library will continue looking for the assets lists underflutter.assets
but will merge with the list of assets included onflutter.deferred-components.$
. This will be merged in a single list.Ideally in the future assets should have different classname, so users will easily know when dealing with deferred components. This wasn't implemented at this moment because it would requeire a significative changes.
Fixes #577 🎯
Type of change
Please delete options that are not relevant.
Checklist:
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
melos run test
)melos run format
to automatically apply formatting)