FModalSheetStyleDelta.delta constructor
const
FModalSheetStyleDelta.delta({
- ImageFilter barrierFilter()?,
- FModalSheetMotionDelta? motion,
- double? flingVelocity,
- double? closeProgressThreshold,
Creates a partial modification of a FModalSheetStyle.
Parameters
- FModalSheetStyle.barrierFilter - An optional callback that takes the current animation transition value (0.0 to 1.0) and returns an ImageFilter that is used as the barrier. Defaults to null.
Examples
// Blurred
(animation) => ImageFilter.blur(sigmaX: animation * 5, sigmaY: animation * 5);
// Solid color
(animation) => ColorFilter.mode(Colors.white.withValues(alpha: animation), BlendMode.srcOver);
// Tinted
(animation) => ColorFilter.mode(Colors.white.withValues(alpha: animation * 0.5), BlendMode.srcOver);
// Blurred & tinted
(animation) => ImageFilter.compose(
outer: ImageFilter.blur(sigmaX: animation * 5, sigmaY: animation * 5),
inner: ColorFilter.mode(Colors.white.withValues(alpha: animation * 0.5), BlendMode.srcOver),
);
- FModalSheetStyle.motion - The motion-related properties for a modal sheet.
- FModalSheetStyle.flingVelocity - The minimum velocity to initiate a fling.
- FModalSheetStyle.closeProgressThreshold - The threshold for determining whether the sheet is closing.
Implementation
const factory FModalSheetStyleDelta.delta({
ImageFilter Function(double)? barrierFilter,
FModalSheetMotionDelta? motion,
double? flingVelocity,
double? closeProgressThreshold,
}) = _FModalSheetStyleDelta;