Skip to content
pubscout

flexify

3.0.0, released 7 weeks ago by azerosoft.com

Responsive UI scaling from design dimensions and context-free navigation with page transitions.

WASM-ready
$ flutter pub add flexify
Source repository

What it does

Scales every size written in code using extensions based on a reference design size, handles navigation without requiring a BuildContext, and provides 14 built-in page transitions. It also adapts layouts depending on whether the app runs on a phone, tablet, or desktop.

AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to implement a design scaled proportionally across different phone and tablet screen sizes.
  • You require navigation actions to be triggered from anywhere in your codebase without a BuildContext.
  • You want custom page transitions for Navigator or routers like go_router and auto_route.

Skip it when

  • You prefer standard Flutter responsive techniques like LayoutBuilder, MediaQuery, or flexible constraints over design-to-screen pixel scaling.
  • You are already using an alternative responsive scaling framework and want to avoid conflicting scale systems.

Strengths

  • Provides convenient number extensions (.rw, .rh, .rt, .rs) to automatically scale dimensions and fonts.
  • Includes context-free navigation methods and 14 built-in route animations.
  • Supports MaterialApp, CupertinoApp, WidgetsApp, and routers like go_router and auto_route.

Weaknesses

  • Forces a strict single design size approach across the app.
  • Tying UI measurements directly to a fixed design resolution can sometimes cause unexpected layouts on extreme aspect ratios.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Wrap your root app widget in Flexify and supply your design width and height.

void main() {
  runApp(
    const Flexify(
      designWidth: 375,
      designHeight: 812,
      app: MaterialApp(home: HomeScreen()),
    ),
  );
}

Alternatives

Packages that do the same job and could replace flexify.

  • responsive_framework

    If you prefer scaling and adapting layouts through responsive breakpoints and UI scaling wrappers rather than direct number extensions.

  • sizer

    If you want screen-percentage-based sizing extensions instead of scaling from a fixed design width and height.