Lesson 1
The What and Why of Flutter
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.
- 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).
Code example of a stateless widget taken from the effort on CREDO[/caption]
Hints: