webf
webf copied to clipboard
After the jump of tag a, the channels of dart and js are no longer useful
Affected version
0.16.2
Flutter versions
3.22.3
No same issues found.
- [X] Yes, I search all issues but not found.
Steps to Reproduce
After clicking the Submit button on the homepage, the loading animation can be displayed normally, but after the page jumps, an error message appears when clicking the Submit button.
Code example
-
There is a function 'submitMap' in plugin submitMap(jsonString) { return webf.methodChannel.invokeMethod('submitMap', jsonString); }
-
in dart case 'submitMap': showLoading(); // Simulate processing, hide the loading after 2 seconds await Future.delayed(Duration(seconds: 2)); hiddenLoading(); onSubmit(args[0]); return null;
-
In html and js, I have
const submit = document.getElementById('submit'); submit.addEventListener('click', async(e) => { ...... await window.form.submitMap(jsonString); });
Expected results
loading animation