Skip to main content

foldable_info 0.2.0 copy "foldable_info: ^0.2.0" to clipboard
foldable_info: ^0.2.0 copied to clipboard

Fold, angle and view information for Flutter through direct reads and streams.

0.2.0 #

  • Fix FoldableSpace.toBox on high-density screens: omit RenderView's physical paint scale when converting native logical frames. Cover 1x and 3x views with offset, transformed widgets, margins and zero-width fold lines.

  • Refactor Dart decoding, streams and coordinate conversion into focused modules. Use declarative collection transformations without changing the public API.

  • Add an Activity-aware native Android bridge using Jetpack WindowManager 1.5.1.

  • Read fold geometry, orientation, occlusion, separation and native posture.

  • Read/watch the default hinge-angle sensor independently on API 30+ when present.

  • Translate window frames into engine-view logical pixels; preserve fold lines.

  • Stop sensors in the background and release observation when demand ends.

  • Rebind on Activity recreation; reject late callbacks from old activities.

  • Keep Flutter cutouts and explicitly report unknown hardware/unsupported angles.

  • Add an Android runner, native geometry tests, decoder tests and Android CI.

0.1.1 #

  • Use Dart language 3.9 while keeping Flutter 3.38 as the minimum. This also accepts the Dart 3.10 beta bundled with Flutter 3.38.0 without a prerelease SDK constraint. No native behavior or public measurement API changed.

0.1.0 #

Initial public release, focused on iOS.

  • Read/watch view geometry and available native fold measurements without context.
  • Read/watch hinge angles separately from layout updates.
  • Add runtime-guarded public UIKit hinge status, reserved regions and size traits.
  • Preserve availability, source, UTC observation time and immutable lists.
  • Share native subscriptions with independent listener cancellation.
  • Convert areas into widget coordinates with transform/staleness checks.
  • Include a fake service, standalone example, tests and CI.
  • Android/web/desktop use Flutter display-feature fallback; native Android angles and iOS native views beyond the registrar view are not supported.

Migration from the workspace prototype: UI providers/builders moved into the Vi design system under Vi-prefixed names. FoldableInfo.of(context) was removed; use instance.forView(view) for explicit view selection. This standalone package has no provider or design-system dependency.

2
likes
160
points
203
downloads

Documentation

API reference

Publisher

verified publisherviuniverse.com

Weekly Downloads

Fold, angle and view information for Flutter through direct reads and streams.

Repository (GitHub)
View/report issues
Contributing

Topics

#foldable #dual-screen #hinge #adaptive-ui

License

MIT (license)

Dependencies

collection, flutter

More

Packages that depend on foldable_info

Packages that implement foldable_info