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
Removing Shorcuts.of and Shortctus.maybeOf #104215
Removing Shorcuts.of and Shortctus.maybeOf #104215
Conversation
682ba48
to
a20076a
Compare
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.
LGTM if this doesn't break anything.
/// [shortcuts] change materially. | ||
/// If this widget was created with [Shortcuts.manager], the | ||
/// [ShortcutsManager.shortcuts] will be used as the source for shortcuts. If | ||
/// the unnamed constructor is used, this manager will be given new |
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.
this field will stay null if the unnamed constructor is used, no?
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.
Oh! yes. Duh.
This pull request is not suitable for automatic merging in its current state.
|
fb5282a
to
dc3ec68
Compare
This pull request is not suitable for automatic merging in its current state.
|
4bcc200
to
5fe4526
Compare
This pull request is not suitable for automatic merging in its current state.
|
5fe4526
to
21ab1e0
Compare
This pull request is not suitable for automatic merging in its current state.
|
21ab1e0
to
2d22da9
Compare
This reverts commit da24f10.
This reverts commit da24f10.
This removes Shorcuts.of and Shortctus.maybeOf because they're not especially useful, since the only thing you can really set on a ShortcutManager is the shortcuts, and the Shortcuts widget that you give it to manages those, so if it rebuilds, it overwrites what you set. Also, adds a Shortcuts.manager constructor and removes the manager argument to the Shortcuts widget. Removing these will also eliminate an InheritedWidget for each Shortcuts widget, improving memory usage.
Description
This removes
Shorcuts.of
andShortctus.maybeOf
because they're not especially useful, since the only thing you can really set on aShortcutManager
is the shortcuts, and theShortcuts
widget that you give it to manages those, so if it rebuilds, it overwrites what you set.Also, adds a
Shortcuts.manager
constructor and removes themanager
argument to theShortcuts
widget.Removing these will also eliminate an
InheritedWidget
for eachShortcuts
widget, improving memory usage.Tests
Shortcuts.manager
.