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
2e80bf1d
Unverified
Commit
2e80bf1d
authored
Feb 06, 2018
by
Alexandre Ardhuin
Committed by
GitHub
Feb 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unnessary parenthesis (#14475)
parent
ede01a77
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
34 additions
and
35 deletions
+34
-35
sample_page.dart
examples/catalog/bin/sample_page.dart
+1
-1
pesto_demo.dart
examples/flutter_gallery/lib/demo/pesto_demo.dart
+1
-1
sector_layout.dart
examples/layers/rendering/src/sector_layout.dart
+1
-1
gestures.dart
examples/layers/widgets/gestures.dart
+1
-1
monodrag.dart
packages/flutter/lib/src/gestures/monodrag.dart
+1
-1
ink_highlight.dart
packages/flutter/lib/src/material/ink_highlight.dart
+1
-1
page.dart
packages/flutter/lib/src/material/page.dart
+1
-1
paginated_data_table.dart
packages/flutter/lib/src/material/paginated_data_table.dart
+1
-1
stadium_border.dart
packages/flutter/lib/src/painting/stadium_border.dart
+1
-1
text_style.dart
packages/flutter/lib/src/painting/text_style.dart
+1
-1
object.dart
packages/flutter/lib/src/rendering/object.dart
+2
-2
sliver_persistent_header.dart
...s/flutter/lib/src/rendering/sliver_persistent_header.dart
+2
-2
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+1
-1
overscroll_indicator.dart
packages/flutter/lib/src/widgets/overscroll_indicator.dart
+1
-1
performance_overlay.dart
packages/flutter/lib/src/widgets/performance_overlay.dart
+2
-3
widget_tester.dart
packages/flutter_test/lib/src/widget_tester.dart
+3
-3
executable.dart
packages/flutter_tools/lib/executable.dart
+1
-1
analyze_base.dart
packages/flutter_tools/lib/src/commands/analyze_base.dart
+1
-1
plugins.dart
packages/flutter_tools/lib/src/plugins.dart
+2
-2
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+9
-9
No files found.
examples/catalog/bin/sample_page.dart
View file @
2e80bf1d
...
...
@@ -57,7 +57,7 @@ String expandTemplate(String template, Map<String, String> values) {
if
(
match
.
groupCount
!=
1
)
throw
new
SampleError
(
'bad template keyword
$match
[0]'
);
final
String
keyword
=
match
[
1
];
return
(
values
[
keyword
]
??
''
)
;
return
values
[
keyword
]
??
''
;
});
}
...
...
examples/flutter_gallery/lib/demo/pesto_demo.dart
View file @
2e80bf1d
...
...
@@ -326,7 +326,7 @@ class _RecipePageState extends State<RecipePage> {
// the edge of the screen, use a slightly different layout.
final
double
appBarHeight
=
_getAppBarHeight
(
context
);
final
Size
screenSize
=
MediaQuery
.
of
(
context
).
size
;
final
bool
fullWidth
=
(
screenSize
.
width
<
_kRecipePageMaxWidth
)
;
final
bool
fullWidth
=
screenSize
.
width
<
_kRecipePageMaxWidth
;
final
bool
isFavorite
=
_favoriteRecipes
.
contains
(
widget
.
recipe
);
return
new
Scaffold
(
key:
_scaffoldKey
,
...
...
examples/layers/rendering/src/sector_layout.dart
View file @
2e80bf1d
...
...
@@ -170,7 +170,7 @@ abstract class RenderDecoratedSector extends RenderSector {
final
Canvas
canvas
=
context
.
canvas
;
final
Paint
paint
=
new
Paint
()..
color
=
_decoration
.
color
;
final
Path
path
=
new
Path
();
final
double
outerRadius
=
(
parentData
.
radius
+
deltaRadius
)
;
final
double
outerRadius
=
parentData
.
radius
+
deltaRadius
;
final
Rect
outerBounds
=
new
Rect
.
fromLTRB
(
offset
.
dx
-
outerRadius
,
offset
.
dy
-
outerRadius
,
offset
.
dx
+
outerRadius
,
offset
.
dy
+
outerRadius
);
path
.
arcTo
(
outerBounds
,
parentData
.
theta
,
deltaTheta
,
true
);
final
double
innerRadius
=
parentData
.
radius
;
...
...
examples/layers/widgets/gestures.dart
View file @
2e80bf1d
...
...
@@ -27,7 +27,7 @@ class _GesturePainter extends CustomPainter {
@override
void
paint
(
Canvas
canvas
,
Size
size
)
{
final
Offset
center
=
(
size
.
center
(
Offset
.
zero
)
*
zoom
+
offset
)
;
final
Offset
center
=
size
.
center
(
Offset
.
zero
)
*
zoom
+
offset
;
final
double
radius
=
size
.
width
/
2.0
*
zoom
;
final
Gradient
gradient
=
new
RadialGradient
(
colors:
forward
?
<
Color
>[
swatch
.
shade50
,
swatch
.
shade900
]
...
...
packages/flutter/lib/src/gestures/monodrag.dart
View file @
2e80bf1d
...
...
@@ -196,7 +196,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer {
invokeCallback
<
void
>(
'onCancel'
,
onCancel
);
return
;
}
final
bool
wasAccepted
=
(
_state
==
_DragState
.
accepted
)
;
final
bool
wasAccepted
=
_state
==
_DragState
.
accepted
;
_state
=
_DragState
.
ready
;
if
(
wasAccepted
&&
onEnd
!=
null
)
{
final
VelocityTracker
tracker
=
_velocityTrackers
[
pointer
];
...
...
packages/flutter/lib/src/material/ink_highlight.dart
View file @
2e80bf1d
...
...
@@ -121,7 +121,7 @@ class InkHighlight extends InteractiveInkFeature {
void
paintFeature
(
Canvas
canvas
,
Matrix4
transform
)
{
final
Paint
paint
=
new
Paint
()..
color
=
color
.
withAlpha
(
_alpha
.
value
);
final
Offset
originOffset
=
MatrixUtils
.
getAsTranslation
(
transform
);
final
Rect
rect
=
(
_rectCallback
!=
null
?
_rectCallback
()
:
Offset
.
zero
&
referenceBox
.
size
)
;
final
Rect
rect
=
_rectCallback
!=
null
?
_rectCallback
()
:
Offset
.
zero
&
referenceBox
.
size
;
if
(
originOffset
==
null
)
{
canvas
.
save
();
canvas
.
transform
(
transform
.
storage
);
...
...
packages/flutter/lib/src/material/page.dart
View file @
2e80bf1d
...
...
@@ -129,7 +129,7 @@ class MaterialPageRoute<T> extends PageRoute<T> {
@override
bool
canTransitionFrom
(
TransitionRoute
<
dynamic
>
previousRoute
)
{
return
(
previousRoute
is
MaterialPageRoute
||
previousRoute
is
CupertinoPageRoute
)
;
return
previousRoute
is
MaterialPageRoute
||
previousRoute
is
CupertinoPageRoute
;
}
@override
...
...
packages/flutter/lib/src/material/paginated_data_table.dart
View file @
2e80bf1d
...
...
@@ -324,7 +324,7 @@ class PaginatedDataTableState extends State<PaginatedDataTable> {
final
List
<
Widget
>
footerWidgets
=
<
Widget
>[];
if
(
widget
.
onRowsPerPageChanged
!=
null
)
{
final
List
<
Widget
>
availableRowsPerPage
=
widget
.
availableRowsPerPage
.
where
((
int
value
)
=>
(
value
<=
_rowCount
||
value
==
widget
.
rowsPerPage
)
)
.
where
((
int
value
)
=>
value
<=
_rowCount
||
value
==
widget
.
rowsPerPage
)
.
map
<
DropdownMenuItem
<
int
>>((
int
value
)
{
return
new
DropdownMenuItem
<
int
>(
value:
value
,
...
...
packages/flutter/lib/src/painting/stadium_border.dart
View file @
2e80bf1d
...
...
@@ -363,7 +363,7 @@ class _StadiumToRoundedRectangleBorder extends ShapeBorder {
return
BorderRadius
.
lerp
(
borderRadius
,
new
BorderRadius
.
all
(
new
Radius
.
circular
(
rect
.
shortestSide
/
2.0
)),
(
1.0
-
rectness
)
1.0
-
rectness
);
}
...
...
packages/flutter/lib/src/painting/text_style.dart
View file @
2e80bf1d
...
...
@@ -703,7 +703,7 @@ class TextStyle extends Diagnosticable {
if
(
decoration
!=
null
||
decorationColor
!=
null
||
decorationStyle
!=
null
)
{
final
List
<
String
>
decorationDescription
=
<
String
>[];
if
(
decorationStyle
!=
null
)
decorationDescription
.
add
(
describeEnum
(
(
decorationStyle
)
));
decorationDescription
.
add
(
describeEnum
(
decorationStyle
));
// Hide decorationColor from the default text view as it is shown in the
// terse decoration summary as well.
...
...
packages/flutter/lib/src/rendering/object.dart
View file @
2e80bf1d
...
...
@@ -168,7 +168,7 @@ class PaintingContext {
}
bool
get
_isRecording
{
final
bool
hasCanvas
=
(
_canvas
!=
null
)
;
final
bool
hasCanvas
=
_canvas
!=
null
;
assert
(()
{
if
(
hasCanvas
)
{
assert
(
_currentLayer
!=
null
);
...
...
@@ -2222,7 +2222,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
/// any way to update the semantics tree.
void
markNeedsSemanticsUpdate
()
{
assert
(!
attached
||
!
owner
.
_debugDoingSemantics
);
if
(
(
attached
&&
owner
.
_semanticsOwner
==
null
)
)
if
(
attached
&&
owner
.
_semanticsOwner
==
null
)
return
;
// Dirty the semantics tree starting at `this` until we have reached a
...
...
packages/flutter/lib/src/rendering/sliver_persistent_header.dart
View file @
2e80bf1d
...
...
@@ -515,8 +515,8 @@ abstract class RenderSliverFloatingPinnedPersistentHeader extends RenderSliverFl
double
updateGeometry
()
{
final
double
minExtent
=
this
.
minExtent
;
final
double
maxExtent
=
this
.
maxExtent
;
final
double
paintExtent
=
(
maxExtent
-
_effectiveScrollOffset
)
;
final
double
layoutExtent
=
(
maxExtent
-
constraints
.
scrollOffset
)
;
final
double
paintExtent
=
maxExtent
-
_effectiveScrollOffset
;
final
double
layoutExtent
=
maxExtent
-
constraints
.
scrollOffset
;
geometry
=
new
SliverGeometry
(
scrollExtent:
maxExtent
,
paintExtent:
paintExtent
.
clamp
(
minExtent
,
constraints
.
remainingPaintExtent
),
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
2e80bf1d
...
...
@@ -2965,7 +2965,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
assert
(
owner
!=
null
);
assert
(
depth
!=
null
);
assert
(!
_active
);
final
bool
hadDependencies
=
(
(
_dependencies
!=
null
&&
_dependencies
.
isNotEmpty
)
||
_hadUnsatisfiedDependencies
)
;
final
bool
hadDependencies
=
(
_dependencies
!=
null
&&
_dependencies
.
isNotEmpty
)
||
_hadUnsatisfiedDependencies
;
_active
=
true
;
// We unregistered our dependencies in deactivate, but never cleared the list.
// Since we're going to be reused, let's clear our list now.
...
...
packages/flutter/lib/src/widgets/overscroll_indicator.dart
View file @
2e80bf1d
...
...
@@ -362,7 +362,7 @@ class _GlowController extends ChangeNotifier {
_glowOpacityTween
.
end
=
math
.
min
(
_glowOpacity
.
value
+
overscroll
/
extent
*
_pullOpacityGlowFactor
,
_maxOpacity
);
final
double
height
=
math
.
min
(
extent
,
crossExtent
*
_kWidthToHeightFactor
);
_glowSizeTween
.
begin
=
_glowSize
.
value
;
_glowSizeTween
.
end
=
math
.
max
(
(
1.0
-
1.0
/
(
0.7
*
math
.
sqrt
(
_pullDistance
*
height
)
)),
_glowSize
.
value
);
_glowSizeTween
.
end
=
math
.
max
(
1.0
-
1.0
/
(
0.7
*
math
.
sqrt
(
_pullDistance
*
height
)),
_glowSize
.
value
);
_displacementTarget
=
crossAxisOffset
/
crossExtent
;
if
(
_displacementTarget
!=
_displacement
)
{
if
(!
_displacementTicker
.
isTicking
)
{
...
...
packages/flutter/lib/src/widgets/performance_overlay.dart
View file @
2e80bf1d
...
...
@@ -40,12 +40,11 @@ class PerformanceOverlay extends LeafRenderObjectWidget {
this
.
rasterizerThreshold
:
0
,
this
.
checkerboardRasterCacheImages
:
false
,
this
.
checkerboardOffscreenLayers
:
false
})
:
optionsMask
=
(
:
optionsMask
=
1
<<
PerformanceOverlayOption
.
displayRasterizerStatistics
.
index
|
1
<<
PerformanceOverlayOption
.
visualizeRasterizerStatistics
.
index
|
1
<<
PerformanceOverlayOption
.
displayEngineStatistics
.
index
|
1
<<
PerformanceOverlayOption
.
visualizeEngineStatistics
.
index
),
1
<<
PerformanceOverlayOption
.
visualizeEngineStatistics
.
index
,
super
(
key:
key
);
/// The mask is created by shifting 1 by the index of the specific
...
...
packages/flutter_test/lib/src/widget_tester.dart
View file @
2e80bf1d
...
...
@@ -356,9 +356,9 @@ class WidgetTester extends WidgetController implements HitTestDispatcher, Ticker
if
(
element
.
widget
.
key
is
ValueKey
<
dynamic
>)
{
final
ValueKey
<
dynamic
>
key
=
element
.
widget
.
key
;
String
keyLabel
;
if
(
(
key
is
ValueKey
<
int
>
||
key
is
ValueKey
<
double
>
||
key
is
ValueKey
<
bool
>)
)
{
if
(
key
is
ValueKey
<
int
>
||
key
is
ValueKey
<
double
>
||
key
is
ValueKey
<
bool
>
)
{
keyLabel
=
'const
${element.widget.key.runtimeType}
(
${key.value}
)'
;
}
else
if
(
key
is
ValueKey
<
String
>)
{
keyLabel
=
'const Key(
\'
${key.value}
\'
)'
;
...
...
packages/flutter_tools/lib/executable.dart
View file @
2e80bf1d
...
...
@@ -42,7 +42,7 @@ Future<Null> main(List<String> args) async {
(
args
.
length
==
2
&&
verbose
&&
args
.
last
==
'doctor'
);
final
bool
help
=
args
.
contains
(
'-h'
)
||
args
.
contains
(
'--help'
)
||
(
args
.
isNotEmpty
&&
args
.
first
==
'help'
)
||
(
args
.
length
==
1
&&
verbose
);
final
bool
muteCommandLogging
=
(
help
||
doctor
)
;
final
bool
muteCommandLogging
=
help
||
doctor
;
final
bool
verboseHelp
=
help
&&
verbose
;
await
runner
.
run
(
args
,
<
FlutterCommand
>[
...
...
packages/flutter_tools/lib/src/commands/analyze_base.dart
View file @
2e80bf1d
...
...
@@ -42,7 +42,7 @@ abstract class AnalyzeBase {
void
writeBenchmark
(
Stopwatch
stopwatch
,
int
errorCount
,
int
membersMissingDocumentation
)
{
const
String
benchmarkOut
=
'analysis_benchmark.json'
;
final
Map
<
String
,
dynamic
>
data
=
<
String
,
dynamic
>{
'time'
:
(
stopwatch
.
elapsedMilliseconds
/
1000.0
)
,
'time'
:
stopwatch
.
elapsedMilliseconds
/
1000.0
,
'issues'
:
errorCount
,
'missingDartDocs'
:
membersMissingDocumentation
};
...
...
packages/flutter_tools/lib/src/plugins.dart
View file @
2e80bf1d
...
...
@@ -82,7 +82,7 @@ List<Plugin> _findPlugins(String directory) {
bool
_writeFlutterPluginsList
(
String
directory
,
List
<
Plugin
>
plugins
)
{
final
File
pluginsProperties
=
fs
.
file
(
fs
.
path
.
join
(
directory
,
'.flutter-plugins'
));
final
String
previousFlutterPlugins
=
(
pluginsProperties
.
existsSync
()
?
pluginsProperties
.
readAsStringSync
()
:
null
)
;
pluginsProperties
.
existsSync
()
?
pluginsProperties
.
readAsStringSync
()
:
null
;
final
String
pluginManifest
=
plugins
.
map
((
Plugin
p
)
=>
'
${p.name}
=
${escapePath(p.path)}
'
).
join
(
'
\n
'
);
if
(
pluginManifest
.
isNotEmpty
)
{
...
...
@@ -93,7 +93,7 @@ bool _writeFlutterPluginsList(String directory, List<Plugin> plugins) {
}
}
final
String
currentFlutterPlugins
=
(
pluginsProperties
.
existsSync
()
?
pluginsProperties
.
readAsStringSync
()
:
null
)
;
pluginsProperties
.
existsSync
()
?
pluginsProperties
.
readAsStringSync
()
:
null
;
return
currentFlutterPlugins
!=
previousFlutterPlugins
;
}
...
...
packages/flutter_tools/lib/src/vmservice.dart
View file @
2e80bf1d
...
...
@@ -269,7 +269,7 @@ bool _isServiceMap(Map<String, dynamic> m) {
return
(
m
!=
null
)
&&
(
m
[
'type'
]
!=
null
);
}
bool
_hasRef
(
String
type
)
=>
(
type
!=
null
)
&&
type
.
startsWith
(
'@'
);
String
_stripRef
(
String
type
)
=>
(
_hasRef
(
type
)
?
type
.
substring
(
1
)
:
type
)
;
String
_stripRef
(
String
type
)
=>
_hasRef
(
type
)
?
type
.
substring
(
1
)
:
type
;
/// Given a raw response from the service protocol and a [ServiceObjectOwner],
/// recursively walk the response and replace values that are service maps with
...
...
@@ -522,13 +522,13 @@ class ServiceEvent extends ServiceObject {
}
bool
get
isPauseEvent
{
return
(
kind
==
kPauseStart
||
kind
==
kPauseExit
||
kind
==
kPauseBreakpoint
||
kind
==
kPauseInterrupted
||
kind
==
kPauseException
||
kind
==
kPausePostRequest
||
kind
==
kNone
)
;
return
kind
==
kPauseStart
||
kind
==
kPauseExit
||
kind
==
kPauseBreakpoint
||
kind
==
kPauseInterrupted
||
kind
==
kPauseException
||
kind
==
kPausePostRequest
||
kind
==
kNone
;
}
}
...
...
@@ -1192,7 +1192,7 @@ class Isolate extends ServiceObjectOwner {
}
Future
<
bool
>
flutterFrameworkPresent
()
async
{
return
(
await
invokeFlutterExtensionRpcRaw
(
'ext.flutter.frameworkPresent'
)
!=
null
)
;
return
await
invokeFlutterExtensionRpcRaw
(
'ext.flutter.frameworkPresent'
)
!=
null
;
}
Future
<
Map
<
String
,
dynamic
>>
uiWindowScheduleFrame
()
async
{
...
...
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