An experimental release of code allowing for Flutter solutions to be hosted within an Xamarin Android / iOS solution.
This is a work in progress, more of a 'could it work' than neccessarily how it should work.
There is currently no built in tooling provided to allow for editing of dart/flutter solutions and for it be reflected in the Xamarin solution (ala Visual Code/Android Studio).
This has only been tested in a Nexus 6P device for Android, on iOS an iPhone 6S+ and the standard emulators. No other devices or emulators have been tried with this solution.
This not designed to allow for the delivery of release solutions.
Please follow the installation instructions very carefully. Just installing the nuget package is currently insufficient to get a working environment.
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
var flutterView = Flutter.Bindings.Flutter.CreateView(this, this.Lifecycle, "home");
var layout = new FrameLayout.LayoutParams(600, 800) {LeftMargin = 200, TopMargin = 400};
AddContentView(flutterView, layout);
}
flutter attach
or if you have more than one device connected , get the device id first then use that with attach
flutter devices
flutter attach -d device Id
Coming once I update by bindings from an older installation of Flutter to Flutter 0.9.4
More than likely this is down to the fact that the shared runtime and libraries haven't been removed from the device. The device log can confirm this.
This typically happens when the icudtl.dat hasn't been included in the application. I have been trying to get this installed automatically as part of the nuget package but for some reason the current version of Visual Studio doesn't want to install Android Assets from a nuget package. Once again the device log can confirm this.