Installation Guide - RPI-Food-Finder/RPIFoodFinder GitHub Wiki

Welcome to the RPI Food Finder Installation Guide

Contents

  1. Flutter
  2. Android Studio
  3. Visual Studio Code

Flutter

Since our stack is just Flutter and Firebase all you need to do is install Flutter to start contributing!

You can follow this guide here that the lovely people that developed Flutter created for us. Or you can continue reading the rest of this guide if you want the complete dev environment that I (Anthony Fabius, developer) use to develop RPI Food Finder.

WARNING Follow the flutter guide if you are on Linux, MacOS, or ChromeOS. I would also recommend following the flutter guide if you're used to downloading software development kits but, if you are not then follow the rest of this guide.

Flutter Software Development Kit(SDK)

  1. Okay to begin head over to this link to access the flutter SDK package WINDOWS ONLY.

  2. Make sure your system requirements match. (They should for the most part so don't go crazy over it)

  3. Scroll down a little more until you get to the "Get Flutter SKD" which should look like this:

Click on that big blue button! Your version numbers may be higher than the one on the image but that is fine. As long as the first 2 numbers are higher than or equal to 3.7 you're fine.

  1. The SDK comes in a .zip file so you will need to extract it.

  2. After the extraction is finished you can move it to another directory that won't be touched but can be easily accessed. For example my Flutter SDK is in a custom "SDK" folder I made in my documents directory. Keep this path in mind. Mine being .\Documents\SDK\flutter_windows_3.7.0-stable\flutter

  3. You will need to update your Path environment. Just follow the guide the flutter devs give us.

When you do the first bullet point this nice little window should show up on your screen.

Click on environment variables. Then another window should pop up.

Click Path (If it doesn't exists make one) then click on edit. You should be brought to one last screen. Just click the box that says "new" on the right and paste in the location of your flutter bin folder. It should have the same path as the sdk but with a \bin after it. For example mine is: .\Documents\SDK\flutter_windows_3.7.0-stable\flutter\bin. Just click on all the buttons that say okay to save and close the windows.

  1. Assuming you didn't mess anything up. Open up windows PowerShell or Command Prompt and type in "flutter doctor". Then hit enter to run the command. After a text dump of stuff you may see something like this.

If you do. You downloaded the SDK! Now solve all your issues on your own. The android studio issue will be covered in the next part of this guide.

Android Studio

Follow this guide if you don't have android studio or need to connect it to flutter.

  1. Download and install Android Studio.

  2. When you are done run flutter doctor and make sure it is installed. It should look something like this if installed correctly.

There is a chance you get a "Unable to find bundled java version error"

To fix this find the location of your android studio directory. Take everything in the "jbe" folder, copy and paste the contents into the "jre" folder(if it exists).

  1. Open up Android Studio, click More Actions, then Virtual Device Manager
  1. On the top left corner click on create device. Then select phone and the type (see below picture for example).
  1. You will need to select a system image next. I recommend Tiramisu at the time of this guide being made but anything with an x86 intruction set will work. Also the higher the api level the better but anything works for the most part.

  2. You will then need to verify your configuration. Make sure you select Hardware-GLES as your emulated performance. Then run to make sure everything is working.

If you are getting the "cmdline-tools component is missing" error on flutter doctor follow these next step otherwise skip.

  1. To get cmdline-tools working go back to the main page of android studio. Click the "More Actions" drop down then "SDK Manager". From there click on the SDK Tools tab and select Command-line Tools (latest). Then click apply to make the changes go through. Example of what you screen should look like before hitting apply.
  1. You're flutter doctor should look something like this if you followed all the steps and fixed any other errors.
  1. Enter "flutter doctor --android-licenses" into your command line and accept all licenses

  2. Celebrate because flutter should be fully installed!!! (make sure your flutter doctor looks like this)

Visual Studio Code

This part of the guide is on Visual Studio Code. You can use any IDE you prefer to develop and it is encouraged you use what is comfortable! The flutter docs actually show you how to integrate flutter into other IDEs like Intellij and Emacs. This is just a place where some Visual Studio Code Extensions are linked to make your developer experience just a little easier.

Flutter VS Code Extension - Dart-Code.flutter : Technically this is the only one you need but we're just gonna use the rest of the wiki page to include some other vs-code extensions.

Comment Extension - aaron-bond.better-comments : You may see some weird "!" and "TODO" after certain comments. This extensions color codes them so they standout from the regular comments. Recommended but not needed.

Spell checker - streetsidesoftware.code-spell-checker : We will laugh at you if you can't spell \s.

Custom Icons - PKief.material-icon-theme : This isn't useful at all but it makes your explorer look prettier.