Repository: flutter
Issue: Widgets inserted in MaterialApp Navigator Overlay don't get theme
Labels: framework,f: material design,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-design,triaged-design,f: theming

The app shows popups on top of the visible page.  It uses       `Overlay.of(context).insert(OverlayEntry(...))` to insert a widget into the `Navigator`'s `Overlay` `Stack`.  Unfortunately, the widget cannot get theme data, even though it is under `MaterialApp` in the widget tree.  `CupertinoApp` doesn't have this problem.

The workaround is to put the widget under a `Material` widget.

`MaterialApp` demo and screenshot:
```dart
import 'package:flutter/material.dart' show Material, MaterialApp, Scaffold;
import 'package:flutter/widgets.dart'
    show
        BuildContext,
        Column,
        MainAxisAlignment,
        Overlay,
        OverlayEntry,
        Positioned,
        SafeArea,
        State,
        StatefulWidget,
        StatelessWidget,
        Text,
        runApp,
        Widget,
        WidgetsBinding;

class Popup extends StatelessWidget {
  @override
  Widget build(BuildContext context) => Text('Popup');
}

class PopupWithMaterial extends StatelessWidget {
  @override
  Widget build(BuildContext context) =>
      Material(child: Text('PopupWithMaterial'));
}

class PopupAdder extends StatefulWidget {
  final Widget child;

  const PopupAdder({this.child});

  @override
  State createState() => PopupAdderState();
}

class PopupAdderState extends State<PopupAdder> {
  @override
  void initState() {
    super.initState();
    WidgetsBinding.instance.addPostFrameCallback((_) {
      print('Adding popups to Overlay');
      Overlay.of(context).insert(OverlayEntry(
        builder: (BuildContext context) => Positioned.fill(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [Popup(), PopupWithMaterial()],
          ),
        ),
      ));
    });
  }

  @override
  Widget build(BuildContext context) => widget.child;
}

void main() {
  runApp(MaterialApp(
      home: Scaffold(body: SafeArea(child: PopupAdder(child: Text('App'))))));
}
```

<img src="https://user-images.githubusercontent.com/520739/63825977-acaa9c00-c911-11e9-8f8e-fded568e0892.png" width="350" height="600" />

`CupertinoApp` demo and screenshot:
```dart
import 'package:flutter/cupertino.dart'
    show CupertinoApp, CupertinoPageScaffold;
import 'package:flutter/widgets.dart'
    show
        BuildContext,
        Center,
        Overlay,
        OverlayEntry,
        Positioned,
        SafeArea,
        State,
        StatefulWidget,
        StatelessWidget,
        Text,
        runApp,
        Widget,
        WidgetsBinding;

class Popup extends StatelessWidget {
  @override
  Widget build(BuildContext context) => Text('Popup');
}

class PopupAdder extends StatefulWidget {
  final Widget child;

  const PopupAdder({this.child});

  @override
  State createState() => PopupAdderState();
}

class PopupAdderState extends State<PopupAdder> {
  @override
  void initState() {
    super.initState();
    WidgetsBinding.instance.addPostFrameCallback((_) {
      print('Adding popups to Overlay');
      Overlay.of(context).insert(OverlayEntry(
        builder: (BuildContext context) => Positioned.fill(
          child: Center(child: Popup()),
        ),
      ));
    });
  }

  @override
  Widget build(BuildContext context) => widget.child;
}

void main() {
  runApp(CupertinoApp(
      home: CupertinoPageScaffold(
          child: SafeArea(child: PopupAdder(child: Text('App'))))));
}
```

<img src="https://user-images.githubusercontent.com/520739/63826159-9c46f100-c912-11e9-9c64-52a62b147950.png" width="350" height="600" />