Skip to content

[pointer_interceptor] fix width and height unset warning on web platform #5864

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

Merged
merged 12 commits into from
Jan 18, 2024
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.10.1+2

* Fixes "width and height missing" warning on web.

## 0.10.1+1

* Updates minimum required plugin_platform_interface version to 2.1.7.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ class PointerInterceptorWeb extends PointerInterceptorPlatform {

// Slightly modify the created `element` (for `debug` mode).
void _onElementCreated(Object element) {
(element as web.HTMLElement).style.backgroundColor = 'rgba(255, 0, 0, .5)';
(element as web.HTMLElement)
..style.width = '100%'
..style.height = '100%'
..style.backgroundColor = 'rgba(255, 0, 0, .5)';
}

@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: pointer_interceptor_web
description: Web implementation of the pointer_interceptor plugin.
repository: https://github.com/flutter/packages/tree/main/packages/pointer_interceptor/pointer_interceptor_web
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3Apointer_interceptor
version: 0.10.1+1
version: 0.10.1+2

environment:
sdk: ^3.2.0
Expand Down