Repository: flutter
Issue: FlutterFragment not returning the expected type when inflating it in Android
Labels: platform-android,d: examples,a: existing-apps,d: wiki,P3,team-android,triaged-android

## Summary

I need to inflate a `FlutterFragment` with a custom dart entry point, and set initial route.

However, this happens, it seems like the `io.flutter.embedding.android.FlutterFragment` is not a valid argument for the fragment layout inflation. This is misleading as the [documentation](https://github.com/flutter/flutter/wiki/Experimental:-Add-Flutter-Fragment), is actually inflating it the same way as I did.

![Screen Shot 2019-07-26 at 10 48 58 AM](https://user-images.githubusercontent.com/20706361/61922585-99fc1a80-af93-11e9-9e7d-5f1df1b11185.png)

Alternative is to use `Flutter.createFragment(...)`, however it does not allow me to set custom dart entry point other than `main`.

![Screen Shot 2019-07-26 at 10 51 39 AM](https://user-images.githubusercontent.com/20706361/61922524-602b1400-af93-11e9-939b-c12c79e8a5b6.png)

## Logs

`flutter doctor -v`

```
[✓] Flutter (Channel stable, v1.7.8+hotfix.3, on Mac OS X 10.14.5 18F132, locale en-PH)
    • Flutter version 1.7.8+hotfix.3 at /Users/joshuadeguzman/Documents/Tools/flutter
    • Framework revision b712a172f9 (2 weeks ago), 2019-07-09 13:14:38 -0700
    • Engine revision 54ad777fd2
    • Dart version 2.4.0

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    • Android SDK at /Users/joshuadeguzman/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
      Download at: https://developer.apple.com/xcode/download/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
    ✗ CocoaPods installed but not initialized.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To initialize CocoaPods, run:
        pod setup
      once to finalize CocoaPods' installation.

[✗] iOS tools - develop for iOS devices
    ✗ libimobiledevice and ideviceinstaller are not installed. To install with Brew, run:
        brew update
        brew install --HEAD usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    ✗ ios-deploy not installed. To install:
        brew install ios-deploy

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 36.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] VS Code (version 1.36.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.2.0

[✓] Connected device (1 available)
    • Pixel XL • HT6C90202587 • android-arm64 • Android 8.0.0 (API 26)

! Doctor found issues in 2 categories.
```