Bruno Leroux a2ec056b82
Fix TextField intrinsic width when hint is not visible (#161235)
## Description

This PR changes the TextField intrinsic width computation for non-empty
TextField.

Before:

When a TextField is non-empty, the intrinsic width can't be smaller than
the hint width:


![image](https://github.com/user-attachments/assets/88c42a31-d83e-4eb8-8286-dce5b07ef089)


After:

The width does not depend on the hint when the TextField is non empty.


![image](https://github.com/user-attachments/assets/5b7380f8-4bc8-4d37-974e-0c8f5b08b185)


<details><summary>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(
      title: 'Material App',
      home: Scaffold(
        body: Center(
          child: IntrinsicWidth(
            child: TextField(
              decoration: InputDecoration(
                filled: true,
                hintText: 'Moderately long hint text',
              ),
            ),
          ),
        ),
      ),
    );
  }
}

``` 

</details> 

## Related Issue

Fixes [[TextField] The computation of the intrinsic width of a TextField
should include the hint width only when
visible](https://github.com/flutter/flutter/issues/93337)

## Tests

Adds 2 tests.
2025-01-24 09:34:25 +00:00
..
2025-01-22 21:52:11 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00
2025-01-22 21:52:11 +00:00
2025-01-14 05:13:41 +00:00
2024-12-19 20:06:21 +00:00
2024-12-19 20:06:21 +00:00