Test flutter2 bundle integration into web demo platform
Description
Environment
Attachments
Activity

Lorenzo June 30, 2021 at 1:16 PM
We were also working testing more with dart and how to create js wrapper libs to consume agl served services, so we created this as a test:
https://github.com/rogerzanoni/agljs.dart
Then I another flutter sample, and added it as a local dependency, it worked (using the showWindow api) Following this path it should be possible to create a wrapper for all the API calls we need, which could be replaceable to different implementations of the app framework.
Also, we were packaging a couple of flutter demo examples as wgt bundles

Roger Zanoni June 22, 2021 at 1:23 PM
I did a few tests, and as you mentioned the web runtime provides a way for running apps from any framework, we mostly need to include a config.xml file in the zipped widget file.
I've found a few issues(not blocking issues):
For interoping with the agl js api, we have to use a library like https://pub.dev/documentation/js/latest/ and either create function calls for the needed functions or create a wrapper library for the js api. I tested it by adding the AGLJS.js in the build directory and including it on the index.html file. Then I was able to initialize the api and use some api functions, like showWindow().
The current apps use mustache templates that are parsed at runtime. There are mustache template packages, but it prevented me from loading template files and runtime as a security measure. A better alternative would be to create a base dart lib for creating the webapps, along with a wrapper for the agljs api.
Details
Details
Assignee

Reporter

In parallel with any work to provide native flutter support into AGL, the current web runtime already provides a way to run webapps coming from any framework. With the announcement of flutter2 it seems that the support to run webapps on desktop via bundling is something that could be tested inside AGL, to verify it's behaviour, make easier to test on the existing platform, and anticipate any possible challenges.