As we all know Flutter extended its supports for linux recently with canonical. With this, we can build and deploy applications for linux with Flutter more easily now.
flutter channel master
flutter upgrade
flutter config --enable-linux-desktop
In this example we will create a plugin which will give us the battery percentage level and its technology.
flutter create -t plugin --platforms=linux battery
In your plugin folder, you get the lib
folder which contains the battery.dart
file which will handle your method channels, an example
folder which contains a sample application to demonstrate the use of your plugin and a linux
folder which contains battery_plugin.cc
file which will handle your platform level methods. Platform level code is written in C++ for Linux.
#flutter #app-development #linux #open-source #github