Coding Guidelines - coi-dev/flutter-deltachat-core GitHub Wiki

We use the following sources as coding guidelines.

Additionally we apply the following rules.

Dart

Naming

Create and destroy logic / state methods

  • As Flutter uses the words build and create pretty extensively for UI handling, we should avoid those when creating methods which manage logic or states
    • Create / setup methods should start with setup
    • Tear down / destroy methods should start with tearDown

Utils

If generic functionality is needed please check first if a utility class already provides the required functions. If this is not the case a new utility class should be created or an existing one should get extended to avoid duplicated code.

File structure

  • All files referring to a context (e.g. handlers) should be located in one package