Taha Tesser 5f93393312 Fix iOS password autofill prompt dismissal causes layout to resize (flutter/engine#50364)
fixes [Save password prompt dismiss is pushing UI up and down](https://github.com/flutter/flutter/issues/112281)

### Code sample

<details>
<summary>expand to view the code sample</summary> 

```dart
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      debugShowCheckedModeBanner: false,
      home: HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  final TextEditingController controller1 = TextEditingController();
  final TextEditingController controller2 = TextEditingController();

  @override
  void dispose() {
    controller1.dispose();
    controller2.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold( // Replace Scaffold with Material to fix glitch.
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            const Text('Login (Without Scaffold)'),
            AutofillGroup(
              child: Column(
                children: <Widget>[
                  TextField(
                    controller: controller1,
                    autofillHints: const <String>[AutofillHints.username],
                  ),
                  TextField(
                    controller: controller2,
                    autofillHints: const <String>[AutofillHints.password],
                  ),
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}
```

</details>

### Before

https://github.com/flutter/engine/assets/48603081/dfe36616-e1dd-4c6c-95b0-e4bd89bd3a6a

### After

https://github.com/flutter/engine/assets/48603081/cfb15252-10cd-4521-a1ef-2cace0004588

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-02-05 21:53:03 +00:00
..