sms_autofill icon indicating copy to clipboard operation
sms_autofill copied to clipboard

Error when use autoFocus in PinFieldAutoFill widget

Open tigading opened this issue 7 months ago • 4 comments

Please help me fix this issue

The following StateError was thrown while dispatching notifications for FocusNode:
Bad state: No element

When the exception was thrown, this was the stack: 
#0      List.single (dart:core-patch/growable_array.dart:353:22)
#1      TextPainter.getFullHeightForCaret (package:flutter/src/painting/text_painter.dart:1356:122)
#2      RenderEditable.getLocalRectForCaret (package:flutter/src/rendering/editable.dart:1801:48)
#3      EditableTextState._updateComposingRectIfNeeded (package:flutter/src/widgets/editable_text.dart:4487:38)
#4      EditableTextState._schedulePeriodicPostFrameCallbacks (package:flutter/src/widgets/editable_text.dart:4393:5)
#5      EditableTextState._openInputConnection (package:flutter/src/widgets/editable_text.dart:3594:7)
#6      EditableTextState._openOrCloseInputConnectionIfNeeded (package:flutter/src/widgets/editable_text.dart:3628:7)
#7      EditableTextState._handleFocusChanged (package:flutter/src/widgets/editable_text.dart:4329:5)
#8      ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:433:24)
#9      FocusNode._notify (package:flutter/src/widgets/focus_manager.dart:1090:5)
#10     FocusManager.applyFocusChangesIfNeeded (package:flutter/src/widgets/focus_manager.dart:1850:12)
(elided 2 frames from dart:async)
The FocusNode sending notification was: FocusNode#511d0([PRIMARY FOCUS])
  context: Focus
  PRIMARY FOCUS

tigading avatar Jul 17 '24 09:07 tigading