There is a better way IMHO
You can run the JS inside a JS VM that is 100% compiled to c using
https://github.com/dop251/goja
You can cross compile this to run on any Mobiles, Desktop or small ARM device.
Then just call it the same way you call miniProgram now by using Flutter Method channels.
It looks like miniprogram uses liquid core: https://github.com/j0j00/flutter_liquidcore
There is a better way IMHO You can run the JS inside a JS VM that is 100% compiled to c using https://github.com/dop251/goja You can cross compile this to run on any Mobiles, Desktop or small ARM device. Then just call it the same way you call miniProgram now by using Flutter Method channels.