rrousselGit / riverpod

A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze.
https://riverpod.dev
MIT License
6.28k stars 955 forks source link

analyzer complains at useStreamController() with "Close instances of `dart.core.Sink`." #544

Closed aoatmon closed 3 years ago

aoatmon commented 3 years ago

Describe the bug big change I just missed something, nevertheless analyzer is upset if I use in a HookWidget

    final controller = useStreamController();

Close instances of dart.core.Sink.

image

To Reproduce

[✓] Flutter (Channel stable, 2.2.2, on macOS 11.4 20F71 darwin-x64, locale en-EE)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.57.1)
[✓] Connected device (2 available)

• No issues found!
  flutter_hooks: ^0.17.0
  hooks_riverpod: ^0.14.0

Expected behavior analyzer showing some love

rrousselGit commented 3 years ago

The problem is the analyzer, not Riverpod/Hooks.

There is nothing I can do. Consider disabling the lint