text field patch

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-07-18 11:53:52 +08:00
parent 177493fe38
commit 01eca30575
4 changed files with 17 additions and 11 deletions

View File

@@ -37,6 +37,8 @@ $SelectableRegionSelectionPatch = "lib/scripts/selectable_region.patch"
$EditableTextPatch = "lib/scripts/editable_text.patch"
$TextFieldPatch = "lib/scripts/text_field.patch"
# TODO: remove
# https://github.com/flutter/flutter/pull/183261
$SelectableRegionPatch = "lib/scripts/null_safety_for_selectable_region.patch"
@@ -69,7 +71,7 @@ $reverts = @()
$patches = @($ModalBarrierPatch, $TextSelectionPatch, $MouseCursorPatch,
$ImageAnimPatch, $LayoutBuilderPatch, $NavigationDrawerPatch,
$PopupMenuPatch, $FABPatch, $SelectableRegionPatch, $SelectableRegionSelectionPatch,
$EditableTextPatch)
$EditableTextPatch, $TextFieldPatch)
switch ($platform.ToLower()) {
"android" {

View File

@@ -0,0 +1,13 @@
diff --git a/packages/flutter/lib/src/material/text_field.dart b/packages/flutter/lib/src/material/text_field.dart
index 0420aca37c2..d8eb0a639b4 100644
--- a/packages/flutter/lib/src/material/text_field.dart
+++ b/packages/flutter/lib/src/material/text_field.dart
@@ -301,7 +301,7 @@ class TextField extends StatefulWidget {
this.scrollPadding = const EdgeInsets.all(20.0),
this.dragStartBehavior = DragStartBehavior.start,
bool? enableInteractiveSelection,
- this.selectAllOnFocus,
+ this.selectAllOnFocus = false,
this.selectionControls,
this.onTap,
this.onTapAlwaysCalled = false,