Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 2.87 KB

README.md

File metadata and controls

73 lines (53 loc) · 2.87 KB

Flutter Starter

Intro

This is a starter project for Flutter based mobile applications. Some of the code is useful for desktop apps too. This is an example of a simple mobile app with API integration and how to set it up with some dependency injection and predictable testing of API integrations.

Dev Environment setup

Running checks

This checks formatting, runs tests and checks for dependency cycles

make check

Running the app

On Android Emulator

  • In Android Studio, setup an emulator in the Device Manager.
  • Run it using the play button in Device Manager
  • It switches to the Running Devices view.
  • Select the emulator from the device list next to the run configuration.
  • Run main.dart

On iOS Simulator (MacOS+XCode required)

  • Start the iOS Simulator app
  • Install and Run the iPhone Simulator of your choice.
  • In Android Studio, select the simulator from the device list next to the run configuration.
  • Run main.dart

On Android or iOS Device

  • Configure device for developer mode (see Android/iOS documentation for that)
  • Connect to your computer
  • Select in Android Studio's device list
  • Run main.dart

Formatting

We use a line length of 100 characters, which is good enough to show two files side by side on a modern 27 inch screen. Line length can be set in Android Studio Preferences > Editor > Code Style > Dart.

If your prefer a different line length, feel free to update the Tasks.mk to your team's liking and have developers configure their IDE as well.

Cyclic dependencies

Make sure your imports are relative only for files in the same folder, otherwise use package: imports.