signals_lint 4.2.1 signals_lint: ^4.2.1 copied to clipboard
linter and developer tool for signals
Linter and developer tools for signals.
Getting started #
Run this command in the root of your Flutter project:
flutter pub add -d signals_lint custom_lint
Then edit your analysis_options.yaml
file and add these lines of code:
analyzer:
plugins:
- custom_lint
Then run:
flutter clean
flutter pub get
dart run custom_lint
Fixes #
Wrap with Watch #
Wrap any Widget with Watch
to automatically rebuild it when a signal is emitted.
Before:
class Widget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Text(
'Hello World',
style: TextStyle(
color: Colors.black,
),
);
}
}
After:
class Widget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Watch((context) => Text(
'Hello World',
style: TextStyle(
color: Colors.black,
),
));
}
}
Other packages #
Package | Pub |
---|---|
signals |
|
signals_core |
|
signals_flutter |