MorphTargetSpec.fullscreen constructor

MorphTargetSpec.fullscreen({
  1. MorphSurfaceSpec? surface,
  2. ShapeBorder? shape,
  3. Color? surfaceColor,
})

The container-transform destination: the whole screen. The bread and butter of MorphPageRoute - a card that becomes a page.

Implementation

factory MorphTargetSpec.fullscreen({
  MorphSurfaceSpec? surface,
  ShapeBorder? shape,
  Color? surfaceColor,
}) {
  return MorphTargetSpec(
    surface: surface,
    shape: shape ?? const RoundedRectangleBorder(),
    surfaceColor: surfaceColor,
    rectFor: (Size size, EdgeInsets padding) => Offset.zero & size,
  );
}