Is it possible to convert a javascript object or array back to native dart Map and/or List? I'm trying to get a manifest file returned from javascript as Object and want to convert it to a Dart Map object.
You can convert a javascript JSON to a Dart JSON with :
import 'dart:json';
import 'package:js/js.dart' as js;
convert(js.Proxy jsonProxy) => JSON.parse(js.context.JSON.stringify(jsonProxy));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With