);

// No ! or ? operator here now.

The unnecessary_non_null_assertion analysis option can be quite helpful in
finding the places where the ! operator should be removed, and the
unnecessary_nullable_for_final_variable_declarations analysis option can be
helpful in finding unnecessary question mark operators on final and const
variables.

Timeline

Landed in version: 1.24.0
In stable release: 2.0.0

References

API documentation:

MediaQuery.of

Navigator.of

ScaffoldMessenger.of

Scaffold.of

Router.of

Localizations.localeOf

FocusTraversalOrder.of

FocusTraversalGroup.of

Focus.of

Shortcuts.of