MorphTargetSpec constructor

MorphTargetSpec({
  1. required Rect rectFor(
    1. Size overlaySize,
    2. EdgeInsets viewPadding
    ),
  2. MorphSurfaceSpec? surface,
  3. ShapeBorder shape = const RoundedRectangleBorder(),
  4. Color? surfaceColor,
  5. double elevation = 24,
  6. Alignment contentAlignment = Alignment.topCenter,
})

Creates a target from a live rectFor and a surface model.

Implementation

MorphTargetSpec({
  required this.rectFor,
  MorphSurfaceSpec? surface,
  ShapeBorder shape = const RoundedRectangleBorder(),
  Color? surfaceColor,
  double elevation = 24,
  this.contentAlignment = Alignment.topCenter,
}) : shape = surface != null ? surface.shape : shape,
     surfaceColor = surface != null ? surface.color : surfaceColor,
     elevation = surface != null ? surface.elevation : elevation;