Repository: flutter
Issue: CupertinoNavigationBar doesn't perform a hero transition if the first route is a "fullscreenDialog" route
Labels: framework,f: cupertino,f: routes,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-design,triaged-design

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill our the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- You must include full steps to reproduce so that we can reproduce the problem. -->

1.  Create a `CupertinoApp`
2. Create a `CupertinoPageScaffold` as `home` for `CupertinoApp`
3. Present another `CupertinoPageScaffold` using `CupertinoPageRoute` with `fullscreenDialog` set to true
4. Present another `CupertinoPageScaffold` using `CupertinoPageRoute` with default settings. Hero animation is not performed

**Expected results:** <!-- what did you want to see? -->

The native app always performs the hero animation

![native_gif](https://user-images.githubusercontent.com/2765174/75595749-7f66b400-5a42-11ea-950e-b96deaba268e.gif)


**Actual results:** <!-- what did you see? -->

Hero animation is not performed the first time. The page just slides over from the right.

![flutter_gif](https://user-images.githubusercontent.com/2765174/75595769-90172a00-5a42-11ea-8c46-5b7f078b790f.gif)


### Flutter project file

<details>
  <summary>main.dart</summary>

```dart
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return CupertinoApp(
      home: CupertinoPage(),
    );
  }
}

class CupertinoPage extends StatelessWidget {
  const CupertinoPage({
    Key key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return CupertinoPageScaffold(
      navigationBar: CupertinoNavigationBar(
        middle: Text("Hero"),
      ),
      child: Container(
        child: Center(
          child: Row(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              CupertinoButton(
                child: Text("Push"),
                onPressed: () {
                  Navigator.of(context)
                      .push(CupertinoPageRoute(builder: (context) {
                    return CupertinoPage();
                  }));
                },
              ),
              CupertinoButton(
                  child: Text("Present"),
                  onPressed: () {
                    Navigator.of(context).push(CupertinoPageRoute(
                      builder: (context) {
                        return CupertinoPage();
                      },
                      fullscreenDialog: true,
                    ));
                  })
            ],
          ),
        ),
      ),
    );
  }
}
```


</details>

### iOS native project file

<details>

  <summary>ViewController.swift</summary>

```
//
//  ViewController.swift
//  heropoc_native
//
//  Created by Roman Tkachenko on 2/28/20.
//  Copyright © 2020 Roman Tkachenko. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = .white
        self.title = "Native Hero"
        
        let container = UIView()
        container.translatesAutoresizingMaskIntoConstraints = false
        self.view.addSubview(container)
        container.centerYAnchor.constraint(equalTo: self.view.centerYAnchor).isActive = true
        container.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true
        
        let pushButton = UIButton.init(type: .system)
        pushButton.translatesAutoresizingMaskIntoConstraints = false
        pushButton.setTitle("Push", for: .normal)
        pushButton.addTarget(self, action: #selector(self.push), for: .touchUpInside)
        container.addSubview(pushButton)
        pushButton.leadingAnchor.constraint(equalTo: container.leadingAnchor).isActive = true
        pushButton.topAnchor.constraint(equalTo: container.topAnchor).isActive = true
        pushButton.bottomAnchor.constraint(equalTo: container.bottomAnchor).isActive = true
        
        let presentButton = UIButton.init(type: .system)
        presentButton.translatesAutoresizingMaskIntoConstraints = false
        presentButton.setTitle("Present", for: .normal)
        presentButton.addTarget(self, action: #selector(self.presentScreen), for: .touchUpInside)
        container.addSubview(presentButton)
        
        presentButton.leadingAnchor.constraint(equalTo: pushButton.trailingAnchor, constant: 30).isActive = true
        presentButton.centerYAnchor.constraint(equalTo: pushButton.centerYAnchor).isActive = true
        presentButton.trailingAnchor.constraint(equalTo: container.trailingAnchor).isActive = true
        
    }
    
    @objc
    private dynamic func push() {
        self.navigationController?.pushViewController(ViewController(), animated: true)
    }
    
    @objc
    private dynamic func presentScreen() {
        let vc = ViewController()
        vc.navigationItem.leftBarButtonItem = UIBarButtonItem.init(title: "close", style: .done, target: self, action: #selector(self.close))
        let nav = UINavigationController(rootViewController: vc)
        nav.modalPresentationStyle = .fullScreen
        self.present(nav, animated: true, completion: nil)
    }
    
    @objc
    private dynamic func close() {
        self.dismiss(animated: true, completion: nil)
    }
}
```



</details>

<details>
  <summary>Logs</summary>


<!-- Finally, paste the output of running `flutter doctor -v` here. -->


```
/Users/rtkachenko/development/flutter/bin/flutter doctor --verbose
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.15.1 19B88, locale en-US)
    • Flutter version 1.12.13+hotfix.8 at /Users/rtkachenko/development/flutter
    • Framework revision 0b8abb4724 (2 weeks ago), 2020-02-11 11:44:36 -0800
    • Engine revision e1e6ced81d
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/rtkachenko/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 43.0.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] Connected device (1 available)
    • iPhone 8 • 6D169821-C1BC-4FDF-9EF4-39DD014AA182 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)
```


• No issues found!

</details>