mirror of
https://github.com/foss42/apidash.git
synced 2025-05-21 16:26:37 +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) {
|
||||
controller.text = widget.initialValue!;
|
||||
}
|
||||
controller.formatJson(sortJson: false);
|
||||
Future.delayed(Duration(milliseconds: 50), () {
|
||||
controller.formatJson(sortJson: false);
|
||||
setState(() {});
|
||||
});
|
||||
editorFocusNode = FocusNode(debugLabel: "Editor Focus Node");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user