Vistian.Flutter.Bindings icon indicating copy to clipboard operation
Vistian.Flutter.Bindings copied to clipboard

Add Xamarin <-> Flutter platform channel

Open aloisdeniel opened this issue 6 years ago • 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!

aloisdeniel avatar Oct 29 '18 12:10 aloisdeniel

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.

VistianOpenSource avatar Nov 09 '18 16:11 VistianOpenSource

a Flutter widget subscribing to a .net viewmodel propertychanged event, and receiving the dart PODO... how awesome would that be ? omg can't wait

benoitjadinon avatar Nov 16 '18 10:11 benoitjadinon

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.

VistianOpenSource avatar Nov 19 '18 16:11 VistianOpenSource

FYI there is now beta support for Flutter 1.0 (Android). Just choose the pre-release option when adding the nuget package.

VistianOpenSource avatar Dec 14 '18 15:12 VistianOpenSource