Program from one source to many apps with Flutter

Big Flap

Cross-Platform

If you want to compile the app you created for the desktop, entering three commands at the command line in the project's root directory is all it takes:

$ flutter config --enable-linux-desktop
### Important: Do not forget the
### dot at the end of this command
$ flutter create --platforms=linux .
$ flutter build linux

As a result, you get an executable binary in the build/linux/x64/release/bundle/ folder. For Windows or macOS as the target platform, just replace the linux tag with windows or macos. Compiling for Windows and macOS only works on the respective operating systems. For more information regarding desktop support, see the Flutter website [9].

Conclusions

This article only provides a rough overview of Flutter, but once you understand the strategy of how apps are built, you can program apps for a wide variety of platforms relatively easily and conveniently. The Flutter repository [2] also proves to be a veritable treasure trove of packages that make everyday programming far easier. The weather app, for example, could be extended with the geolocator [10] package to determine the current location and display the local weather without having to specify the location explicitly.

The Author

Markus Hoffmann is a software developer from Germany. He got his education as an application developer at SRH in Heidelberg. Additionaly he is a certified JavaScript developer. If he is not sitting at a computer you can find him on the main stand of the stadium in Worms seeing his favorite soccer team Wormatia Worms. You can reach him under markus@wormatiablog.de.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Program GUIs in Go with Fyne
    In Go, which was originally developed for system programming, graphical user interfaces were not typically necessary. But a relatively new toolkit, Fyne, lets programmers build platform-independent GUIs for Go programs.
  • Haskell framework for the web
    The Yesod web framework includes a Haskell compiler on top of the standard web technologies, such as HTML, JavaScript, and CSS, with aggressive optimization and function checks for correctness.
  • Video: Modeling Climate
  • Modularize websites with Web Components
    Web Components let you define your own HTML tags to restructure monolithic web pages into smaller services and simplify maintenance and servicing.
  • GUI or Text-Based Interface?

    Sys admins are like smokejumpers who parachute into fires, fighting them until they are out, or at least under control. When you jump into the fire, you only have the tools you brought with you.

comments powered by Disqus