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
15aa3bfd
Unverified
Commit
15aa3bfd
authored
Jun 02, 2022
by
Pierre-Louis
Committed by
GitHub
Jun 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
turn on `curly_braces_in_flow_control_structures` for develop-facing code (#105113)
parent
3c6719ba
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
7 deletions
+16
-7
analysis_options.yaml
analysis_options.yaml
+1
-1
analysis_options.yaml
examples/api/analysis_options.yaml
+2
-0
analysis_options.yaml
packages/analysis_options.yaml
+1
-0
ink_sparkle.dart
packages/flutter/lib/src/material/ink_sparkle.dart
+2
-1
material.dart
packages/flutter/lib/src/material/material.dart
+2
-1
selection_area.dart
packages/flutter/lib/src/material/selection_area.dart
+2
-1
editable.dart
packages/flutter/lib/src/rendering/editable.dart
+2
-1
mouse_tracker.dart
packages/flutter/lib/src/rendering/mouse_tracker.dart
+2
-1
selectable_region_test.dart
packages/flutter/test/widgets/selectable_region_test.dart
+2
-1
No files found.
analysis_options.yaml
View file @
15aa3bfd
...
@@ -98,7 +98,7 @@ linter:
...
@@ -98,7 +98,7 @@ linter:
# - conditional_uri_does_not_exist # not yet tested
# - conditional_uri_does_not_exist # not yet tested
# - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204
# - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204
-
control_flow_in_finally
-
control_flow_in_finally
# - curly_braces_in_flow_control_structures # not required by flutter style
# - curly_braces_in_flow_control_structures # not required by flutter style
, but developer-facing code should have this on
-
depend_on_referenced_packages
-
depend_on_referenced_packages
-
deprecated_consistency
-
deprecated_consistency
# - diagnostic_describe_all_properties # enabled only at the framework level (packages/flutter/lib)
# - diagnostic_describe_all_properties # enabled only at the framework level (packages/flutter/lib)
...
...
examples/api/analysis_options.yaml
View file @
15aa3bfd
...
@@ -4,5 +4,7 @@ include: ../../analysis_options.yaml
...
@@ -4,5 +4,7 @@ include: ../../analysis_options.yaml
linter
:
linter
:
rules
:
rules
:
# Developer-facing code
curly_braces_in_flow_control_structures
:
true
# Samples want to print things pretty often.
# Samples want to print things pretty often.
avoid_print
:
false
avoid_print
:
false
packages/analysis_options.yaml
View file @
15aa3bfd
...
@@ -5,5 +5,6 @@ include: ../analysis_options.yaml
...
@@ -5,5 +5,6 @@ include: ../analysis_options.yaml
linter
:
linter
:
rules
:
rules
:
-
curly_braces_in_flow_control_structures
# Developer-facing code
-
public_member_api_docs
# see https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#documentation-dartdocs-javadocs-etc
-
public_member_api_docs
# see https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#documentation-dartdocs-javadocs-etc
-
no_runtimeType_toString
# use objectRuntimeType from package:foundation
-
no_runtimeType_toString
# use objectRuntimeType from package:foundation
packages/flutter/lib/src/material/ink_sparkle.dart
View file @
15aa3bfd
...
@@ -212,9 +212,10 @@ class InkSparkle extends InteractiveInkFeature {
...
@@ -212,9 +212,10 @@ class InkSparkle extends InteractiveInkFeature {
}
}
void
_handleStatusChanged
(
AnimationStatus
status
)
{
void
_handleStatusChanged
(
AnimationStatus
status
)
{
if
(
status
==
AnimationStatus
.
completed
)
if
(
status
==
AnimationStatus
.
completed
)
{
dispose
();
dispose
();
}
}
}
static
const
Duration
_animationDuration
=
Duration
(
milliseconds:
617
);
static
const
Duration
_animationDuration
=
Duration
(
milliseconds:
617
);
static
const
double
_targetRadiusMultiplier
=
2.3
;
static
const
double
_targetRadiusMultiplier
=
2.3
;
...
...
packages/flutter/lib/src/material/material.dart
View file @
15aa3bfd
...
@@ -561,8 +561,9 @@ class _RenderInkFeatures extends RenderProxyBox implements MaterialInkController
...
@@ -561,8 +561,9 @@ class _RenderInkFeatures extends RenderProxyBox implements MaterialInkController
@visibleForTesting
@visibleForTesting
List
<
InkFeature
>?
get
debugInkFeatures
{
List
<
InkFeature
>?
get
debugInkFeatures
{
if
(
kDebugMode
)
if
(
kDebugMode
)
{
return
_inkFeatures
;
return
_inkFeatures
;
}
return
null
;
return
null
;
}
}
List
<
InkFeature
>?
_inkFeatures
;
List
<
InkFeature
>?
_inkFeatures
;
...
...
packages/flutter/lib/src/material/selection_area.dart
View file @
15aa3bfd
...
@@ -56,8 +56,9 @@ class SelectionArea extends StatefulWidget {
...
@@ -56,8 +56,9 @@ class SelectionArea extends StatefulWidget {
class
_SelectionAreaState
extends
State
<
SelectionArea
>
{
class
_SelectionAreaState
extends
State
<
SelectionArea
>
{
FocusNode
get
_effectiveFocusNode
{
FocusNode
get
_effectiveFocusNode
{
if
(
widget
.
focusNode
!=
null
)
if
(
widget
.
focusNode
!=
null
)
{
return
widget
.
focusNode
!;
return
widget
.
focusNode
!;
}
_internalNode
??=
FocusNode
();
_internalNode
??=
FocusNode
();
return
_internalNode
!;
return
_internalNode
!;
}
}
...
...
packages/flutter/lib/src/rendering/editable.dart
View file @
15aa3bfd
...
@@ -3054,10 +3054,11 @@ class _CompositeRenderEditablePainter extends RenderEditablePainter {
...
@@ -3054,10 +3054,11 @@ class _CompositeRenderEditablePainter extends RenderEditablePainter {
final
Iterator
<
RenderEditablePainter
>
oldPainters
=
oldDelegate
.
painters
.
iterator
;
final
Iterator
<
RenderEditablePainter
>
oldPainters
=
oldDelegate
.
painters
.
iterator
;
final
Iterator
<
RenderEditablePainter
>
newPainters
=
painters
.
iterator
;
final
Iterator
<
RenderEditablePainter
>
newPainters
=
painters
.
iterator
;
while
(
oldPainters
.
moveNext
()
&&
newPainters
.
moveNext
())
while
(
oldPainters
.
moveNext
()
&&
newPainters
.
moveNext
())
{
if
(
newPainters
.
current
.
shouldRepaint
(
oldPainters
.
current
))
{
if
(
newPainters
.
current
.
shouldRepaint
(
oldPainters
.
current
))
{
return
true
;
return
true
;
}
}
}
return
false
;
return
false
;
}
}
...
...
packages/flutter/lib/src/rendering/mouse_tracker.dart
View file @
15aa3bfd
...
@@ -408,10 +408,11 @@ class MouseTracker extends ChangeNotifier {
...
@@ -408,10 +408,11 @@ class MouseTracker extends ChangeNotifier {
// hit-test order.
// hit-test order.
final
PointerExitEvent
baseExitEvent
=
PointerExitEvent
.
fromMouseEvent
(
latestEvent
);
final
PointerExitEvent
baseExitEvent
=
PointerExitEvent
.
fromMouseEvent
(
latestEvent
);
lastAnnotations
.
forEach
((
MouseTrackerAnnotation
annotation
,
Matrix4
transform
)
{
lastAnnotations
.
forEach
((
MouseTrackerAnnotation
annotation
,
Matrix4
transform
)
{
if
(!
nextAnnotations
.
containsKey
(
annotation
))
if
(!
nextAnnotations
.
containsKey
(
annotation
))
{
if
(
annotation
.
validForMouseTracker
&&
annotation
.
onExit
!=
null
)
{
if
(
annotation
.
validForMouseTracker
&&
annotation
.
onExit
!=
null
)
{
annotation
.
onExit
!(
baseExitEvent
.
transformed
(
lastAnnotations
[
annotation
]));
annotation
.
onExit
!(
baseExitEvent
.
transformed
(
lastAnnotations
[
annotation
]));
}
}
}
});
});
// Send enter events to annotations that are not in last but in next, in
// Send enter events to annotations that are not in last but in next, in
...
...
packages/flutter/test/widgets/selectable_region_test.dart
View file @
15aa3bfd
...
@@ -1292,8 +1292,9 @@ class RenderSelectAll extends RenderProxyBox
...
@@ -1292,8 +1292,9 @@ class RenderSelectAll extends RenderProxyBox
),
),
);
);
set
value
(
SelectionGeometry
other
)
{
set
value
(
SelectionGeometry
other
)
{
if
(
other
==
_value
)
if
(
other
==
_value
)
{
return
;
return
;
}
_value
=
other
;
_value
=
other
;
for
(
final
VoidCallback
callback
in
listeners
)
{
for
(
final
VoidCallback
callback
in
listeners
)
{
callback
();
callback
();
...
...
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