Closed ahirschberg closed 7 years ago
And as of today in flutter, the import fails because of missing dart:mirror
:
00:00 +0: loading /home/francis/gitsrc/evnavapp/test/jsonx_test.dart
Shell: [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] 'package:jsonx/jsonx.dart': error: line 7 pos 1: import of dart:mirrors with --enable-mirrors=false
This package is currently not working in Flutter and browsers other Dartium. Flutter doesn't support mirrors and dart2js doesn't support reflections on enums and generics.
I plan to rewrite this package using package reflectable but still need to think about how to support generics.
Add an example to the README of importing jsonx with the
@MirrorsUsed
annotation for dart2js users. This library is useful without mirrors, but it can be confusing how to import it without incurring the size penalty of an uncheckeddart:mirrors
import when transpiling to JS.