Skip to main content

flexify 3.0.0 copy "flexify: ^3.0.0" to clipboard
flexify: ^3.0.0 copied to clipboard

Responsive Flutter UI scaled from your design size with .rw, .rh, .rt and .rs, plus navigation without BuildContext and 14 page transitions.

3.0.0 #

Now maintained by Azerosoft.

Breaking changes #

  • Requires Flutter 3.7 and Dart 2.19. 2.1.1 allowed older versions in its pubspec, but it did not compile on Flutter 3.0, 3.7 or 3.10.
  • Flexify.globalKey is removed. It was never attached to anything.
  • The animationDuration parameter of Flexify.go is removed. Use duration, like in goRemove and goRemoveAll.
  • FlexifyNavigator.go, goRemove, goRemoveAll and back are removed. Use the same methods on Flexify. FlexifyNavigator.navigatorKey stays.
  • FlexifyInit.setWidth, setHeight and setRt are removed. Use .rw, .rh and .rt. The scale factors are also available as Flexify.scaleWidth and Flexify.scaleHeight.
  • FlexifyRouteAnimations.customFadeScale is renamed to fadeAndScale.
  • go, goRemove and goRemoveAll return a Future with the value passed to Flexify.back(result), like Navigator.push, instead of void.
  • Negative values such as (-12).rw are scaled instead of throwing an ArgumentError.
  • Without an animation, a MaterialApp opens pages with a MaterialPageRoute, so its pageTransitionsTheme applies on every platform. On iOS it looks the same as before unless the theme changes the transitions. A CupertinoApp keeps the CupertinoPageRoute on iOS.
  • A second Flexify in the tree is reported as an error in debug mode. Flexify keeps one design size and one screen size for the whole app.
  • Now licensed under the MIT License. Earlier versions stay under the Apache License 2.0.

New #

  • Works with any app widget: MaterialApp, CupertinoApp, WidgetsApp and MaterialApp.router, also with go_router and auto_route. Flexify no longer rebuilds your app widget, so none of its settings are lost and your own navigatorKey is kept.
  • New matchOrientation option. With a portrait design, text and heights keep their size when a phone is turned to landscape instead of shrinking to about half.
  • Flexify.backToFirst(), Flexify.backUntil(predicate) and Flexify.canGoBack.
  • Flexify.screenType, isPhone, isTablet, isDesktop and Flexify.value(phone: ..., tablet: ..., desktop: ...) for layouts that differ between phones, tablets and desktops.
  • minScale and maxScale keep the scale within limits, for example so a phone design does not grow to 5 times its size in a wide browser window.
  • .sw and .sh give a percentage of the screen width and height, for example 50.sw.
  • Flexify.scaleWidth, Flexify.scaleHeight and Flexify.screenSize.
  • go, goRemove and goRemoveAll take settings, so a page can have a name for navigator observers such as analytics.
  • Every transition is available as FlexifyRouteAnimations.<name>.transitionsBuilder, for pages built by routers such as go_router (CustomTransitionPage) and auto_route (CustomRoute).
  • FlexifyNavigator.navigatorKey returns the root navigator without being passed to the app.

Fixes #

  • The screen size is read the same way on every Flutter version. Before Flutter 3.10, 2.1.1 could not read it, because no MediaQuery exists above the app.
  • Rotation and window resizing rebuild the UI with the new sizes. Opening the keyboard no longer affects anything.
  • An animation without a duration uses 300 ms instead of failing. The duration is also used when going back.
  • flip and flipAndFade keep the state of the page during the animation and turn the page with perspective.
  • blur blurs the screen only while the page opens and closes. Before, the blur stayed behind the open page and cost a full screen filter on every frame.
  • The scale factors are worked out once per size change instead of on every .rw, .rh, .rs and .rt.
  • Clearer error messages when Flexify is missing.

Other #

  • New example app for all six platforms, tests, API documentation and a rewritten README.

2.1.1 #

  • Fixed the Dart SDK constraint.

2.1.0 #

  • Added new route animations.
  • Lowered the required Flutter and Dart SDK versions.

2.0.2 #

  • Added navigation with animations: Flexify.go, goRemove, goRemoveAll and back.

1.0.5 #

  • Improved responsive text size calculation.
  • Removed FontSizeResolver.

1.0.4 #

  • Initial release: responsive scaling for width, height and text.
48
likes
160
points
497
downloads
screenshot

Documentation

API reference

Publisher

verified publisherazerosoft.com

Weekly Downloads

Responsive Flutter UI scaled from your design size with .rw, .rh, .rt and .rs, plus navigation without BuildContext and 14 page transitions.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#responsive #screen-size #navigation #page-transition #animation

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flexify