The What and Why of Flutter
Flutter is a complete Software Development Kit (SDK), which uses Dart as its main language. Originally developed by Google it is used for cross and multiplatform applications and prides itself on being easily comprehensible to both designers and developers letting you create great-looking apps.
Flutter has a lot of built-in functionality ready to “plug and play” and also has a wide community that creates and maintains a large number of extra packages that for example let you access a device’s accelerometer or location. Also, their documentation and learning materials are excellent !!
It is widely used (sites like Alibaba etc.) and has guaranteed to have long-term support by Google.
Some things you should know
Dart is a strongly typed language i.e you have to define variable types when you create them. Alternatively, you can leave them in as var but this can and will cause issues.
While it is not strictly necessary having a basic understanding of Object Oriented Principles (OOP) is a great help and will mean that you are going to pick up Dart quickly.
If you are unfamiliar with OOP it is worth having a read of this brief guide that introduces you to the core concepts such as inheritance and encapsulation.
Installation and Setup
We did mention that their documentation is first-rate! So for installing and setting up Flutter on your own machine follow their installation guide.
Though here are a few things that we had to troubleshoot during the installation/setup phase:
- coco-pops not installing properly
- this was fixed by reinstalling both ruby and coco pops through homebrew (mac os)
- Setting up an ios emulator
- the problem was that we could just not start it through Android Studio and instead had to go through Xcode.
While that worked it will not let you run an emulator without you registering a physical device first. It also has to be a fairly recent one as something like an old iPhone 3 will be rejected by the up-to-date version of Xcode.
- the problem was that we could just not start it through Android Studio and instead had to go through Xcode.
- Packages and null awareness
- null awareness was introduced partway through the project but not all packages that we utilized had been updated yet. The workaround is adding an augmentation to the run command to ignore null safety for those packages (we know this was not ideal but the best we could do at the time).
