Explicit arguments

UI frameworks tend to have many properties, such that a developer is
rarely able to remember the semantic meaning of each constructor
argument of each class. As Flutter uses the reactive paradigm,
it is common for build methods in Flutter to have many calls to
constructors. By leveraging Dart’s support for named arguments,
Flutter’s API is able to keep such build methods clear and understandable.

This pattern is extended to any method with multiple arguments,
and in particular is extended to any boolean argument, so that isolated
true or false literals in method calls are always self-documenting.
Furthermore, to avoid confusion commonly caused by double negatives
in APIs, boolean arguments and properties are always named in the
positive form (for example, enabled: true rather than disabled: false).

Paving over pitfalls

A technique used in a number of places in the Flutter framework is to
define the API such that error conditions don’t exist. This removes
entire classes of errors from consideration.