flexify 3.0.0
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.globalKeyis removed. It was never attached to anything.- The
animationDurationparameter ofFlexify.gois removed. Useduration, like ingoRemoveandgoRemoveAll. FlexifyNavigator.go,goRemove,goRemoveAllandbackare removed. Use the same methods onFlexify.FlexifyNavigator.navigatorKeystays.FlexifyInit.setWidth,setHeightandsetRtare removed. Use.rw,.rhand.rt. The scale factors are also available asFlexify.scaleWidthandFlexify.scaleHeight.FlexifyRouteAnimations.customFadeScaleis renamed tofadeAndScale.go,goRemoveandgoRemoveAllreturn aFuturewith the value passed toFlexify.back(result), likeNavigator.push, instead ofvoid.- Negative values such as
(-12).rware scaled instead of throwing anArgumentError. - Without an
animation, aMaterialAppopens pages with aMaterialPageRoute, so itspageTransitionsThemeapplies on every platform. On iOS it looks the same as before unless the theme changes the transitions. ACupertinoAppkeeps theCupertinoPageRouteon iOS. - A second
Flexifyin 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,WidgetsAppandMaterialApp.router, also with go_router and auto_route. Flexify no longer rebuilds your app widget, so none of its settings are lost and your ownnavigatorKeyis kept. - New
matchOrientationoption. 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)andFlexify.canGoBack.Flexify.screenType,isPhone,isTablet,isDesktopandFlexify.value(phone: ..., tablet: ..., desktop: ...)for layouts that differ between phones, tablets and desktops.minScaleandmaxScalekeep the scale within limits, for example so a phone design does not grow to 5 times its size in a wide browser window..swand.shgive a percentage of the screen width and height, for example50.sw.Flexify.scaleWidth,Flexify.scaleHeightandFlexify.screenSize.go,goRemoveandgoRemoveAlltakesettings, 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.navigatorKeyreturns 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
MediaQueryexists above the app. - Rotation and window resizing rebuild the UI with the new sizes. Opening the keyboard no longer affects anything.
- An
animationwithout adurationuses 300 ms instead of failing. The duration is also used when going back. flipandflipAndFadekeep the state of the page during the animation and turn the page with perspective.blurblurs 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,.rsand.rt. - Clearer error messages when
Flexifyis 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,goRemoveAllandback.
1.0.5 #
- Improved responsive text size calculation.
- Removed
FontSizeResolver.
1.0.4 #
- Initial release: responsive scaling for width, height and text.
