omni_pixel 0.3.1 copy "omni_pixel: ^0.3.1" to clipboard
omni_pixel: ^0.3.1 copied to clipboard

Figma-first responsive sizing for Flutter. Register the device frames your designers use, then write 48.opx to get pixel-perfect scaling on any screen.

0.3.1 #

  • Add cover image to the README.

0.3.0 #

  • OmniDebugOverlay: a floating, draggable debug bubble that expands into a live readout of everything OmniPixel resolved — screen size, orientation, platform, selected design frame, device class, breakpoints, scale, multiplier and aspect ratio. Drag it anywhere; it springs to the nearest side edge on release, Messenger chat-head style. Its parked position is stored as a fraction of the available travel, so it stays glued to its edge across rotations and window resizes.
  • Enable it with OmniBuilder(debugOverlay: true), tune it with debugOverlayConfig: OmniDebugOverlayConfig(...) (corner, label, colors, opacity, sizes, snap curve). Works in both OmniBuilder placements — inside MaterialApp.builder and wrapping MaterialApp — and standalone in a Positioned.fill for apps that drive OmniPixel.init by hand.
  • The overlay is hidden in release builds unless OmniDebugOverlayConfig.showInReleaseMode is set; profile builds always show it. It sizes itself in raw logical pixels, never .opx, so the multiplier you are debugging cannot distort the instrument.
  • OmniPixel.isInitialized: a static readiness probe that never throws, unlike every instance getter. The overlay uses it to report "not initialized" instead of blowing up.

0.2.1 #

  • Fix: .opx / .h / .w / .dh / .dw read directly in a descendant's build() now re-render on window resize and orientation change. Previously OmniBuilder updated the singleton but returned the same child instance, so Flutter skipped rebuilding the subtree and stale values stayed on screen until something else rebuilt it (on web: until a page refresh). OmniBuilder and OmniPixel.update(context) now force-rebuild the subtree after re-reading the metrics. Widgets that subscribe to MediaQuery themselves (OmniResponsiveBuilder, OmniOrientationBuilder) were unaffected.

0.2.0 #

  • OmniResponsiveBuilder: picks a widget per device class (watch / mobile / tablet / desktop) by screen width, with fallback cascade desktop → tablet → mobile and watch → mobile. Works with or without OmniPixel initialized.
  • OmniOrientationBuilder: portrait / landscape builders based on the screen orientation (a square screen counts as portrait). Omni-prefixed so it never shadows Flutter's OrientationBuilder.
  • OmniDeviceType enum and OmniBreakpoints: customizable width thresholds (defaults 300 / 600 / 1024), min-inclusive / max-exclusive like OmniMultiplier.
  • Global breakpoints via OmniBuilder(breakpoints: ...) / OmniPixel.init / configure; a per-widget breakpoints on OmniResponsiveBuilder overrides them.
  • OmniPixel additions: deviceType, breakpoints, static maybeBreakpoints, isWatch / isMobile / isTablet / isDesktop, public sizeOf(context); reset() clears breakpoints; debugDescription() includes the device class.

0.1.0 #

  • Initial release.
  • OmniDevice design frames with Figma presets (OmniDevices).
  • OmniMultiplier rules: aspect-ratio ranges + platform, min-inclusive / max-exclusive.
  • OmniPixel core engine: longest-side .opx scaling, automatic design-device selection, multiplier resolution, context-free configure for tests.
  • OmniBuilder widget wired to orientation and window-size changes.
  • num extensions: .opx, .h, .w, .dh, .dw, .ls, .ss.
3
likes
160
points
162
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Figma-first responsive sizing for Flutter. Register the device frames your designers use, then write 48.opx to get pixel-perfect scaling on any screen.

Repository (GitHub)
View/report issues

Topics

#responsive #sizing #layout #figma #orientation

License

MIT (license)

Dependencies

flutter

More

Packages that depend on omni_pixel