Dependency Injection: Any chance to get the dart:mirrors library in Flutter?

1,190 views
Skip to first unread message

jul...@mintware.de

unread,
Apr 27, 2019, 3:22:00 AM4/27/19
to Flutter Dev
Hi,

I’ve wrote a dependency injection container for dart (https://pub.dartlang.org/packages/catalyst) several time ago.
The problem is that this package uses the dart:mirrors library which isn’t available in Flutter yet.

Is there is any chance to get the mirrors library in Flutter?

Best,
Julian

eib...@gmail.com

unread,
Apr 27, 2019, 5:15:33 AM4/27/19
to Flutter Dev
I'd guess that mirrors defy the idea of tree shaking (stripping unused code from the compiled app) and therefore are incompatible with Flutter's AOT (ahead of time) compiling to native machine code. 

Have you looked into https://pub.dartlang.org/packages/reflectable as an alternative?

Stefan

Marshall Chabanga

unread,
Apr 27, 2019, 1:47:57 PM4/27/19
to eib...@gmail.com, Flutter Dev
You can try this one  https://pub.dartlang.org/packages/kiwi for dependency injection

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
biskynauff.mursuid
Reply all
Reply to author
Forward
0 new messages