Flop
fe0e219b9e
Adjust the drawing position of OutlineInputBorder (#159943)
Fixes #159942
Related Discussion: [#158440
(comment)](https://github.com/flutter/flutter/pull/158440#discussion_r1844902638)
## Temporary code
- Change the background color of the label container.
3f08b61784/packages/flutter/lib/src/material/input_decorator.dart (L2216-L2220)
```diff
+ child: Container(
+ color: Colors.red.withOpacity(0.2),
child: decoration.label ?? Text(
decoration.labelText!,
overflow: TextOverflow.ellipsis,
textAlign: textAlign,
),
+ ),
```
- Change border width.
3f08b61784/packages/flutter/lib/src/material/input_decorator.dart (L4838)
```diff
- return BorderSide(color: _colors.primary, width: 2.0);
+ return BorderSide(color: _colors.primary, width: 6.0);
```
## Example code
```dart
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Directionality(
textDirection: TextDirection.ltr,
child: RepaintBoundary(
child: InputDecorator(
isFocused: true,
isEmpty: true,
decoration: InputDecoration(
hintText: 'TextDirection.ltr with BorderSide(width: 2.0)',
labelText: 'ABCDEFGGFEDCBAABCDEFGGFEDCBAABCDEFGGFEDCBAABCDEFGGFEDCBA',
border: OutlineInputBorder(
gapPadding: 0.0,
),
),
),
),
),
Directionality(
textDirection: TextDirection.rtl,
child: RepaintBoundary(
child: InputDecorator(
isFocused: true,
isEmpty: true,
decoration: InputDecoration(
hintText: 'TextDirection.rtl with BorderSide(width: 2.0)',
labelText: 'ABCDEFGGFEDCBAABCDEFGGFEDCBAABCDEFGGFEDCBAABCDEFGGFEDCBA',
border: OutlineInputBorder(
gapPadding: 0.0,
),
),
),
),
),
],
),
),
),
),
);
}
```
| Before | After |
| ------ | ----- |
|  |  |
|  |  |
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is [test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel on [Discord].
<!-- Links -->
[Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2024-12-10 20:32:45 +00:00
..
2024-07-16 17:47:18 +00:00
2024-10-22 17:32:05 +00:00
2024-09-06 21:10:35 +00:00
2024-12-04 04:56:01 +00:00
2024-07-22 20:50:50 +00:00
2024-07-23 19:23:07 +00:00
2024-10-17 13:03:22 +00:00
2024-10-17 13:03:22 +00:00
2024-11-21 17:12:00 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-07-23 19:23:07 +00:00
2024-07-22 20:50:50 +00:00
2024-09-04 18:35:23 +00:00
2024-07-22 20:50:50 +00:00
2024-07-23 19:23:07 +00:00
2024-11-04 22:35:13 +00:00
2024-07-22 20:50:50 +00:00
2024-12-07 00:56:57 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-12-03 21:19:12 +00:00
2024-12-03 21:19:12 +00:00
2024-10-17 19:25:14 +00:00
2024-11-04 22:35:13 +00:00
2024-12-05 16:54:09 +00:00
2024-10-04 18:59:05 +00:00
2024-10-04 18:59:05 +00:00
2024-10-21 19:25:52 +00:00
2024-11-04 22:35:13 +00:00
2024-07-22 20:50:50 +00:00
2024-11-04 22:35:13 +00:00
2024-07-30 16:44:08 +00:00
2024-12-04 04:56:01 +00:00
2024-12-04 04:56:01 +00:00
2024-07-22 20:50:50 +00:00
2024-09-04 16:27:48 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-11-22 17:34:00 +00:00
2024-07-23 19:23:07 +00:00
2024-10-31 21:07:08 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-10-02 23:48:13 +00:00
2024-10-24 20:12:21 +00:00
2024-07-22 20:50:50 +00:00
2024-07-23 19:23:07 +00:00
2024-07-22 20:50:50 +00:00
2024-08-02 21:16:24 +00:00
2024-11-18 21:28:08 +00:00
2024-07-22 20:50:50 +00:00
2024-12-04 18:08:52 +00:00
2024-12-06 10:11:26 +00:00
2024-07-22 20:50:50 +00:00
2024-12-03 21:19:12 +00:00
2024-07-23 19:23:07 +00:00
2024-07-23 19:23:07 +00:00
2024-10-31 16:09:18 +00:00
2024-07-22 20:50:50 +00:00
2024-07-30 20:38:06 +00:00
2024-07-22 20:50:50 +00:00
2024-12-03 21:19:12 +00:00
2024-12-04 04:56:01 +00:00
2024-09-11 23:59:53 +00:00
2024-07-23 19:23:07 +00:00
2024-07-22 20:50:50 +00:00
2024-10-17 19:25:14 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-10-15 12:30:28 +00:00
2024-07-23 19:23:07 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-07-31 23:35:24 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-12-04 12:47:25 +00:00
2024-12-10 20:32:45 +00:00
2024-12-04 04:56:01 +00:00
2024-07-22 20:50:50 +00:00
2024-12-06 10:11:26 +00:00
2024-07-22 20:50:50 +00:00
2024-11-04 22:35:13 +00:00
2024-04-08 22:01:05 +00:00
2024-07-22 20:50:50 +00:00
2024-08-07 18:32:37 +00:00
2024-07-22 20:50:50 +00:00
2024-10-22 23:45:41 +00:00
2024-07-22 20:50:50 +00:00
2024-12-06 22:32:25 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-11-08 14:19:18 +00:00
2024-11-12 16:33:51 +00:00
2024-07-22 20:50:50 +00:00
2024-09-11 23:59:53 +00:00
2024-07-22 20:50:50 +00:00
2024-09-11 23:59:53 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-12-03 21:19:12 +00:00
2024-12-07 00:56:57 +00:00
2024-12-07 00:56:57 +00:00
2024-11-18 21:28:08 +00:00
2024-07-22 20:50:50 +00:00
2024-12-04 18:43:08 +00:00
2024-07-22 20:50:50 +00:00
2024-12-05 17:55:40 +00:00
2024-12-05 17:55:40 +00:00
2024-11-04 22:35:13 +00:00
2024-07-22 20:50:50 +00:00
2024-11-04 22:35:13 +00:00
2024-12-09 19:24:20 +00:00
2024-11-18 21:28:08 +00:00
2024-12-06 01:39:06 +00:00
2024-11-18 21:28:08 +00:00
2024-07-22 20:50:50 +00:00
2024-07-08 21:12:04 +00:00
2024-11-14 01:19:09 +00:00
2024-07-22 20:50:50 +00:00
2024-11-14 01:19:09 +00:00
2024-10-03 18:14:51 +00:00
2024-07-22 20:50:50 +00:00
2024-11-18 21:28:08 +00:00
2024-11-18 23:59:28 +00:00
2024-11-26 00:14:30 +00:00
2024-07-22 20:50:50 +00:00
2024-12-09 19:24:20 +00:00
2024-12-06 14:45:49 +00:00
2024-08-29 13:04:18 +00:00
2024-10-18 19:09:13 +00:00
2024-07-22 20:50:50 +00:00
2024-09-11 23:59:53 +00:00
2024-11-04 22:35:13 +00:00
2024-07-22 20:50:50 +00:00
2024-11-04 22:35:13 +00:00
2024-10-08 19:52:38 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-11-14 00:08:22 +00:00
2024-07-22 20:50:50 +00:00
2024-12-03 21:19:12 +00:00
2024-11-21 01:33:14 +00:00
2024-11-21 01:33:14 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-07-30 01:29:31 +00:00
2024-09-04 16:27:48 +00:00
2024-10-24 20:12:21 +00:00
2024-09-04 16:27:48 +00:00
2024-07-22 20:50:50 +00:00
2024-10-29 10:25:20 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-08-02 23:31:07 +00:00
2024-07-22 20:50:50 +00:00
2024-07-22 20:50:50 +00:00
2024-12-10 00:25:20 +00:00
2024-07-23 19:23:07 +00:00
2024-07-22 20:50:50 +00:00