resize_observer 1.1.0-nullsafety.1 copy "resize_observer: ^1.1.0-nullsafety.1" to clipboard
resize_observer: ^1.1.0-nullsafety.1 copied to clipboard

outdated

A Dart wrapper for the ResizeObserver API

resize_observer #

A Dart wrapper for the Resize Observer API that uses JS interop and a single observer and convenient callback. (This library is intended for web/browser use, not Flutter)

API #

// bool if the browser supports the Resize Observer API
ResizeObserver.supported

// Start observing an element for resizes
ResizeObserver.observe(Element? element, ResizeObserverCallback callback);

// Stop observing resizes to [element]
ResizeObserver.unobserve(Element? element);


// Callbacks must match the following signature
typedef void ResizeObserverCallback(Element element, num x, num y, num width, num height, num top, num bottom, num left, num right);

See the example for an example of how to use it.

0
likes
0
pub points
24%
popularity

Publisher

unverified uploader

A Dart wrapper for the ResizeObserver API

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on resize_observer