v0.16.0
This version includes several new features, fixes and breaking changes (denoted with 💥).
Added Custom Barrier Support for Modal Sheets
ModalSheetRoute.barrierBuilder has been added to modal routes and pages (thank you, @bqubique). This allows you to build a custom barrier for a modal sheet—for example, a blurred background. See this example for more practical usage.
ModalSheetRoute(
...
barrierBuilder: (route, dismissCallback) {
return GestureDetector(
onTap: dismissCallback,
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 15.0, sigmaY: 15.0),
child: Container(color: Colors.black12),
),
);
},
);
Simplified BouncingSheetPhysics configuration 💥
The way to configure the bouncing behavior of a sheet is now much more straightforward. There are only two parameters: and . is the maximum number of pixels the sheet can be overdragged, and is a factor that controls how easy or hard it is to overdrag the sheet by pixels. The higher the value, the harder it is to overdrag further.