-
Notifications
You must be signed in to change notification settings - Fork 6k
Remove PlatformConfiguration and ViewConfiguration #40012
Conversation
bc91621 to
1057b6e
Compare
gspencergoog
left a comment
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.
|
@ditman Could you take a look at the web_ui changes, when you have a chance? Thanks. |
a017a4c to
55ac2d1
Compare
ditman
left a comment
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.
The changes look good to me. Especially removing the indirection between the base abstract class, and the implementation via the "configuration" object. That was something that always made me confused when I looked at the View class hierarchy on the web!
| Locale get locale; | ||
|
|
||
| List<Locale> get locales => configuration.locales; | ||
| List<Locale> get locales; |
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.
Thanks for doing this, the indirection here with the configuration getter that was overridden in the "engine" platform dispatcher was very confusing!
| EnginePlatformDispatcher.instance.configuration.accessibilityFeatures | ||
| as EngineAccessibilityFeatures; | ||
| final ui.PlatformConfiguration newConfiguration = | ||
| final PlatformConfiguration newConfiguration = |
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.
💯
|
|
||
| part of ui; | ||
|
|
||
| abstract class FlutterView { |
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.
Again, thanks for making this fully abstract.
| class PlatformConfiguration { | ||
| /// Const constructor for [PlatformConfiguration]. | ||
| const PlatformConfiguration({ | ||
| class _PlatformConfiguration { |
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.
Why are we keeping the configurations and making them private instead of fully removing them? Same question for _ViewConfiguration.
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 missed this comment just before I slapped the autosubmit label on. Sorry! You're right, though, we should be able to remove the private classes altogether now and store the values directly on the object. The only complication may be the window singleton, which currently makes use of the fact that two FlutterView instances can share the same ViewConfiguration. That could be resolved, though.
I may look at that clean-up in a follow-up.
Remove PlatformConfiguration and ViewConfiguration

Fixes flutter/flutter#121742.
To be submitted after flutter/flutter#121751 (framework tests will fail before that is submitted).