A Dart static analysis rule that detects positional builder parameters in Watch
or SignalBuilder constructors and encourages using the named builder
argument.
In
signals v7, to make the API more readable and consistent with standard Flutter components,
Watch and SignalBuilder support the named builder parameter. Using positional
parameters can be harder to read and may be deprecated in future versions.
Examples#
Incorrect:
Watch((context) { // LINT: Positional builder argument
return Text('${counter.value}');
});
Correct:
Watch(
builder: (context) => Text('${counter.value}'), // OK: Named builder parameter
);