Skip to main content

flutter_slick_lints 0.2.0 copy "flutter_slick_lints: ^0.2.0" to clipboard
flutter_slick_lints: ^0.2.0 copied to clipboard

Custom analyzer lints for flutter_slick view models, screens and routes.

0.2.0 #

  • avoid_state_calls_in_init_state: loading(), idle() and redraw() in a view model's initState() reach nothing — the widget shows the loading view until it completes, then calls idle() itself. Ships a delete quick-fix.
  • avoid_notify_during_build: a view model notification made while the view builds is the setState() called during build error.
  • use_on_redirect: a route that overrides redirect replaces Slick's dispatch to onRedirect, so the guard written there never runs. Ships a rename quick-fix.
  • use_navigation_logic: a route change made through go_router directly — route.go(context), context.go(...), GoRouter.of(context).go(...) — loses the history entry, the dirty-state reset and the page snapshot. Inside a view model, the quick-fix rewrites it as navigation.goTo(route).
  • use_slick_page_host: a buildPage override that drops SlickPageHost drops the page out of snapshot loading, in both directions.
  • avoid_redundant_redraw now checks that the neighbouring loading()/idle() actually notifies. Both return early when the loading flag already holds the value they would set, so redraw(); idle(); with no loading() before it is the one notification in that method — the rule used to report it, and its fix would have dropped the update. The rule also stays quiet when a branch, a loop or a try makes the loading state unreadable, and leaves initState() to avoid_state_calls_in_init_state.

0.1.0 #

  • First release. avoid_redundant_redraw: a redraw() next to a loading() or idle() draws the view a second time, because those two notify when they change the loading state. Ships a quick-fix that deletes the line.
0
likes
140
points
141
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Custom analyzer lints for flutter_slick view models, screens and routes.

Repository

License

BSD-3-Clause (license)

Dependencies

analyzer, custom_lint_builder

More

Packages that depend on flutter_slick_lints