AnimatedPositionedModifier.fromRect constructor

AnimatedPositionedModifier.fromRect({
  1. Key? key,
  2. Widget? child,
  3. Curve curve = Curves.linear,
  4. required Duration duration,
  5. VoidCallback? onEnd,
  6. Key? modifierKey,
  7. required Rect rect,
})

Creates a widget that animates the rectangle it occupies implicitly.

The curve and duration arguments must not be null.

Implementation

AnimatedPositionedModifier.fromRect({
  super.key,
  super.child,
  super.curve,
  required super.duration,
  super.onEnd,
  super.modifierKey,
  required Rect rect,
})  : left = rect.left,
      top = rect.top,
      width = rect.width,
      height = rect.height,
      right = null,
      bottom = null;