Hero constructor Null safety
- {Key? key,
- required Object tag,
- CreateRectTween? createRectTween,
- HeroFlightShuttleBuilder? flightShuttleBuilder,
- HeroPlaceholderBuilder? placeholderBuilder,
- bool transitionOnUserGestures = false,
- required Widget child}
Create a hero.
The tag and child
parameters must not be null.
The child
parameter and all of the its descendants must not be Heroes.
Implementation
const Hero({
super.key,
required this.tag,
this.createRectTween,
this.flightShuttleBuilder,
this.placeholderBuilder,
this.transitionOnUserGestures = false,
required this.child,
}) : assert(tag != null),
assert(transitionOnUserGestures != null),
assert(child != null);