Skip to content

First Steps

Daniel Wagner edited this page Jun 2, 2022 · 1 revision

Installation

See https://docs.flutter.dev/get-started/install

The dependencies from the pubspec.yaml file need to be installed using flutter pug get in the root folder of the app directory.

If you are running on Android you need to add some settings in the build.gradle file inside android/app:

defaultConfig {
        applicationId "mad.tf.fau.de.handball_performance_tracker"
        minSdkVersion 20
        targetSdkVersion flutter.targetSdkVersion
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        multiDexEnabled true
    }

App Architecture

Following this guide: https://medium.com/flutter-community/flutter-scalable-folder-files-structure-8f860faafebd

main.dart

  • screens main dart file of each screen referencing widgets
  • data database and firebase functionality
  • utils services, helper methods, ui helpers
  • widgets custom widgets like buttons and similar. These elements can be referenced inside the screen files

State Managment

We rely on a simple state management approach using the getX package. This package is also used for route managment (switching between screens).

For each screen there is a controller in the controllers folder. It serves for storing all the state variables. When a parent is observing using Obx all the children have access to a controller.

Clone this wiki locally