Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[native_assets_cli] Unify
Metadata
withAsset
s #2164New 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
[native_assets_cli] Unify
Metadata
withAsset
s #2164Changes from all commits
46ac1e1
6927a22
22b0a86
2f240a9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Just an idea: We could avoid the
input.config.linkingEnabled
bool calls by instead having something like aninput.config.routing
, which can be aLinkingEnabledRouter
which has atoLinker
method, or aLinkingNotEnabledRouter
which only hasbundleInApp or
toBuilder`.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.
I like having a
input.config.routing
. 👍 That makes the API symmetric again.I'm not sure that having to take the value from the input would make a very nice API. Especially for
ToBuild
orBundleInApp
where you don't need to check the config. Let me give it a try.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.
I gave this a spin, but make the call sites even more verbose.
Then the following is more readable:
Current solution (this doesn't show the
routing
)With
routing
added:True false is not very pretty. Let's try a
when
Also not that great.
Then the following is more readable:
But it only works if that's the only option we ever want to add to the routing. It's only the Dart API, so we could do it, it's easy to refactor.
(P.S. If we want to go the route with the method, we should probably do the same with
LinkModePreference
andLinkMode
.)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.
Let's try this in a more holistic way for everywhere where the input-output constraint could be made more explicit.
#2175