HeroContainer constructor

const HeroContainer({
  1. Key? key,
  2. Color? openedColor,
  3. Color? closedColor,
  4. ShapeBorder? openedShape,
  5. ShapeBorder? closedShape,
  6. HeroContianerClosedCallback? onClosed,
  7. double openedElevation = 4.0,
  8. double closedElevation = 1.0,
  9. BoxFit openedFit = BoxFit.fitWidth,
  10. BoxFit closedFit = BoxFit.fitWidth,
  11. AlignmentGeometry closedAlignment = Alignment.topCenter,
  12. AlignmentGeometry openedAlignemnt = Alignment.topCenter,
  13. Duration transitionDuration = const Duration(milliseconds: 300),
  14. Curve transitionCurve = Curves.fastOutSlowIn,
  15. HeroContianerFlightShuttleBuilder? flightShuttleBuilder,
  16. required WidgetBuilder openedBuilder,
  17. required HeroContainerBuilder closedBuilder,
})

Creates a hero container with customizable transition properties.

Implementation

const HeroContainer({
  super.key,
  this.openedColor,
  this.closedColor,
  this.openedShape,
  this.closedShape,
  this.onClosed,
  this.openedElevation = 4.0,
  this.closedElevation = 1.0,
  this.openedFit = BoxFit.fitWidth,
  this.closedFit = BoxFit.fitWidth,
  this.closedAlignment = Alignment.topCenter,
  this.openedAlignemnt = Alignment.topCenter,
  this.transitionDuration = const Duration(milliseconds: 300),
  this.transitionCurve = Curves.fastOutSlowIn,
  this.flightShuttleBuilder,
  required this.openedBuilder,
  required this.closedBuilder,
});