You are currently viewing the United Kingdom version of the site.
Would you like to switch to your local site?
13 MIN READ TIME

FLUTTER

Creating Flutter apps

David Bolton shows how to set up a Flutter development environment on Linux and then how to build a simple calculator in Flutter.

Credit: https://flutterawesome.com/calculator-create-with-flutter/

OUR EXPERT

David Bolton has been programming Flutter apps for a couple of years but this is the first time he’s done Flutter development on Linux.

QUCK TIP

The Flutter plugin includes tools for inserting widgets into existing widgets. This is far quicker than typing and trying to balance brackets. Rightclick on a widget and click Show Context Actions.

If you’ve heard of Flutter, you probably know it as a cross-platform toolkit for writing mobile I apps – and you’d be correct. But that crossplatform ability was extended last year to include developing for Linux desktop alongside use for singlepage web apps.

If Flutter is a toolkit, what language do you use to program it? It’s called Dart. It’s a modern programming language and you can also write programs purely in Dart. If you’re looking for a programming language that’s more advanced than C and includes objects and decent string handling, but is nowhere as complex as C++, Dart falls in the middle. This isn’t a tutorial on Dart but the code should be easy enough to understand. If you want to find out more, visit the official website at https://dart.dev. You’ll find an online editor that you can experiment with and run Dart programs.

It’s a way of building up the user interface of an application through the use of widgets. A widget is a component containing the logic, interaction and design of a UI element. It’s implemented as a class in Dart and you can find out more at https://flutter.dev.

Flutter apps are different from other types of applications. A Flutter app has all its widgets redrawn many times per second; as much as 60 frames per second or faster on fast hardware. This makes it suitable for games programming. Even the single-page web apps are rebuilt many times per second.

Platform support

Originally created for Android and iOS, it now includes web, Windows, Mac and Linux. For Linux, you need to be on Ubuntu 18.04 LTS or higher, or Debian 10, 11 and possibly 12. However, it is for 64-bit development only.

Let’s look at getting set up for Flutter development on Ubuntu. You can use Android Studio, VS Code or a few others. After installing an editor, you must install a Flutter plugin. That should also install a Dart plugin. To install VS Code on Ubuntu using Snap, type the following at the command line:

Unlock this article and much more with
You can enjoy:
Enjoy this edition in full
Instant access to 600+ titles
Thousands of back issues
No contract or commitment
Try for 99p
SUBSCRIBE NOW
30 day trial, then just £9.99 / month. Cancel anytime. New subscribers only.


Learn more
Pocketmags Plus
Pocketmags Plus

This article is from...


View Issues
Linux Format
September 2023
VIEW IN STORE

Other Articles in this Issue


MEET THE TEAM
MEET THE TEAM
This issue, we’re getting AIs to badly develop ap plications for us. Hurrah! So, what are you going to do with all the spare time your personal AI is going to free up?
Not so smart
A rtificial intelligence is like any other tool
REGULARS AT A GLANCE
Newsdesk
THIS ISSUE: EU threat to open source Plasma features face chop Gnome opens window plans Debian embraces RISC-V
JUST BUGGIN’
Jon Masters is a kernel hacker who’s been
Kernel Watch
Jon Masters keeps up with all the latest happenings in the Linux kernel, so you don’t have to.
ONGOING DEVELOPMENT…
John Ogness posted Wire Up Nbcon Consoles, which
Answers
Got a burning question about open source or the kernel? Whatever your level, email it to answers@linuxformat.com
Mailserver
WRITE TO US Do you have a
Hot Picks
Immich
ATTACK OF THE A.I. Pi BOTS
Fun artificial intelligence projects you can build and run at home on the cheapest of hobbyist hardware!
REVIEWS
BarraCuda 8TB HDD
Cheap and cheerful – that’s not how Shane Downing parties.
GeForce RTX 4060
A good graphics card with the wrong name, ponders Chris Szewczyk.
Murena Fairphone 4
Fairest of them all, Jonni Bidwell is excited by an ethical phone with a privacy-respecting operating system.
Peppermint OS
After years of sampling Linux Mint, Nate Drake opts for something spicier in the hybrid Peppermint OS, which integrates cloud-based apps.
Fatdog64 Linux 814
Nate Drake decides to look in on Fatdog, a Puppy-based OS that’s grown into a very credible canine in its own right.
ROUNDUP
Media-creation distros
Michael Reed examines five distributions, aimed at creative types, that come packed with applications, utilities and plugins.
Customisations & extra features
How much does each distro add?
Base distro and package repros
We need a strong foundation with access to the latest software.
Using the user interface
Creative flow is paramount.
System efficiency
It’s a shame if the distro starts gobbling up resources before you’ve even started.
Audio, music and plugins
Showcasing what Linux can do in this realm and saving installation effort.
Video and graphics apps
Ready-to-go drawing and painting applications are always welcome.
Documentation and support
Information on how to get things running and overcome difficulties.
The verdict
Media-creation distributions
A.I. CODING
Matt Holder spends some time discovering how AI, ML and LLM can be used to help us with our programming – and, yes, he explains what the acronyms mean as well…
Pi USER
Pi Foundation open sources its Code Editor
Accelerating feature development and generally doing the right thing all round, hurrah!
RP2040 ETH Mini Dev
Les Pounder loves all his Pi collection, but sometimes there’s some he simply can’t love as much…
Sonic Mini 8K S
Always on the lookout for upgrades, Denise Bertacchi doubly likes it when there’s a bargain, too.
Build a flashy dice roller with NeoPixels
Les Pounder is learning to multitask but we think he misunderstood the instructions.
Smart management for smart kiosks
Tam Hanna takes a look at how Ubuntu Frame harnesses Wayland’s strengths to make smart display management more comfortable.
TUTORIALS
Best kept secrets
A man who keeps his cards close to his chest, we struggled to persuade Shashank Sharma to reveal how he protects his passwords.
Upgrade your Steam Deck SSD
Neil Mohr asked hardcore PC gamers Tony Polanco and Katie Wickens to upgrade a Linux device – what could possibly go wrong?
Access services with Nginx reverse proxy
Nick Peers discovers how to open your network services to the internet with this user-friendly implementation of Nginx.
Add Raspberry Pi GPIO to your PC
PCs don’t offer a GPIO header like the Raspberry Pi, but Mike Bedford reveals that a low-cost add-on is all you need to join in the fun.
Render real-world 3D maps in Blender
Credit: www.blender.org
ADMINISTERIA
A ROCKY ROAD AHEAD?
Stuart Burns is a Linux administrator for a
Docker is dead, long live Docker
Docker has been the king of containers but could Podman put an end to Docker’s reign?
LXD gobbled up by Canonical
LXD ownership is transferred to Canonical in the hope of making great strides.
Who installed that?
Yum is more than just a way to install applications – it can do all sorts of interesting stuff.
HostPapa
Ruby P Jane tries this paternal web host provider that offers a range of services for both personal and business use.
Cloudways
A competent host offering scalable cloud-based solutions that has Ruby P Jane loving what she sees.
IN DEPTH
AWS vs Azure
What’s the difference? Not all cloud providers are the same. Steve Cassidy compares the two biggest platforms
CODING ACADEMY
Text adventure combat mechanics
Often found making love and not war, this month Nate Drake takes our interactive text adventure down a dark, violent path.
Code your own Breakout retro game
Matt Holder discovers that writing a ’70s-style classic game isn’t as simple as he first thought.
Chat
X
Pocketmags Support