Desktop embedder written in dart.
Dart is an awesome language. But that's not the only reason! Because people writing Flutter apps are already familiar with Dart, they will have an easy time writing plugins for desktop.
Compared to Android and iOS where you have to first learn Java/Kotlin/ObjectiveC/Swift writing plugins for desktop is as simple as interfacing C code with Dart and doing the logic there.
The interfacing will get event easier with Dart supporting FFI (dart-lang/sdk#34452).
Another reason is: Dart runs cross platform and can bit JIT compiled. This means we get out of the box cross platform support without having to explicitly write for each platform. Because Dart can be JIT compiled working one the native side is as easy as restarting the app (it may even be possible to support hot-reloads of native code in the future).
All of this also leads to a richer Dart ecosystem which we all strive for. More people using Dart means more people open sourcing code which enhances the whole ecosystem.
We aimed for the easies installation process we could think of.
TODO make this.
So we decided to stay close to how Flutter itself is installed.
git clone x...x...x
From https://visualstudio.microsoft.com/de/downloads/ download the C++ runtime for your system.
64 bit version is [here] (https://aka.ms/vs/15/release/VC_redist.x64.exe)
32 bit version is [here] (https://aka.ms/vs/15/release/VC_redist.x86.exe)
This will create a few environment variables in your system
flutter-desktop setup
import 'package:flutter/foundation.dart'
show debugDefaultTargetPlatformOverride;
void main() {
debugDefaultTargetPlatformOverride = TargetPlatform.fuchsia;
runApp(new MyApp());
}
Go to the root of your project and type:
flutter-desktop run
Hot reloading will work out of the box.
If you want to have the same IDE experience as working with the emulator. Then you will have to use our Flutter branch until the tooling is merged into Flutter.
To do this do the following...