Today I am a happy man :).
This is what I coded on Corona :
local MiCorazon = require "mi.corazon" function MyButtonPressed() print ("My button is pressed") end MiCorazon.showFlutterRoute ( { class = 'Scaffold', body = { class = 'Center', child = { class = 'RaisedButton', onPressed = 'MyButtonPressed', child = { class = 'Text', caption = 'The button' } } } } )
And I got this on my device :
https://github.com/Canardoux/mi_corazon/blob/master/Screenshot%202019-06-06%20at%2013.41.31.png
And, of course, the Lua function ‘MyButtonPressed()’ was correctly triggered when I clicked the button.
‘Mi Corazon’ is a project that I have, for giving access to Flutter from Corona/Lua.
Actually this is just a proove of concept. Not even an Alpha release. But my first tries are very encouraging : Now, I am ready to start a real project from scratch.
The goals are :
- Access from Lua to the Flutter librairy. Not only the UI, but also other packages (like Sqflite for example for accessing a Database Management System).
- Build Flutter screens in Lua, without any Dart code.
- Invoke a Flutter screen from Lua, and return to Corona when the user finished with his Flutter screen
When those goals will be reached (in many, many months from now) it will be time to create something who is crually missing : a graphic UI editor like the one we have in Delphi and Lazarus.
OK, I agree. I am just talking about vaporware. But I cannot resist to send this post because I am excited by what I see as reachable with some work.
This project will certainly need other contributions. But not now. Actually the project foundation is not hard enough.