glassmorphism 4.0.0
glassmorphism: ^4.0.0 copied to clipboard
Glassmorphic (frosted glass) containers for Flutter with backdrop blur, gradient fill, gradient borders, shadows and size-to-child layout.
4.0.0 #
Maintenance release that fixes long-standing bugs, adds the most requested features and brings the package up to date with current Flutter.
Breaking changes #
- Requires Dart 3.5 / Flutter 3.24 or newer.
bluris now applied uniformly. Previously the vertical blur was silently doubled (sigmaY: blur * 2). To keep the old, stronger look, increaseblur.GlassmorphicFlexContainer.paddingnow pads the child inside the glass. Previously it inset the glass itself, which is whatmarginis for.GlassmorphicFlexContainer.flexis a non-nullableint(default1).linearGradientandborderGradientare typed asGradient, so radial and sweep gradients work too. Code that reads these fields asLinearGradientneeds a cast.
New features #
GlassmorphicContainer.widthandheightare optional. Without them the glass sizes itself to its child, likeContainer(#1, #6, #12).boxShadowadds drop shadows. They are painted only outside the glass, like CSSbox-shadow, so they do not darken the translucent fill (#10).shape: BoxShape.circleis now supported. The parameter already existed but was ignored.clipBehaviorcontrols how the child is clipped to the glass.- Constructors are
const.
Fixes #
- Fixed
'dart:ui/geometry.dart': Failed assertionwhenborderis larger thanborderRadiusor the container has zero size (#14). - Fixed "Multiple widgets used the same GlobalKey" when a
GlobalKeyis passed. The key was also applied to an inner widget. GlassmorphicContainer.paddingwas ignored. It is now applied.GlassmorphicFlexContainer.marginandconstraintswere ignored. They are now applied.- Widgets no longer require a
Directionalityancestor. - The border no longer rebuilds on every
MediaQuerychange and only repaints when its properties change. blur: 0skips theBackdropFilterentirely.
Other #
- Added widget tests, lints and CI.
- Reworked the example app. The showcase screen with live pub.dev stats now uses pub.dev's JSON API instead of scraping HTML. It loads without blocking startup, handles errors with a retry button and also works on the web. A new gallery page shows every feature. Regenerated the platform folders for current Flutter.
- Removed committed build artifacts, IDE files and lock files.
3.0.0 26 April 2021. #
- Added GlassmorphicFlexContainer That makes the ui responsive.
- Fixed minor bugs.
2.0.1 26 April 2021. #
- Migration to Sound Null safer Version
1.0.3 02 January 2021. #
- Minor Documentation Changes.
0.1.3 30 December 2020 #
- Fixed GestureDetection Bug.
0.1.2 31 December 2020 #
- Added ['GradientBorder'].
0.1.1 30 December 2020 #
- Added Features.