Dart – Get result from a method invoked using reflection

I’m trying to use dart’s mirror API to dynamically invoke a function. How can I obtain the result that’s returned from the doWork method when invoking it via an InstanceMirror class MyData { String someString; } class MyService { Future<MyData> doWork() async { print(‘doing work’); return await Future(() => MyData()..someString = ‘my result’); } }… Read More Dart – Get result from a method invoked using reflection