function log(count) {
const formattedCount = new Intl.NumberFormat(navigator.languages).format(count);
return formattedCount;
}
My page.dart:
var myMethod = "log(26254.39);";
var flutterJs = getJavascriptRuntime();
var path = await rootBundle.loadString("lib/core/ressources/test.js");
JsEvalResult jsEvalResult = flutterJs.evaluate("$path$myMethod");
var result = jsEvalResult.stringResult;
And this is my error:
I/flutter (16439): ReferenceError: 'Intl' is not defined
I/flutter (16439): at log (:3)
I/flutter (16439): at (:5)
Hello, i'm playing with Flutter_js and I have a little problem right now:
This is my test.js (from Mozilla Doc) :
My page.dart:
And this is my error:
I/flutter (16439): ReferenceError: 'Intl' is not defined I/flutter (16439): at log (:3)
I/flutter (16439): at (:5)
How to import INTL for my javascript process?
Thanks