fml2js static method
This is a stub for expansion, some kind of protocol should be decided on within the data field before proceeding further
Implementation
static void fml2js({String? version}) {
version = version ?? '?';
final data = <String, dynamic>{
'data': 'FML v$version',
'from': 'fml',
'to': 'js'
};
const jsonEncoder = JsonEncoder();
final json = jsonEncoder.convert(data);
context.callMethod('postMessage', [json, '*']);
}