Repository: flutter
Issue: can't move/reuse widget in differenct place of widget tree.
Labels: waiting for customer response,in triage

### Steps to reproduce

I saved a widget tree for reusing, like the following

```dart
class StageState extends State<Stage> implements Show<Stage> {
  int idx = 0;
  Key key = unique_key();
  Widget win = primary_ui();

  @override
  void show(int n) {
    idx = n;
    setState(() {});
  }

  Widget build(BuildContext context) {
    if (idx == 0) {
      var stack = Stack(key: key, children: <Widget>[
        ExcludeFocus(child: IgnorePointer(ignoring: true, child: win)),
        Align(child: login_view())
      ]);

      return Expanded(
        key: key,
        child: stack,
      );
    } else {
      return Expanded(key: key, child: win);
    }
  }
}
```

But flutter don't allow me to do so
                                                                                                                                                                              


### Expected results

I can reuse the widget, because all the widget is saved, and the widget is normal in users sense, the internal state conflict should be resolved in framework.

### Actual results

```console
The following assertion was thrown building Expanded(flex: 1):                                                                                                                                                                                                                        
'package:flutter/src/widgets/framework.dart': Failed assertion: line 5730 pos 12: 'state._element ==                                                                                                                                                                                  
null': is not true.                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                      
Either the assertion indicates an error in the framework itself, or we should provide substantially                                                                                                                                                                                   
more information in this error message to help you determine and fix the underlying cause.                                                                                                                                                                                            
In either case, please report this assertion by filing a bug on GitHub:                                                                                                                                                                                                               
  https://github.com/flutter/flutter/issues/new?template=2_bug.yml                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                      
The relevant error-causing widget was:                                                                                                                                                                                                                                                
  Expanded Expanded:file:///home/zylthinking/code/flt/lib/stage.dart:80:7                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                                      
When the exception was thrown, this was the stack:                                                                                                                                                                                                                                    
#2      new StatefulElement (package:flutter/src/widgets/framework.dart:5730:12)                                                                                                                                                                                                      
#3      StatefulWidget.createElement (package:flutter/src/widgets/framework.dart:777:38)                                                                                                                                                                                              
...     Normal element mounting (4 frames)                                                                                                                                                                                                                                            
#7      Element.inflateWidget (package:flutter/src/widgets/framework.dart:4480:16)
#8      MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:7049:36)
#9      MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:7061:32)
...     Normal element mounting (7 frames)
#16     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4480:16)
#17     MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:7049:36)
#18     MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:7061:32)
...     Normal element mounting (13 frames)
#31     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4480:16)
#32     MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:7049:36)
#33     MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:7061:32)
#34     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4480:16)
#35     Element.updateChild (package:flutter/src/widgets/framework.dart:3957:20)
#36     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5656:16)
#37     Element.rebuild (package:flutter/src/widgets/framework.dart:5347:7)
#38     ProxyElement.update (package:flutter/src/widgets/framework.dart:5960:5)
#39     Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#40     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5656:16)
#41     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5794:11)
#42     Element.rebuild (package:flutter/src/widgets/framework.dart:5347:7)
#43     BuildScope._tryRebuild (package:flutter/src/widgets/framework.dart:2694:15)
#44     BuildScope._flushDirtyElements (package:flutter/src/widgets/framework.dart:2753:11)
#45     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:3048:18)
#46     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:1176:21)
#47     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:475:5)
#48     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1397:15)
#49     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1318:9)
#50     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1176:5)
#51     _invoke (dart:ui/hooks.dart:312:13)
#52     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:427:5)
#53     _drawFrame (dart:ui/hooks.dart:283:31)
(elided 2 frames from class _AssertionError)
```

### Code sample

<details open><summary>Code sample</summary>

```dart
[Paste your code here]
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[Paste your output here]
```

</details>