mirror of
https://github.com/foss42/apidash.git
synced 2025-06-29 20:37:12 +08:00
Added Slight Delay to formatJson call to prevent '<optimized out>' error
This commit is contained in:
@ -51,7 +51,10 @@ class _JsonTextFieldEditorState extends State<JsonTextFieldEditor> {
|
|||||||
if (widget.initialValue != null) {
|
if (widget.initialValue != null) {
|
||||||
controller.text = widget.initialValue!;
|
controller.text = widget.initialValue!;
|
||||||
}
|
}
|
||||||
|
Future.delayed(Duration(milliseconds: 50), () {
|
||||||
controller.formatJson(sortJson: false);
|
controller.formatJson(sortJson: false);
|
||||||
|
setState(() {});
|
||||||
|
});
|
||||||
editorFocusNode = FocusNode(debugLabel: "Editor Focus Node");
|
editorFocusNode = FocusNode(debugLabel: "Editor Focus Node");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user