proper_super_init_state

SeverityQuick FixOptions
Error

Details

DO call super.initState() at the start of the initState method.

Bad
@override
void initState() {
  _init();
  super.initState();
}
Good
@override
void initState() {
  super.initState();
  _init();
}

Usage

To enable the proper_super_init_state rule, add proper_super_init_state under custom_lint > rules in your analysis_options.yaml file:

custom_lint:
  rules:
    - proper_super_init_state