Repository: flutter
Issue: Allow nested hero widgets
Labels: framework,a: animation,f: material design,f: routes,customer: crowd,c: proposal,P3,team-design,triaged-design

## Scenario
In my application I have a Markdown editor with three screens:
1. Screen to look at markdown (Screen A)
2. Screen to edit markdown (Screen B)
3. Screen to enlarge pictures in markdown (Screen C) 

To make the transition more comfortable for the user, I would like to use two independent `Hero` transitions:
1. From the first screen to the second screen to edit markdown (A -> B)
  Transition goes from a `MarkdownView` widget to a `MarkdownEdit` widget.
2. From the first screen to the third screen to view images in markdown enlarged (A -> C) 
  Transition goes from an `Image` widget inside the `MarkdownView` widget to an `Image` widget on the new screen.

## Problem
The second `Hero` widget is inside the first `Hero` widget and causes an assert error because of this PR #28470, because one should not nest `Hero` widgets. I don't know why this is technically impossible. The nested `Hero` widgets have different `Hero` tags and on the second and third screen there is only one `Hero` widget each.

If it's needed, I will write a small program to demonstrate the error, but since the error has already been mentioned several times in the given issues, I would like to present a scenario in which it makes sense to nest Hero widgets. I would also be happy about alternative solutions. 

## Related issues

#1398 introduces the problem, but unfortunately close without explanation.
#28470 adds the assert that causes the error, there are a few people complaining about the changes, but it is not further discussed.

## Logs

```
I/flutter (24765): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (24765): The following assertion was thrown building Hero(tag: image-hero,
I/flutter (24765): dirty, state: _HeroState#1595c):
I/flutter (24765): A Hero widget cannot be the descendant of another Hero widget.
I/flutter (24765): 'package:flutter/src/widgets/heroes.dart':
I/flutter (24765): Failed assertion: line 359 pos 7: 'context.ancestorWidgetOfExactType(Hero) == null'
I/flutter (24765): 
I/flutter (24765): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter (24765): more information in this error message to help you determine and fix the underlying cause.
I/flutter (24765): In either case, please report this assertion by filing a bug on GitHub:
I/flutter (24765):   https://github.com/flutter/flutter/issues/new?template=BUG.md
I/flutter (24765): 
I/flutter (24765): When the exception was thrown, this was the stack:
I/flutter (24765): #2      _HeroState.build (package:flutter/src/widgets/heroes.dart:359:7)
I/flutter (24765): #3      StatefulElement.build (package:flutter/src/widgets/framework.dart:4012:27)
I/flutter (24765): #4      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3924:15)
I/flutter (24765): #5      Element.rebuild (package:flutter/src/widgets/framework.dart:3721:5)
I/flutter (24765): #6      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3907:5)
I/flutter (24765): #7      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4053:11)
I/flutter (24765): #8      ComponentElement.mount (package:flutter/src/widgets/framework.dart:3902:5)
I/flutter (24765): #9      Element.inflateWidget (package:flutter/src/widgets/framework.dart:3084:14)
...
I/flutter (24765): #470    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:958:9)
I/flutter (24765): #471    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:874:5)
I/flutter (24765): #475    _invoke (dart:ui/hooks.dart:236:10)
I/flutter (24765): #476    _drawFrame (dart:ui/hooks.dart:194:3)
I/flutter (24765): (elided 5 frames from class _AssertionError and package dart:async)
I/flutter (24765): ════════════════════════════════════════════════════════════════════════════════════════════════════
```

```
[✓] Flutter (Channel unknown, v1.7.8+hotfix.3, on Mac OS X 10.14.5 18F132, locale en-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 10.2)
[✓] iOS tools - develop for iOS devices
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.34.0)
[✓] Connected device (3 available)

• No issues found!
```