Flutter - Development Setup
Initial dive into Flutter for Desktop Linux development.
Starting from scratch, with the below guide, and although I have read about Flutter previously I've not build anything until now. I do have some experience with Android development, but I will actively try to avoid using that experience, probably forgot it anyway.
Going through the install guide found here
Flutter install
Hardware requirements
Support for Linux is there and automatically detected by the site. Nice landing page too, but frankly I just skipped to installation - don't need to read the marketing, since I already want to use it.
Hardware requirements are high. On Linux especially, we need to expect lesser performance since we expect folks to use older software.
As an ethos too, Linux enables more usage out of older software so the requirements will end us (the developers) push for hardware updates. To me, hardware updates are fine for commercial software, but for personal software it's just enough friction for someone to stop using your app.
| Requirement | Minimum | Recommended | | ------------- | --------- | --------------- | | CPU cores | 4 | 8 | | Memory | 8 | 16 | | Display res | 1366x768 | 1920x1080 | | HDD | 4GB | 52GB |
If you were a retro enthusiast and were working on a Core 2 Duo device you're out of luck. And to add to that, 16GB RAM recommended.
Software requirements
All in all 12 environment level dependencies for developing Linux apps.
As always I created a Flutter Ansible playbook to make it easier to quickly setup a new machine.
- name: Flutter Development Setup
hosts: my_local
vars:
# Useful in case you want to uninstall the whole playbook later
# NB: doublecheck that you don't uninstall curl, git - stuff you need
state: present # or 'absent'
tasks:
- name: curl - install
apt:
name: curl
state: '{{state}}'
- name: git - install
apt:
name: git
state: '{{state}}'
- name: unzip - install
apt:
name: unzip
state: '{{state}}'
- name: xz-utils - install
apt:
name: xz-utils
state: '{{state}}'
- name: zip - install
apt:
name: zip
state: '{{state}}'
- name: libglu1-mesa - install
apt:
name: libglu1-mesa
state: '{{state}}'
- name: clang - install
become: true
apt:
name: clang
state: '{{state}}'
- name: cmake - install
become: true
apt:
name: cmake
state: '{{state}}'
- name: ninja-build - install
become: true
apt:
name: ninja-build
state: '{{state}}'
- name: pkg-config - install
apt:
name: pkg-config
state: '{{state}}'
- name: libglu1-mesa - install
apt:
name: libglu1-mesa
state: '{{state}}'
- name: libgtk-3-dev - install
become: true
apt:
name: libgtk-3-dev
state: '{{state}}'
- name: liblzma-dev - install
become: true
apt:
name: liblzma-dev
state: '{{state}}'
- name: libstdc++-12-dev - install
become: true
apt:
name: libstdc++-12-dev
state: '{{state}}'
Configure a text editor or IDE
In VS Code install Flutter extension. Recomemnded that you install VS Code version > 1.86.
The correct extension is published by Dart Code.
Install the Flutter SDK
There's a manual tar download option, but in this case I will use VS Code command pallete and follow the wizard.
Create the project
From command palette create a new Application and wait until it starts.
Very slow on the T480, but ultimately created a functional app.
Test the installation of Flutter using the flutter doctor
command within VS Code terminal.
Start developing apps with Flutter
Use the following guides to continue learning about development with Flutter.
-
Seems to be a lengthy video tutorial that is cross platform on Desktop and Web
-
Seems like a better outline, but still not clear
One surprising thing to notice is that the Linux development side of Flutter is using C. A positive surprise, but unexpected. I thought I'd still be dealing with Dart.
Summary
Relatively straightforward install, but the development guide itself for Linux is lacking. Lots of piecing together, but seems interesting to learn about app development using C.
Will push on with this further and aim to build an RSS app for Linux.