-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
customer-flutterdevexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
In the Flutter repo, prefer_const_constructors gives us a bunch of false positives (119). For example, in dart_picker.dart:
final Widget actions = new ButtonTheme.bar(
child: new ButtonBar(
children: <Widget>[
new FlatButton(
child: const Text('CANCEL'),
onPressed: _handleCancel,
),
new FlatButton(
child: const Text('OK'),
onPressed: _handleOk,
),
],
),
);
we report prefer_const_constructors on new ButtonBar, and then on the list of children: and then for onPressed: which cannot be const.
cc @ a14n @bwilkerson
Metadata
Metadata
Assignees
Labels
customer-flutterdevexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)