RoundRevealRoute<T> constructor

RoundRevealRoute<T>(
  1. Widget widget, {
  2. double minRadius = 0,
  3. required double maxRadius,
  4. AlignmentGeometry? centerAlignment,
  5. Offset? centerOffset,
  6. int durationMs = Nav.defaultDurationMs,
})

Reveals the next item pushed to the navigation using circle shape.

You can provide centerAlignment for the reveal center or if you want a more precise use only centerOffset and leave other blank.

The transition doesn't affect the entry screen so we will only touch the target screen.

Implementation

RoundRevealRoute(
  this.widget, {
  this.minRadius = 0,
  required this.maxRadius,
  this.centerAlignment,
  this.centerOffset,
  int durationMs = Nav.defaultDurationMs,
})  : assert(centerOffset != null || centerAlignment != null),
      super(
        transitionDuration: Duration(milliseconds: durationMs),

        /// We could override pageBuilder but it's a required parameter of
        /// [PageRouteBuilder] and it won't build unless it's provided.
        pageBuilder: (
          BuildContext context,
          Animation<double> animation,
          Animation<double> secondaryAnimation,
        ) {
          return widget;
        },
      );