avoid_global_state
Avoid top-level and static mutable variables.
Top-level variables can be modified from anywhere, which leads to hard to debug applications.
Prefer using a state management solution.
Example
BAD:
var globalMutable = 0; // LINT
class Test {
static int globalMutable = 0; // LINT
}
GOOD:
final globalFinal = 1;
const globalConst = 1;
class Test {
static const int globalConst = 1;
static final int globalFinal = 1;
}