BorderRadiusTween.lerp supports null begin/end values (#79860)

This commit is contained in:
xubaolin
2021-04-17 08:24:02 +08:00
committed by GitHub
parent 7aa188bacc
commit aa7ab10822
3 changed files with 11 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ const double _kFrontClosedHeight = 92.0; // front layer height when closed
const double _kBackAppBarHeight = 56.0; // back layer (options) appbar height
// The size of the front layer heading's left and right beveled corners.
final Animatable<BorderRadius> _kFrontHeadingBevelRadius = BorderRadiusTween(
final Animatable<BorderRadius?> _kFrontHeadingBevelRadius = BorderRadiusTween(
begin: const BorderRadius.only(
topLeft: Radius.circular(12.0),
topRight: Radius.circular(12.0),
@@ -315,7 +315,7 @@ class _BackdropState extends State<Backdrop> with SingleTickerProviderStateMixin
color: Theme.of(context).canvasColor,
clipper: ShapeBorderClipper(
shape: BeveledRectangleBorder(
borderRadius: _kFrontHeadingBevelRadius.transform(_controller!.value),
borderRadius: _kFrontHeadingBevelRadius.transform(_controller!.value)!,
),
),
clipBehavior: Clip.antiAlias,