Flutter version

Stable.

Line length

120 (Dart's default).

Ordering in classes

Within a class, the following order should be used: Constructors > factories > fields > functions > getters > setters.

Nomenclature

ValueNotifiers

Every ValueNotifier's name needs to end with controller, not notifier.

Code generation

MFL uses Myoro Flutter Annotations to create boilerplate code for models and ThemeExtensions. When a code generation build is required, run dart run build_runner build.

Documenting your changes

  1. Use STAGELOG.md to add what you did in your pull request. This will then be added to CHANGELOG.md. Here is the format (always in - format and there must be a space between the title and notes:
# STAGELOG

- feature/fix/refactor/improvement/chore: Bla bla bla
  1. If you're creating a new Widget, add it to Widgets.md.

MVVM-C: MFL Widget architecture pattern

This idea is what I deem is the best for creating generic Widgets. It is a mix of MVVM and MVC. MVVM-C standards for (Model View View Model Controller). A Widget consists of:

  1. The model: To encapsulate data;
  2. The view: The Widget;
  3. The view model: To store the logic of the Widget;