grab_lints 0.3.2 copy "grab_lints: ^0.3.2" to clipboard
grab_lints: ^0.3.2 copied to clipboard

Lint rules to help avoid common misuse of Grab.

Lint rules to help avoid common misuse of Grab.

Available lint rules #

A quick fix is available in some rules.

With fix #

  • missing_grab_mixin
    • Warned when a Grab mixin is missing where it is necessary.
  • unnecessary_grab_mixin
    • Warned when a Grab mixin is used where it is unnecessary.
  • wrong_grab_mixin
    • Warned when a wrong Grab mixin is used.

Without fix #

  • avoid_grab_in_callback
    • Warned when an extension method of Grab is used in a callback function.
      • Such usage is possible as long as the correct BuildContext is used, but it is not recommended as it easily leads to misuse or confusion.
  • avoid_grab_outside_build
    • Warned when an extension method of Grab is used outside the build method of a widget.
      • Ditto.

Setup #

This plugin uses custom_lint.

pubspec.yaml #

Put the latest version in place of x.x.x below.

dev_dependencies:
  custom_lint: ^x.x.x
  grab_lints: ^x.x.x

analysis_options.yaml #

analyzer:
  plugins:
    - custom_lint
0
likes
0
pub points
0%
popularity

Publisher

verified publisherkaboc.cc

Lint rules to help avoid common misuse of Grab.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analyzer, custom_lint_builder

More

Packages that depend on grab_lints