disable RichTextField undo

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-09-30 16:59:05 +08:00
parent d833f3651c
commit 260742dc4b
3 changed files with 271 additions and 343 deletions

View File

@@ -273,7 +273,6 @@ class RichTextField extends StatefulWidget {
this.groupId = EditableText,
required this.controller,
this.focusNode,
this.undoController,
this.decoration = const InputDecoration(),
TextInputType? keyboardType,
this.textInputAction,
@@ -884,9 +883,6 @@ class RichTextField extends StatefulWidget {
/// be possible to move the focus to the text field with tab key.
final bool canRequestFocus;
/// {@macro flutter.widgets.undoHistory.controller}
final UndoHistoryController? undoController;
static Widget _defaultContextMenuBuilder(
BuildContext context,
EditableTextState editableTextState,
@@ -995,13 +991,6 @@ class RichTextField extends StatefulWidget {
defaultValue: null,
),
)
..add(
DiagnosticsProperty<UndoHistoryController>(
'undoController',
undoController,
defaultValue: null,
),
)
..add(DiagnosticsProperty<bool>('enabled', enabled, defaultValue: null))
..add(
DiagnosticsProperty<InputDecoration>(
@@ -1840,7 +1829,6 @@ class RichTextFieldState extends State<RichTextField>
showSelectionHandles: _showSelectionHandles,
controller: controller,
focusNode: focusNode,
undoController: widget.undoController,
keyboardType: widget.keyboardType,
textInputAction: widget.textInputAction,
textCapitalization: widget.textCapitalization,