Repository: flutter
Issue: Flutter activity is not finished after all routes are popped
Labels: platform-android,engine,f: routes,a: existing-apps,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-android,triaged-android

I'm adding a few new screens built with Flutter onto an exiting Android app with a pre-warmed engine. Everything works so smoothly until I tried to close the UI from the flutter side.

In stand-alone flutter app, when all routes popped from the root Navigator, the app is closed automatically. But in this app, the app popped into a funny screen.

This is the `home` or the `MaterialApp`
![image](https://user-images.githubusercontent.com/1287238/98367909-88585c80-208a-11eb-9f6b-2901bf05970c.png)

When I clicked `Exit`, it runs `Navigator.pop(context);`

I was expecting the `FlutterActivity` is finished, but it doesn't, and this is what I see on the screen:
![image](https://user-images.githubusercontent.com/1287238/98368097-dbcaaa80-208a-11eb-9f0d-a0ec2c11ffb9.png)
This is the same screen captured the by emulator screenshot tool, which is a blank screen
![image](https://user-images.githubusercontent.com/1287238/98368141-f3099800-208a-11eb-8658-59b6a8278825.png)

I can leave this screen by **press physical back**, I can return to my native screen.

If I re-show the flutter screen again, I would see
![image](https://user-images.githubusercontent.com/1287238/98368245-23513680-208b-11eb-9593-6ab5ecfef1f6.png)
It renders a transparent view on it, but you can still see flutter debug ribbon.

If I triggers hot reload right now, I can see logs:
```
Performing hot reload...
Syncing files to device Android SDK built for x86...

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following assertion was thrown building Navigator-[GlobalObjectKey<NavigatorState>
_WidgetsAppState#a6a87](dirty, dependencies: [HeroControllerScope], state:
NavigatorState#a52a8(tickers: tracking 0 tickers)):
'package:flutter/src/widgets/navigator.dart': Failed assertion: line 4042 pos 12:
'_history.isNotEmpty': 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=BUG.md

The relevant error-causing widget was:
  MaterialApp
  file:///Users/timnew/Workspace/mobile-android/flutter_module/lib/screens/app/JoraApp.dart:28:12

When the exception was thrown, this was the stack:
#2      NavigatorState.build (package:flutter/src/widgets/navigator.dart:4042:12)
#3      StatefulElement.build (package:flutter/src/widgets/framework.dart:4744:28)
#4      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4627:15)
#5      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#6      Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#7      StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#8      Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#9      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#10     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#11     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#12     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#13     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#14     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#15     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#16     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#17     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#18     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#19     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#20     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#21     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#22     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#23     StatelessElement.update (package:flutter/src/widgets/framework.dart:4708:5)
#24     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#25     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#26     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#27     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#28     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#29     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#30     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#31     StatelessElement.update (package:flutter/src/widgets/framework.dart:4708:5)
#32     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#33     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#34     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#35     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#36     StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#37     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#38     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#39     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#40     StatelessElement.update (package:flutter/src/widgets/framework.dart:4708:5)
#41     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#42     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#43     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#44     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#45     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#46     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6125:14)
#47     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#48     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#49     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#50     StatelessElement.update (package:flutter/src/widgets/framework.dart:4708:5)
#51     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#52     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#53     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#54     StatelessElement.update (package:flutter/src/widgets/framework.dart:4708:5)
#55     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#56     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#57     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#58     StatelessElement.update (package:flutter/src/widgets/framework.dart:4708:5)
#59     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#60     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#61     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#62     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#63     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#64     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#65     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#66     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#67     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#68     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6125:14)
#69     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#70     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#71     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#72     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#73     StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#74     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#75     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#76     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#77     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#78     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#79     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#80     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#81     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#82     StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#83     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#84     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#85     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#86     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#87     _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:183:11)
#88     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#89     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#90     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#91     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#92     StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#93     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#94     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#95     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#96     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#97     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#98     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#99     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#100    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#101    StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#102    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#103    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#104    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#105    ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#106    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#107    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#108    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#109    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#110    StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#111    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#112    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#113    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#114    ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#115    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:183:11)
#116    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#117    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6125:14)
#118    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#119    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#120    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#121    ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#122    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:183:11)
#123    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#124    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#125    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#126    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#127    StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#128    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#129    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#130    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#131    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#132    StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#133    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#134    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#135    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#136    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#137    StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#138    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#139    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#140    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#141    ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#142    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#143    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#144    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#145    ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
#146    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#147    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#148    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#149    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#150    StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
#151    Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
#152    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
#153    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#154    Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
#155    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2730:33)
#156    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:913:20)
#157    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:302:5)
#158    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1117:15)
#159    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1055:9)
#160    SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:864:7)
(elided 6 frames from class _AssertionError, class _RawReceivePortImpl, class _Timer, and dart:async-patch)

════════════════════════════════════════════════════════════════════════════════════════════════════
Reloaded 0 of 577 libraries in 371ms.

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown building Navigator-[GlobalObjectKey<NavigatorState> _WidgetsAppState#a6a87](dirty, dependencies: [HeroControllerScope], state: NavigatorState#a52a8(tickers: tracking 0 tickers)):
'package:flutter/src/widgets/navigator.dart': Failed assertion: line 4042 pos 12: '_history.isNotEmpty': 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=BUG.md

The relevant error-causing widget was: 
  MaterialApp file:///Users/timnew/Workspace/mobile-android/flutter_module/lib/screens/app/JoraApp.dart:28:12
When the exception was thrown, this was the stack: 
#2      NavigatorState.build (package:flutter/src/widgets/navigator.dart:4042:12)
#3      StatefulElement.build (package:flutter/src/widgets/framework.dart:4744:28)
#4      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4627:15)
#5      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#6      Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
...
════════════════════════════════════════════════════════════════════════════════════════════════════
```

## Steps to Reproduce

This is flutter side code
```dart
class FlutterApp extends StatefulWidget {
  @override
  _FlutterAppState createState() => _FlutterAppState();
}

class _FlutterAppState extends State<FlutterApp> {
  final routeRemoteController = RouteRemoteController();
  final Map<String, WidgetBuilder> _routes = {
    "debug": (context) => DebugScreen(),
    // "profile": (context) => ProfileScreen(),
    // "feedback": (context) => FeedbackDialog(),
  };

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'FlutterModule',
      // navigatorObservers: [routeRemoteController],
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      routes: _routes,
      initialRoute: 'debug',
    );
  }
}

class DebugScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text("Debug Entry"),
        ),
        body: Builder(builder: _buildBody));
  }

  Widget _buildBody(BuildContext context) {
    return ListView(
      children: <Widget>[
        _NavigateItem(routeName: "profile"),
        _NavigateItem(routeName: "feedback"),
        _OptionItem(text: "Exit", onTap: () => Navigator.pop(context)),
      ],
    );
  }
}

class _OptionItem extends StatelessWidget {
  final VoidCallback onTap;
  final IconData icon;
  final String text;

  const _OptionItem({
    Key key,
    this.onTap,
    this.icon,
    @required this.text,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) => ListTile(
        leading: icon != null ? Icon(icon) : null,
        title: Text(text),
        onTap: onTap,
      );
}

class _NavigateItem extends StatelessWidget {
  final String routeName;
  final IconData icon;
  final String text;

  const _NavigateItem(
      {Key key, this.icon, String text, @required this.routeName})
      : this.text = text ?? routeName,
        super(key: key);

  @override
  Widget build(BuildContext context) => ListTile(
        leading: icon != null ? Icon(icon) : null,
        title: Text(text),
        onTap: () => Navigator.pushNamed(context, routeName),
      );
}
```
This is the android side code
```kt

object FlutterManager {
  private const val engineName = "default"
  private const val routeControlChannelName = "jora/navigation"

  private lateinit var flutterEngine: FlutterEngine

//  private val navigationControl: FlutterNavigationControl by lazy {
//    FlutterNavigationControl(
//      MethodChannel(flutterEngine.dartExecutor, routeControlChannelName, JSONMethodCodec.INSTANCE)
//    )
//  }

  fun init(context: Context) {
    flutterEngine = FlutterEngine(context)

    flutterEngine.dartExecutor.executeDartEntrypoint(
      DartExecutor.DartEntrypoint.createDefault()
    )

    FlutterEngineCache.getInstance().put(engineName, flutterEngine)
  }

  fun createFragment(routeName: String?): FlutterFragment {
//    routeName?.let {
//      navigationControl.replaceRoot(routeName)
//    }

    return FlutterFragment.withCachedEngine(engineName)
      .transparencyMode(TransparencyMode.transparent)
      .build()
  }

  fun startActivity(activity: Activity, routeName: String? = null) {
//    routeName?.let {
//      navigationControl.replaceRoot(routeName)
//    }

    activity.startActivity(
      CrossPlatformActivity
        .withCachedEngine(engineName)
        .backgroundMode(BackgroundMode.transparent)
        .build(activity.applicationContext)
    )
  }
}
//
//class FlutterNavigationControl(private val channel: MethodChannel) : MethodChannel.MethodCallHandler {
//  private val logger
//    get() = Timber.tag("FlutterNavigation")
//
//  init {
//    channel.setMethodCallHandler(this)
//  }
//
//  fun pushRoute(route: String) {
//    logger.i("Sending message to push route '$route'")
//    channel.invokeMethod("pushRoute", route)
//  }
//
//  fun popRoute() {
//    logger.i("Sending message to pop route.")
//    channel.invokeMethod("popRoute", null)
//  }
//
//  fun replaceRoot(route: String) {
//    logger.i("Sending message to replace root route: $route")
//    channel.invokeMethod("replaceRoot", route)
//  }
//
//  override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
//  }
//}
```

```kt
import io.flutter.embedding.android.FlutterActivity

class CrossPlatformActivity : FlutterActivity() {

  companion object {
    fun withCachedEngine(engineId: String): CachedEngineIntentBuilder =
      CachedEngineIntentBuilder(CrossPlatformActivity::class.java, engineId)
  }
}
```

**Expected results:**

When I pressed "Exit" button in flutter app, the last route is popped via `Navigator.pop`, the activity/fragment should be removed from the Android navigation stack, same as physical back button is pressed.
I tried to host `FlutterFragment` in a activity or use `FlutterActivity` directly, both has the renders the transparent view.

**Actual results:**
A transparent activity/fragment is still there, which can be dismissed by pressing physical back

Logs are attached below, expand it to see:

<details>
  <summary>Logs</summary>

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue.
-->

```
```

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
⋊> flutter analyze
Analyzing mobile-android...

   info • Unused import: 'package:flutter_module/screens/feedback/FeedbackDialog.dart' • flutter_module/lib/screens/app/FlutterApp.dart:5:8 • unused_import
   info • Unused import: 'package:flutter_module/screens/profile/ProfileScreen.dart' • flutter_module/lib/screens/app/FlutterApp.dart:6:8 • unused_import

2 issues found. (ran in 4.7s)
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[✓] Flutter (Channel stable, 1.22.2, on Mac OS X 10.15.5 19F101, locale en-AU)
    • Flutter version 1.22.2 at /Users/tim.wen/Workspace/flutter
    • Framework revision 84f3d28555 (3 weeks ago), 2020-10-15 16:26:19 -0700
    • Engine revision b8752bbfff
    • Dart version 2.10.2


[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/tim.wen/Library/Android/sdk
    • Platform android-29, build-tools 29.0.3
    • ANDROID_HOME = Users/tim.wen/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    • CocoaPods version 1.9.3

[!] Android Studio
    • Android Studio at /Applications/Android Studio 4.2 Preview.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.50.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (1 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)

! Doctor found issues in 2 categories.
```

</details>