Repository: flutter
Issue: Hero's height sizing issue when keyboard is opened
Labels: a: text input,framework,f: material design,f: routes,a: quality,has reproducible steps,found in release: 2.2,team-design,triaged-design

## Steps to Reproduce

### In the first page:
Put a TextField and an ElevatedButton inside an Hero widget inside a Scaffold widget.

### In the second page:
Put an ElevatedButton inside an Hero widget (with the same tag of the first Hero) inside a Scaffold widget.

## Then:
Focus on the textfield to display the keyboard and navigate to another page.
During the navigation transition the keyboard will disappear.

## Expected results:
I want my button play his Hero animation the same way as if we never displayed the keyboard 

## Actual results:
My button's height is oversized during the animation

## NOTE 1:
If the Scaffold's property "resizeToAvoidBottomInset" is false (true by default) there is no problem but there is a risk for my textfields to be hidden by the keyboard.

## NOTE 2: 
Even if I set the property "fixedSize" of my button's style I had the the problem :/

## Here is a screenshot during the transition:

<img title="Simulator Screen Shot - iPhone 12 Pro Max - 2021-07-08 at 11 12 24" src="https://user-images.githubusercontent.com/24249215/124898772-c9b95700-dfdf-11eb-8667-ea5481b78d86.png" width="321" height="694">

## Here is the full code to reproduce the bug:

```import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

const String LoginRoute = '/';
const String HomeRoute = '/home';
const Map<String, Widget> MyRoutes = {
  LoginRoute: Login(),
  HomeRoute: Home(),
};

const String MainButtonHeroTag = 'MAIN_BUTTON_HERO';

class MyApp extends StatelessWidget {
  const MyApp();
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
          elevatedButtonTheme: ElevatedButtonThemeData(
              style: ButtonStyle(
        fixedSize: MaterialStateProperty.all(Size(100, 50)),
      ))),
      routes: MyRoutes.map((route, child) => MapEntry(route, (_) => child)),
      builder: (context, child) => Scaffold(
        // resizeToAvoidBottomInset: false,
        body: child,
      ),
    );
  }
}

class Login extends StatelessWidget {
  const Login();
  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.all(40),
      child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
        TextField(decoration: InputDecoration(labelText: 'Username')),
        TextField(decoration: InputDecoration(labelText: 'Password')),
        Padding(
          padding: const EdgeInsets.all(20),
          child: Hero(
            tag: MainButtonHeroTag,
            child: ElevatedButton(
              onPressed: () => Navigator.of(context).pushNamed(HomeRoute),
              child: Text('Submit'),
            ),
          ),
        ),
      ]),
    );
  }
}

class Home extends StatelessWidget {
  const Home();
  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.all(40),
      child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
        Text('Welcome'),
        Padding(
          padding: const EdgeInsets.all(20),
          child: Hero(
            tag: MainButtonHeroTag,
            child: ElevatedButton(
              onPressed: () => Navigator.of(context).pop(),
              child: Text('Back'),
            ),
          ),
        ),
      ]),
    );
  }
}