@@ -342,40 +342,40 @@ class BasicTextInputClientState extends State<BasicTextInputClient>
342342 }
343343
344344 // These actions have yet to be implemented for this sample.
345- static final Map <Type , Action <Intent >>
346- _unsupportedActions = < Type , Action <Intent >> {
347- DeleteToNextWordBoundaryIntent : DoNothingAction (consumesKey: false ),
348- DeleteToLineBreakIntent : DoNothingAction (consumesKey: false ),
349- ExtendSelectionToNextWordBoundaryIntent : DoNothingAction (
350- consumesKey: false ,
351- ),
352- ExtendSelectionToNextParagraphBoundaryOrCaretLocationIntent :
353- DoNothingAction (consumesKey: false ),
354- ExtendSelectionToLineBreakIntent : DoNothingAction (consumesKey: false ),
355- ExtendSelectionVerticallyToAdjacentLineIntent : DoNothingAction (
356- consumesKey: false ,
357- ),
358- ExtendSelectionVerticallyToAdjacentPageIntent : DoNothingAction (
359- consumesKey: false ,
360- ),
361- ExtendSelectionToNextParagraphBoundaryIntent : DoNothingAction (
362- consumesKey: false ,
363- ),
364- ExtendSelectionToDocumentBoundaryIntent : DoNothingAction (
365- consumesKey: false ,
366- ),
367- ExtendSelectionByPageIntent : DoNothingAction (consumesKey: false ),
368- ExpandSelectionToDocumentBoundaryIntent : DoNothingAction (
369- consumesKey: false ,
370- ),
371- ExpandSelectionToLineBreakIntent : DoNothingAction (consumesKey: false ),
372- ScrollToDocumentBoundaryIntent : DoNothingAction (consumesKey: false ),
373- RedoTextIntent : DoNothingAction (consumesKey: false ),
374- ReplaceTextIntent : DoNothingAction (consumesKey: false ),
375- UndoTextIntent : DoNothingAction (consumesKey: false ),
376- UpdateSelectionIntent : DoNothingAction (consumesKey: false ),
377- TransposeCharactersIntent : DoNothingAction (consumesKey: false ),
378- };
345+ static final Map <Type , Action <Intent >> _unsupportedActions =
346+ < Type , Action <Intent >> {
347+ DeleteToNextWordBoundaryIntent : DoNothingAction (consumesKey: false ),
348+ DeleteToLineBreakIntent : DoNothingAction (consumesKey: false ),
349+ ExtendSelectionToNextWordBoundaryIntent : DoNothingAction (
350+ consumesKey: false ,
351+ ),
352+ ExtendSelectionToNextParagraphBoundaryOrCaretLocationIntent :
353+ DoNothingAction (consumesKey: false ),
354+ ExtendSelectionToLineBreakIntent : DoNothingAction (consumesKey: false ),
355+ ExtendSelectionVerticallyToAdjacentLineIntent : DoNothingAction (
356+ consumesKey: false ,
357+ ),
358+ ExtendSelectionVerticallyToAdjacentPageIntent : DoNothingAction (
359+ consumesKey: false ,
360+ ),
361+ ExtendSelectionToNextParagraphBoundaryIntent : DoNothingAction (
362+ consumesKey: false ,
363+ ),
364+ ExtendSelectionToDocumentBoundaryIntent : DoNothingAction (
365+ consumesKey: false ,
366+ ),
367+ ExtendSelectionByPageIntent : DoNothingAction (consumesKey: false ),
368+ ExpandSelectionToDocumentBoundaryIntent : DoNothingAction (
369+ consumesKey: false ,
370+ ),
371+ ExpandSelectionToLineBreakIntent : DoNothingAction (consumesKey: false ),
372+ ScrollToDocumentBoundaryIntent : DoNothingAction (consumesKey: false ),
373+ RedoTextIntent : DoNothingAction (consumesKey: false ),
374+ ReplaceTextIntent : DoNothingAction (consumesKey: false ),
375+ UndoTextIntent : DoNothingAction (consumesKey: false ),
376+ UpdateSelectionIntent : DoNothingAction (consumesKey: false ),
377+ TransposeCharactersIntent : DoNothingAction (consumesKey: false ),
378+ };
379379
380380 /// Keyboard text editing actions.
381381 // The Handling of the default text editing shortcuts with deltas
@@ -582,9 +582,7 @@ class BasicTextInputClientState extends State<BasicTextInputClient>
582582
583583 void _updateCaretRectIfNeeded () {
584584 final TextSelection ? selection = renderEditable.selection;
585- if (selection == null ||
586- ! selection.isValid ||
587- ! selection.isCollapsed) {
585+ if (selection == null || ! selection.isValid || ! selection.isCollapsed) {
588586 return ;
589587 }
590588 final TextPosition currentTextPosition = TextPosition (
@@ -982,9 +980,7 @@ class BasicTextInputClientState extends State<BasicTextInputClient>
982980 final InlineSpan span = renderEditable.text! ;
983981 final String prevText = span.toPlainText ();
984982 final String currText = textEditingValue.text;
985- if (prevText != currText ||
986- ! selection.isValid ||
987- selection.isCollapsed) {
983+ if (prevText != currText || ! selection.isValid || selection.isCollapsed) {
988984 return _GlyphHeights (
989985 start: renderEditable.preferredLineHeight,
990986 end: renderEditable.preferredLineHeight,
@@ -994,13 +990,12 @@ class BasicTextInputClientState extends State<BasicTextInputClient>
994990 final String selectedGraphemes = selection.textInside (currText);
995991 final int firstSelectedGraphemeExtent =
996992 selectedGraphemes.characters.first.length;
997- final Rect ? startCharacterRect = renderEditable
998- .getRectForComposingRange (
999- TextRange (
1000- start: selection.start,
1001- end: selection.start + firstSelectedGraphemeExtent,
1002- ),
1003- );
993+ final Rect ? startCharacterRect = renderEditable.getRectForComposingRange (
994+ TextRange (
995+ start: selection.start,
996+ end: selection.start + firstSelectedGraphemeExtent,
997+ ),
998+ );
1004999 final int lastSelectedGraphemeExtent =
10051000 selectedGraphemes.characters.last.length;
10061001 final Rect ? endCharacterRect = renderEditable.getRectForComposingRange (
@@ -1010,8 +1005,7 @@ class BasicTextInputClientState extends State<BasicTextInputClient>
10101005 ),
10111006 );
10121007 return _GlyphHeights (
1013- start:
1014- startCharacterRect? .height ?? renderEditable.preferredLineHeight,
1008+ start: startCharacterRect? .height ?? renderEditable.preferredLineHeight,
10151009 end: endCharacterRect? .height ?? renderEditable.preferredLineHeight,
10161010 );
10171011 }
@@ -1095,9 +1089,7 @@ class BasicTextInputClientState extends State<BasicTextInputClient>
10951089 }
10961090
10971091 return ! textEditingValue.selection.isCollapsed &&
1098- textEditingValue.selection
1099- .textInside (textEditingValue.text)
1100- .trim () !=
1092+ textEditingValue.selection.textInside (textEditingValue.text).trim () !=
11011093 '' ;
11021094 }
11031095
@@ -1160,8 +1152,7 @@ class BasicTextInputClientState extends State<BasicTextInputClient>
11601152 startHandleLayerLink: _startHandleLayerLink,
11611153 endHandleLayerLink: _endHandleLayerLink,
11621154 inlineSpan: _buildTextSpan (),
1163- value:
1164- _value, // We pass value.selection to RenderEditable.
1155+ value: _value, // We pass value.selection to RenderEditable.
11651156 cursorColor: Colors .blue,
11661157 backgroundCursorColor: Colors .grey[100 ],
11671158 showCursor: ValueNotifier <bool >(_hasFocus),
0 commit comments