heroOrNot method

Widget heroOrNot(
  1. Object? tag, {
  2. CreateRectTween? createRectTween,
  3. HeroFlightShuttleBuilder? flightShuttleBuilder,
  4. HeroPlaceholderBuilder? placeholderBuilder,
  5. bool transitionOnUserGestures = false,
})

If tag is null, this will be returned.

see Widget

Implementation

Widget heroOrNot(
  Object? tag, {
  CreateRectTween? createRectTween,
  HeroFlightShuttleBuilder? flightShuttleBuilder,
  HeroPlaceholderBuilder? placeholderBuilder,
  bool transitionOnUserGestures = false,
}) =>
    tag == null
        ? this
        : Hero(
            tag: tag,
            createRectTween: createRectTween,
            flightShuttleBuilder: flightShuttleBuilder,
            placeholderBuilder: placeholderBuilder,
            transitionOnUserGestures: transitionOnUserGestures,
            child: this);