Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
e45836f2
Unverified
Commit
e45836f2
authored
Jun 13, 2018
by
Alexandre Ardhuin
Committed by
GitHub
Jun 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable lint avoid_field_initializers_in_const_classes (#18415)
parent
58756933
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
analysis_options.yaml
analysis_options.yaml
+1
-1
pesto_demo.dart
examples/flutter_gallery/lib/demo/pesto_demo.dart
+3
-3
events.dart
packages/flutter/lib/src/gestures/events.dart
+1
-1
No files found.
analysis_options.yaml
View file @
e45836f2
...
...
@@ -57,7 +57,7 @@ linter:
-
avoid_classes_with_only_static_members
# - avoid_double_and_int_checks # only useful when targeting JS runtime
-
avoid_empty_else
# - avoid_field_initializers_in_const_classes # not yet tested
-
avoid_field_initializers_in_const_classes
-
avoid_function_literals_in_foreach_calls
-
avoid_init_to_null
# - avoid_js_rounded_ints # only useful when targeting JS runtime
...
...
examples/flutter_gallery/lib/demo/pesto_demo.dart
View file @
e45836f2
...
...
@@ -250,14 +250,14 @@ class _PestoLogoState extends State<PestoLogo> {
// A card with the recipe's image, author, and title.
class
RecipeCard
extends
StatelessWidget
{
final
TextStyle
titleStyle
=
const
PestoStyle
(
fontSize:
24.0
,
fontWeight:
FontWeight
.
w600
);
final
TextStyle
authorStyle
=
const
PestoStyle
(
fontWeight:
FontWeight
.
w500
,
color:
Colors
.
black54
);
const
RecipeCard
({
Key
key
,
this
.
recipe
,
this
.
onTap
})
:
super
(
key:
key
);
final
Recipe
recipe
;
final
VoidCallback
onTap
;
TextStyle
get
titleStyle
=>
const
PestoStyle
(
fontSize:
24.0
,
fontWeight:
FontWeight
.
w600
);
TextStyle
get
authorStyle
=>
const
PestoStyle
(
fontWeight:
FontWeight
.
w500
,
color:
Colors
.
black54
);
@override
Widget
build
(
BuildContext
context
)
{
return
new
GestureDetector
(
...
...
packages/flutter/lib/src/gestures/events.dart
View file @
e45836f2
...
...
@@ -176,7 +176,7 @@ abstract class PointerEvent {
final
double
distance
;
/// The minimum value that a distance can return for this pointer (always 0.0).
final
double
distanceMin
=
0.0
;
double
get
distanceMin
=>
0.0
;
/// The maximum value that a distance can return for this pointer. If this
/// input device cannot detect "hover touch" input events, then this will be
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment