Skip to content

Latest commit

 

History

History

signals_lint

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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
signals_core signals_core
signals_flutter signals_flutter