We all knows that flutter will support different types platforms like Android and iOS mobile applications, Flutter web, TV now it become to support Desktop platform also. This will support on Mac, Windows and Linux also
Requirement for Flutter Desktop application for different Operating systems
Windows
: Visual Studio 2019 (not to be confused with Visual Studio Code). For Win32 you need the Desktop development with C++” workload installed, including all of its default components. For UWP you need the “Universal Windows Platform development” workload installed, with the optional UWP C++ toolsMacOS
: Xcode and CocaoPods installedLinux
: Clang, Cmake, GTK development headers, Ninja build, and pkg-config.
How to Enable Flutter for desktop application
To enable flutter for desktop application we need to run the below command
|
Here the platform will be window, or macos or linux
Below are the commands based on the OS
|
To run desktop we need to find the connected devices, for this if we run the below code it will list all the connected devices list
|
2 connected devices: Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 6.3.9600] |
Let's create flutter desktop application
|
How to run the flutter application on desktop
To run the flutter application on desktop we need to run the below commands
flutter run |
when we execute above command it will give you like below
Multiple devices found: |
Or we can directly run like below
|
And that's it we are now ready with flutter desktop application and we can run on the desktop. If you have any doubts about desktop app configuration visit official website
In the next tutorial we will create Flutter Navigation drawer for desktop application
Article Contributed By :
|
|
|
|
532 Views |