Skip to content

Running and analysing the project

julien4215 edited this page May 1, 2024 · 9 revisions

Code generation

This project uses code generation to generate data classes with freezed among other things.

You need to run it before anything else otherwise the project won't compile:

dart run build_runner build

While developing you can use the watch command:

dart run build_runner watch

Static analysis

Flutter comes with an analyze command to run static analysis. While developing you can run:

flutter analyze --watch

It will run analysis continuously, watching the filesystem for changes. It is important to always check for analysis errors.

Run

Use the flutter run command to run on an emulator or device. If you need to change the lichess host you can do it like so (if the name of the host doesn't start with localhost it will use https) :

flutter run --dart-define=LICHESS_HOST=l.org