Add Xamarin <-> Flutter platform channel
aloisdeniel opened this issue · 4 comments
Thanks for the project, great initiative!
I already thought of a similar use case and a great addition would be to add platform channel integration to allow users to send messages from the Flutter world to the .NET world. A simple byte stream between them would be sufficient in most cases and allowing us to reuse our .NET code from the Flutter app!
Hi
I have a piece of work which I'm just tidying up which allows for method requests to be made from Flutter and for observables on the .net side to be observed .
There is a T4 template which given an interface decorated with [FlutterExport] it generates all of the necessary Dart code to interface with the .NET code along with referenced POCO classes being created as PODO classes.
I've done some re-working to allow for different ways of the 'services' on the .NET side to be resolved and am currently getting it working again.
I'll post in here when its available on github.
a Flutter widget subscribing to a .net viewmodel propertychanged event, and receiving the dart PODO... how awesome would that be ? omg can't wait
I’ve now made available a new library which automates the generation of Dart code from existing C# libraries. This makes the interfacing between Flutter and the host environment a lot simpler to implement (for Xamarin solutions requires a single attribute on an interface). The code can be found at https://github.com/VistianOpenSource/Vistian.Flutter.Remoting . Its a WIP and doesn't do everything, but hopefully will allow others to easily build upon it.
FYI there is now beta support for Flutter 1.0 (Android). Just choose the pre-release option when adding the nuget package.