Debug mode assertions

During development, you are highly encouraged to use Flutter’s
debug mode. This is the default if you use bug icon in
Android Studio, or flutter run at the command line.
Some tools support assert statements through the
command-line flag --enable-asserts.

In this mode, Dart assert statements are enabled,
and the Flutter framework evaluates the argument
to each assert statement encountered during execution,
throwing an exception if the result is false.
This allows developers to enable or disable invariant
checking, such that the associated performance cost
is only paid during debugging sessions.

When an invariant is violated, it’s reported to the
console, with some context information to help track
down the source of the problem.

For more information, check out Assert in the
Dart language documentation.

Debugging animations

The easiest way to debug animations is to slow them down.
The Flutter inspector provides a Slow Animations button,
or you can slow the animations programmatically.