Closed
Description
In our Flutter code, we use some classes / enums in dart:ui
extended by sky_engine
.
Linter seems to think these classes are undefined, which is not the case.
Steps to reproduce:
- Create a new flutter project using
flutter create
- In the created
lib/main.dart
, Modify the text widget in the sample code to useFontWeight.bold
style, which is defined indart:ui
.
child: new Text(
'Button tapped $_counter time${ _counter == 1 ? '' : 's' }.',
style: new TextStyle(fontWeight: FontWeight.bold),
),
- This code runs fine and
dartanalyzer
doesn't show any errors, but runningpub global linter .
gives the following warning:
<omitted>/foo/lib/main.dart 33:46 [static warning] Undefined name 'FontWeight'
style: new TextStyle(fontWeight: FontWeight.bold),
^^^^^^^^^^
<omitted>/foo/lib/main.dart 10:7 [lint] Document all public members
class FlutterDemo extends StatefulWidget {
^^^^^^^^^^^
<omitted>/foo/lib/main.dart 11:3 [lint] Document all public members
FlutterDemo({Key key}) : super(key: key);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 files analyzed, 3 issues found, in 5220 ms.
The last two are valid lint issues, but the first one is false positive.