======== Exception caught by gesture ===============================================================
The following RangeError was thrown while handling a gesture:
RangeError (index): Invalid value: Only valid value is 0: -1
When the exception was thrown, this was the stack:
#0 _StringBase.[] (dart:core-patch/string_patch.dart:258:41)
#1 CodeController.value= (package:code_text_field/src/code_field/code_controller.dart:165:33)
#2 TextEditingController.text= (package:flutter/src/widgets/editable_text.dart:159:5)
#3 EditPage.build.<anonymous closure> (package:summer/view/edit/edit_view.dart:38:26)
#4 _InkResponseState.handleTap (package:flutter/src/material/ink_well.dart:1077:21)
#5 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:253:24)
#6 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:627:11)
#7 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:306:5)
The above errors are reported only in CodeController and CodeField, but they are normal in TextEditingController and TextField.
The above errors can easily be repeated, and the complete code will not be pasted.
I am implementing undo/redo function. When I assign codeController An exception occurred while texting.
error message:
The above errors are reported only in CodeController and CodeField, but they are normal in TextEditingController and TextField. The above errors can easily be repeated, and the complete code will not be pasted.