You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[web] Don't crash on const HtmlElementView() (flutter#128965)
Previously, when the code contained `const HtmlElementView()` it would break even if it's guarded by `if (kIsWeb)`.
This PR makes it such that `const HtmlElementView()` is allowed but it still throws if it gets inserted into the widget tree by mistake on non-web platforms.
One improvement we can make in the future is to have a conditional import:
- `_html_element_view_web.dart` that contains the real `HtmlElementView` that can only be instantiated on web.
- `_html_element_view_io.dart` that contains a stub with an unimplemented `build()` method.
Fixesflutter#43532
0 commit comments