-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Steps to reproduce
Use pointer interceptor on the web
Expected results
no warning message
Actual results
Width of Platform View type: [_default_document_create_element_invisible] may not be set. Defaulting to width: 100%.
Set style.width to any appropriate value to stop this message.
Read more here: https://docs.flutter.dev/release/breaking-changes/platform-views-using-html-slots-web
Code sample
In pointer_interceptor implementation this;
void _onElementCreated(Object element) {
(element as web.HTMLElement).style.backgroundColor = 'rgba(255, 0, 0, .5)';
}
Should be:
void _onElementCreated(Object element) {
(element as web.HTMLElement).style.width = '100%';
(element as web.HTMLElement).style.height = '100%';
(element as web.HTMLElement).style.backgroundColor = 'rgba(255, 0, 0, .5)';
}
Screenshots or Video
No response
Logs
No response
Flutter Doctor output
(dev): flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.16.5, on Microsoft Windows [Version 10.0.22621.3007], locale en-BE)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.32)
[√] Android Studio (version 2023.1)
[√] VS Code (version 1.85.1)
[√] Connected device (3 available)
[√] Network resources