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
329e52c0
Commit
329e52c0
authored
Mar 08, 2017
by
Alexandre Ardhuin
Committed by
Ian Hickson
Mar 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apply upcoming rule use_collection_literals_when_possible (#8649)
parent
906103dd
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
56 additions
and
59 deletions
+56
-59
overlay_geometry.dart
dev/manual_tests/overlay_geometry.dart
+1
-1
logic.dart
examples/flutter_gallery/lib/demo/calculator/logic.dart
+1
-1
transitions_perf_test.dart
...es/flutter_gallery/test_driver/transitions_perf_test.dart
+1
-1
observer_list.dart
packages/flutter/lib/src/foundation/observer_list.dart
+1
-1
arena.dart
packages/flutter/lib/src/gestures/arena.dart
+2
-2
drag.dart
packages/flutter/lib/src/gestures/drag.dart
+1
-1
multitap.dart
packages/flutter/lib/src/gestures/multitap.dart
+2
-2
pointer_router.dart
packages/flutter/lib/src/gestures/pointer_router.dart
+1
-1
scale.dart
packages/flutter/lib/src/gestures/scale.dart
+2
-2
team.dart
packages/flutter/lib/src/gestures/team.dart
+1
-1
velocity_tracker.dart
packages/flutter/lib/src/gestures/velocity_tracker.dart
+4
-4
dialog.dart
packages/flutter/lib/src/material/dialog.dart
+1
-1
scaffold.dart
packages/flutter/lib/src/material/scaffold.dart
+2
-2
stepper.dart
packages/flutter/lib/src/material/stepper.dart
+1
-1
box_painter.dart
packages/flutter/lib/src/painting/box_painter.dart
+3
-3
box.dart
packages/flutter/lib/src/rendering/box.dart
+1
-1
custom_layout.dart
packages/flutter/lib/src/rendering/custom_layout.dart
+1
-1
table.dart
packages/flutter/lib/src/rendering/table.dart
+2
-2
binding.dart
packages/flutter/lib/src/scheduler/binding.dart
+3
-3
image_cache.dart
packages/flutter/lib/src/services/image_cache.dart
+1
-3
message_codecs.dart
packages/flutter/lib/src/services/message_codecs.dart
+1
-2
drag_target.dart
packages/flutter/lib/src/widgets/drag_target.dart
+2
-2
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+5
-5
navigator.dart
packages/flutter/lib/src/widgets/navigator.dart
+1
-1
overlay.dart
packages/flutter/lib/src/widgets/overlay.dart
+1
-1
listener_test.dart
packages/flutter/test/widgets/listener_test.dart
+1
-1
devfs.dart
packages/flutter_tools/lib/src/devfs.dart
+2
-2
devices.dart
packages/flutter_tools/lib/src/ios/devices.dart
+1
-1
run_hot.dart
packages/flutter_tools/lib/src/run_hot.dart
+2
-2
template.dart
packages/flutter_tools/lib/src/template.dart
+1
-1
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+6
-6
mocks.dart
packages/flutter_tools/test/src/mocks.dart
+1
-1
No files found.
dev/manual_tests/overlay_geometry.dart
View file @
329e52c0
...
...
@@ -134,7 +134,7 @@ class CardBuilder extends SliverChildDelegate {
class
OverlayGeometryAppState
extends
State
<
OverlayGeometryApp
>
{
List
<
CardModel
>
cardModels
;
Map
<
MarkerType
,
Point
>
markers
=
new
Map
<
MarkerType
,
Point
>()
;
Map
<
MarkerType
,
Point
>
markers
=
<
MarkerType
,
Point
>{}
;
double
markersScrollOffset
=
0.0
;
@override
...
...
examples/flutter_gallery/lib/demo/calculator/logic.dart
View file @
329e52c0
...
...
@@ -303,7 +303,7 @@ class CalcExpression {
assert
(
false
);
}
}
final
List
<
ExpressionToken
>
outList
=
new
List
<
ExpressionToken
>()
;
final
List
<
ExpressionToken
>
outList
=
<
ExpressionToken
>[]
;
outList
.
add
(
new
ResultToken
(
currentTermValue
));
return
new
CalcExpression
(
outList
,
ExpressionState
.
Result
);
}
...
...
examples/flutter_gallery/test_driver/transitions_perf_test.dart
View file @
329e52c0
...
...
@@ -82,7 +82,7 @@ Future<Null> saveDurationsHistogram(List<Map<String, dynamic>> events, String ou
startEvent
=
event
;
}
else
if
(
startEvent
!=
null
&&
eventName
==
'Frame'
)
{
final
String
routeName
=
startEvent
[
'args'
][
'to'
];
durations
[
routeName
]
??=
new
List
<
int
>()
;
durations
[
routeName
]
??=
<
int
>[]
;
durations
[
routeName
].
add
(
event
[
'dur'
]);
startEvent
=
null
;
}
...
...
packages/flutter/lib/src/foundation/observer_list.dart
View file @
329e52c0
...
...
@@ -9,7 +9,7 @@ import 'dart:collection';
/// Consider using an [ObserverList] instead of a [List] when the number of
/// [contains] calls dominates the number of [add] and [remove] calls.
class
ObserverList
<
T
>
extends
Iterable
<
T
>
{
final
List
<
T
>
_list
=
new
List
<
T
>()
;
final
List
<
T
>
_list
=
<
T
>[]
;
bool
_isDirty
=
false
;
HashSet
<
T
>
_set
;
...
...
packages/flutter/lib/src/gestures/arena.dart
View file @
329e52c0
...
...
@@ -49,7 +49,7 @@ class GestureArenaEntry {
}
class
_GestureArena
{
final
List
<
GestureArenaMember
>
members
=
new
List
<
GestureArenaMember
>()
;
final
List
<
GestureArenaMember
>
members
=
<
GestureArenaMember
>[]
;
bool
isOpen
=
true
;
bool
isHeld
=
false
;
bool
hasPendingSweep
=
false
;
...
...
@@ -71,7 +71,7 @@ class _GestureArena {
/// See [https://flutter.io/gestures/#gesture-disambiguation] for more
/// information about the role this class plays in the gesture system.
class
GestureArenaManager
{
final
Map
<
int
,
_GestureArena
>
_arenas
=
new
Map
<
int
,
_GestureArena
>()
;
final
Map
<
int
,
_GestureArena
>
_arenas
=
<
int
,
_GestureArena
>{}
;
/// Adds a new member (e.g., gesture recognizer) to the arena.
GestureArenaEntry
add
(
int
pointer
,
GestureArenaMember
member
)
{
...
...
packages/flutter/lib/src/gestures/drag.dart
View file @
329e52c0
...
...
@@ -264,7 +264,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer {
double
_getPrimaryValueFromOffset
(
Offset
value
);
bool
get
_hasSufficientPendingDragDeltaToAccept
;
Map
<
int
,
VelocityTracker
>
_velocityTrackers
=
new
Map
<
int
,
VelocityTracker
>()
;
Map
<
int
,
VelocityTracker
>
_velocityTrackers
=
<
int
,
VelocityTracker
>{}
;
@override
void
addPointer
(
PointerEvent
event
)
{
...
...
packages/flutter/lib/src/gestures/multitap.dart
View file @
329e52c0
...
...
@@ -94,7 +94,7 @@ class DoubleTapGestureRecognizer extends GestureRecognizer {
Timer
_doubleTapTimer
;
_TapTracker
_firstTap
;
final
Map
<
int
,
_TapTracker
>
_trackers
=
new
Map
<
int
,
_TapTracker
>()
;
final
Map
<
int
,
_TapTracker
>
_trackers
=
<
int
,
_TapTracker
>{}
;
@override
void
addPointer
(
PointerEvent
event
)
{
...
...
@@ -341,7 +341,7 @@ class MultiTapGestureRecognizer extends GestureRecognizer {
/// particular location after [longTapDelay].
GestureMultiTapDownCallback
onLongTapDown
;
final
Map
<
int
,
_TapGesture
>
_gestureMap
=
new
Map
<
int
,
_TapGesture
>()
;
final
Map
<
int
,
_TapGesture
>
_gestureMap
=
<
int
,
_TapGesture
>{}
;
@override
void
addPointer
(
PointerEvent
event
)
{
...
...
packages/flutter/lib/src/gestures/pointer_router.dart
View file @
329e52c0
...
...
@@ -13,7 +13,7 @@ typedef void PointerRoute(PointerEvent event);
/// A routing table for [PointerEvent] events.
class
PointerRouter
{
final
Map
<
int
,
LinkedHashSet
<
PointerRoute
>>
_routeMap
=
new
Map
<
int
,
LinkedHashSet
<
PointerRoute
>>()
;
final
Map
<
int
,
LinkedHashSet
<
PointerRoute
>>
_routeMap
=
<
int
,
LinkedHashSet
<
PointerRoute
>>{}
;
final
LinkedHashSet
<
PointerRoute
>
_globalRoutes
=
new
LinkedHashSet
<
PointerRoute
>();
/// Adds a route to the routing table.
...
...
packages/flutter/lib/src/gestures/scale.dart
View file @
329e52c0
...
...
@@ -115,7 +115,7 @@ class ScaleGestureRecognizer extends OneSequenceGestureRecognizer {
double
_initialSpan
;
double
_currentSpan
;
Map
<
int
,
Point
>
_pointerLocations
;
Map
<
int
,
VelocityTracker
>
_velocityTrackers
=
new
Map
<
int
,
VelocityTracker
>()
;
Map
<
int
,
VelocityTracker
>
_velocityTrackers
=
<
int
,
VelocityTracker
>{}
;
double
get
_scaleFactor
=>
_initialSpan
>
0.0
?
_currentSpan
/
_initialSpan
:
1.0
;
...
...
@@ -127,7 +127,7 @@ class ScaleGestureRecognizer extends OneSequenceGestureRecognizer {
_state
=
ScaleState
.
possible
;
_initialSpan
=
0.0
;
_currentSpan
=
0.0
;
_pointerLocations
=
new
Map
<
int
,
Point
>()
;
_pointerLocations
=
<
int
,
Point
>{}
;
}
}
...
...
packages/flutter/lib/src/gestures/team.dart
View file @
329e52c0
...
...
@@ -90,7 +90,7 @@ class _CombiningGestureArenaMember extends GestureArenaMember {
/// To assign a gesture recognizer to a team, see
/// [OneSequenceGestureRecognizer.team].
class
GestureArenaTeam
{
final
Map
<
int
,
_CombiningGestureArenaMember
>
_combiners
=
new
Map
<
int
,
_CombiningGestureArenaMember
>()
;
final
Map
<
int
,
_CombiningGestureArenaMember
>
_combiners
=
<
int
,
_CombiningGestureArenaMember
>{}
;
/// Adds a new member to the arena on behalf of this team.
///
...
...
packages/flutter/lib/src/gestures/velocity_tracker.dart
View file @
329e52c0
...
...
@@ -63,10 +63,10 @@ class _LeastSquaresVelocityTrackerStrategy extends _VelocityTrackerStrategy {
@override
_Estimate
getEstimate
()
{
// Iterate over movement samples in reverse time order and collect samples.
final
List
<
double
>
x
=
new
List
<
double
>()
;
final
List
<
double
>
y
=
new
List
<
double
>()
;
final
List
<
double
>
w
=
new
List
<
double
>()
;
final
List
<
double
>
time
=
new
List
<
double
>()
;
final
List
<
double
>
x
=
<
double
>[]
;
final
List
<
double
>
y
=
<
double
>[]
;
final
List
<
double
>
w
=
<
double
>[]
;
final
List
<
double
>
time
=
<
double
>[]
;
int
m
=
0
;
int
index
=
_index
;
...
...
packages/flutter/lib/src/material/dialog.dart
View file @
329e52c0
...
...
@@ -134,7 +134,7 @@ class AlertDialog extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
final
List
<
Widget
>
children
=
new
List
<
Widget
>()
;
final
List
<
Widget
>
children
=
<
Widget
>[]
;
if
(
title
!=
null
)
{
children
.
add
(
new
Padding
(
...
...
packages/flutter/lib/src/material/scaffold.dart
View file @
329e52c0
...
...
@@ -233,7 +233,7 @@ class _FloatingActionButtonTransitionState extends State<_FloatingActionButtonTr
@override
Widget
build
(
BuildContext
context
)
{
final
List
<
Widget
>
children
=
new
List
<
Widget
>()
;
final
List
<
Widget
>
children
=
<
Widget
>[]
;
if
(
_previousAnimation
.
status
!=
AnimationStatus
.
dismissed
)
{
children
.
add
(
new
ScaleTransition
(
scale:
_previousAnimation
,
...
...
@@ -777,7 +777,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin {
}
}
final
List
<
LayoutId
>
children
=
new
List
<
LayoutId
>()
;
final
List
<
LayoutId
>
children
=
<
LayoutId
>[]
;
_addIfNonNull
(
children
,
config
.
body
,
_ScaffoldSlot
.
body
);
...
...
packages/flutter/lib/src/material/stepper.dart
View file @
329e52c0
...
...
@@ -178,7 +178,7 @@ class Stepper extends StatefulWidget {
class
_StepperState
extends
State
<
Stepper
>
with
TickerProviderStateMixin
{
List
<
GlobalKey
>
_keys
;
final
Map
<
int
,
StepState
>
_oldStates
=
new
Map
<
int
,
StepState
>()
;
final
Map
<
int
,
StepState
>
_oldStates
=
<
int
,
StepState
>{}
;
@override
void
initState
()
{
...
...
packages/flutter/lib/src/painting/box_painter.dart
View file @
329e52c0
...
...
@@ -578,10 +578,10 @@ class BoxShadow {
if
(
a
==
null
&&
b
==
null
)
return
null
;
if
(
a
==
null
)
a
=
new
List
<
BoxShadow
>()
;
a
=
<
BoxShadow
>[]
;
if
(
b
==
null
)
b
=
new
List
<
BoxShadow
>()
;
final
List
<
BoxShadow
>
result
=
new
List
<
BoxShadow
>()
;
b
=
<
BoxShadow
>[]
;
final
List
<
BoxShadow
>
result
=
<
BoxShadow
>[]
;
final
int
commonLength
=
math
.
min
(
a
.
length
,
b
.
length
);
for
(
int
i
=
0
;
i
<
commonLength
;
++
i
)
result
.
add
(
BoxShadow
.
lerp
(
a
[
i
],
b
[
i
],
t
));
...
...
packages/flutter/lib/src/rendering/box.dart
View file @
329e52c0
...
...
@@ -1483,7 +1483,7 @@ abstract class RenderBox extends RenderObject {
double
getDistanceToActualBaseline
(
TextBaseline
baseline
)
{
assert
(
_debugDoingBaseline
);
if
(
_cachedBaselines
==
null
)
_cachedBaselines
=
new
Map
<
TextBaseline
,
double
>()
;
_cachedBaselines
=
<
TextBaseline
,
double
>{}
;
_cachedBaselines
.
putIfAbsent
(
baseline
,
()
=>
computeDistanceToActualBaseline
(
baseline
));
return
_cachedBaselines
[
baseline
];
}
...
...
packages/flutter/lib/src/rendering/custom_layout.dart
View file @
329e52c0
...
...
@@ -170,7 +170,7 @@ abstract class MultiChildLayoutDelegate {
});
try
{
_idToChild
=
new
Map
<
Object
,
RenderBox
>()
;
_idToChild
=
<
Object
,
RenderBox
>{}
;
RenderBox
child
=
firstChild
;
while
(
child
!=
null
)
{
final
MultiChildLayoutParentData
childParentData
=
child
.
parentData
;
...
...
packages/flutter/lib/src/rendering/table.dart
View file @
329e52c0
...
...
@@ -494,7 +494,7 @@ class RenderTable extends RenderBox {
assert
(
configuration
!=
null
);
_columns
=
columns
??
(
children
!=
null
&&
children
.
isNotEmpty
?
children
.
first
.
length
:
0
);
_rows
=
rows
??
0
;
_children
=
new
List
<
RenderBox
>()
..
length
=
_columns
*
_rows
;
_children
=
<
RenderBox
>[]
..
length
=
_columns
*
_rows
;
_columnWidths
=
columnWidths
??
new
HashMap
<
int
,
TableColumnWidth
>();
_defaultColumnWidth
=
defaultColumnWidth
;
_border
=
border
;
...
...
@@ -529,7 +529,7 @@ class RenderTable extends RenderBox {
final
int
oldColumns
=
columns
;
final
List
<
RenderBox
>
oldChildren
=
_children
;
_columns
=
value
;
_children
=
new
List
<
RenderBox
>()
..
length
=
columns
*
rows
;
_children
=
<
RenderBox
>[]
..
length
=
columns
*
rows
;
final
int
columnsToCopy
=
math
.
min
(
columns
,
oldColumns
);
for
(
int
y
=
0
;
y
<
rows
;
y
+=
1
)
{
for
(
int
x
=
0
;
x
<
columnsToCopy
;
x
+=
1
)
...
...
packages/flutter/lib/src/scheduler/binding.dart
View file @
329e52c0
...
...
@@ -402,7 +402,7 @@ abstract class SchedulerBinding extends BindingBase {
});
}
final
List
<
FrameCallback
>
_persistentCallbacks
=
new
List
<
FrameCallback
>()
;
final
List
<
FrameCallback
>
_persistentCallbacks
=
<
FrameCallback
>[]
;
/// Adds a persistent frame callback.
///
...
...
@@ -420,7 +420,7 @@ abstract class SchedulerBinding extends BindingBase {
_persistentCallbacks
.
add
(
callback
);
}
final
List
<
FrameCallback
>
_postFrameCallbacks
=
new
List
<
FrameCallback
>()
;
final
List
<
FrameCallback
>
_postFrameCallbacks
=
<
FrameCallback
>[]
;
/// Schedule a callback for the end of this frame.
///
...
...
@@ -637,7 +637,7 @@ abstract class SchedulerBinding extends BindingBase {
Timeline
.
startSync
(
'Animate'
);
assert
(
schedulerPhase
==
SchedulerPhase
.
transientCallbacks
);
final
Map
<
int
,
_FrameCallbackEntry
>
callbacks
=
_transientCallbacks
;
_transientCallbacks
=
new
Map
<
int
,
_FrameCallbackEntry
>()
;
_transientCallbacks
=
<
int
,
_FrameCallbackEntry
>{}
;
callbacks
.
forEach
((
int
id
,
_FrameCallbackEntry
callbackEntry
)
{
if
(!
_removedIds
.
contains
(
id
))
_invokeFrameCallback
(
callbackEntry
.
callback
,
timeStamp
,
callbackEntry
.
debugStack
);
...
...
packages/flutter/lib/src/services/image_cache.dart
View file @
329e52c0
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:collection'
;
import
'image_stream.dart'
;
const
int
_kDefaultSize
=
1000
;
...
...
@@ -27,7 +25,7 @@ const int _kDefaultSize = 1000;
/// Generally this class is not used directly. The [ImageProvider] class and its
/// subclasses automatically handle the caching of images.
class
ImageCache
{
final
LinkedHashMap
<
Object
,
ImageStreamCompleter
>
_cache
=
new
LinkedHashMap
<
Object
,
ImageStreamCompleter
>()
;
final
Map
<
Object
,
ImageStreamCompleter
>
_cache
=
<
Object
,
ImageStreamCompleter
>{}
;
/// Maximum number of entries to store in the cache.
///
...
...
packages/flutter/lib/src/services/message_codecs.dart
View file @
329e52c0
...
...
@@ -358,7 +358,7 @@ class StandardMessageCodec implements MessageCodec<dynamic> {
break
;
case
_kMap:
final
int
length
=
_readSize
(
buffer
);
result
=
new
Map
<
dynamic
,
dynamic
>()
;
result
=
<
dynamic
,
dynamic
>{}
;
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
result
[
_readValue
(
buffer
)]
=
_readValue
(
buffer
);
}
...
...
@@ -418,4 +418,3 @@ class StandardMethodCodec implements MethodCodec {
throw
new
FormatException
(
'Invalid envelope'
);
}
}
packages/flutter/lib/src/widgets/drag_target.dart
View file @
329e52c0
...
...
@@ -380,8 +380,8 @@ List<T> _mapAvatarsToData<T>(List<_DragAvatar<T>> avatars) {
}
class
_DragTargetState
<
T
>
extends
State
<
DragTarget
<
T
>>
{
final
List
<
_DragAvatar
<
T
>>
_candidateAvatars
=
new
List
<
_DragAvatar
<
T
>>()
;
final
List
<
_DragAvatar
<
dynamic
>>
_rejectedAvatars
=
new
List
<
_DragAvatar
<
dynamic
>>()
;
final
List
<
_DragAvatar
<
T
>>
_candidateAvatars
=
<
_DragAvatar
<
T
>>[]
;
final
List
<
_DragAvatar
<
dynamic
>>
_rejectedAvatars
=
<
_DragAvatar
<
dynamic
>>[]
;
bool
didEnter
(
_DragAvatar
<
dynamic
>
avatar
)
{
assert
(!
_candidateAvatars
.
contains
(
avatar
));
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
329e52c0
...
...
@@ -167,11 +167,11 @@ abstract class GlobalKey<T extends State<StatefulWidget>> extends Key {
/// constructor.
const
GlobalKey
.
constructor
()
:
super
.
_
();
static
final
Map
<
GlobalKey
,
Element
>
_registry
=
new
Map
<
GlobalKey
,
Element
>()
;
static
final
Map
<
GlobalKey
,
Set
<
GlobalKeyRemoveListener
>>
_removeListeners
=
new
Map
<
GlobalKey
,
Set
<
GlobalKeyRemoveListener
>>()
;
static
final
Map
<
GlobalKey
,
Element
>
_registry
=
<
GlobalKey
,
Element
>{}
;
static
final
Map
<
GlobalKey
,
Set
<
GlobalKeyRemoveListener
>>
_removeListeners
=
<
GlobalKey
,
Set
<
GlobalKeyRemoveListener
>>{}
;
static
final
Set
<
GlobalKey
>
_removedKeys
=
new
HashSet
<
GlobalKey
>();
static
final
Set
<
Element
>
_debugIllFatedElements
=
new
HashSet
<
Element
>();
static
final
Map
<
GlobalKey
,
Element
>
_debugReservations
=
new
Map
<
GlobalKey
,
Element
>()
;
static
final
Map
<
GlobalKey
,
Element
>
_debugReservations
=
<
GlobalKey
,
Element
>{}
;
void
_register
(
Element
element
)
{
assert
(()
{
...
...
@@ -3421,7 +3421,7 @@ class InheritedElement extends ProxyElement {
if
(
incomingWidgets
!=
null
)
_inheritedWidgets
=
new
Map
<
Type
,
InheritedElement
>.
from
(
incomingWidgets
);
else
_inheritedWidgets
=
new
Map
<
Type
,
InheritedElement
>()
;
_inheritedWidgets
=
<
Type
,
InheritedElement
>{}
;
_inheritedWidgets
[
widget
.
runtimeType
]
=
this
;
}
...
...
@@ -3789,7 +3789,7 @@ abstract class RenderObjectElement extends BuildableElement {
final
bool
haveOldChildren
=
oldChildrenTop
<=
oldChildrenBottom
;
Map
<
Key
,
Element
>
oldKeyedChildren
;
if
(
haveOldChildren
)
{
oldKeyedChildren
=
new
Map
<
Key
,
Element
>()
;
oldKeyedChildren
=
<
Key
,
Element
>{}
;
while
(
oldChildrenTop
<=
oldChildrenBottom
)
{
final
Element
oldChild
=
replaceWithNullIfForgotten
(
oldChildren
[
oldChildrenTop
]);
assert
(
oldChild
==
null
||
oldChild
.
_debugLifecycleState
==
_ElementLifecycle
.
active
);
...
...
packages/flutter/lib/src/widgets/navigator.dart
View file @
329e52c0
...
...
@@ -697,7 +697,7 @@ class Navigator extends StatefulWidget {
/// The state for a [Navigator] widget.
class
NavigatorState
extends
State
<
Navigator
>
with
TickerProviderStateMixin
{
final
GlobalKey
<
OverlayState
>
_overlayKey
=
new
GlobalKey
<
OverlayState
>();
final
List
<
Route
<
dynamic
>>
_history
=
new
List
<
Route
<
dynamic
>>()
;
final
List
<
Route
<
dynamic
>>
_history
=
<
Route
<
dynamic
>>[]
;
final
Set
<
Route
<
dynamic
>>
_poppedRoutes
=
new
Set
<
Route
<
dynamic
>>();
@override
...
...
packages/flutter/lib/src/widgets/overlay.dart
View file @
329e52c0
...
...
@@ -266,7 +266,7 @@ class Overlay extends StatefulWidget {
/// Used to insert [OverlayEntry]s into the overlay using the [insert] and
/// [insertAll] functions.
class
OverlayState
extends
State
<
Overlay
>
with
TickerProviderStateMixin
{
final
List
<
OverlayEntry
>
_entries
=
new
List
<
OverlayEntry
>()
;
final
List
<
OverlayEntry
>
_entries
=
<
OverlayEntry
>[]
;
@override
void
initState
()
{
...
...
packages/flutter/test/widgets/listener_test.dart
View file @
329e52c0
...
...
@@ -7,7 +7,7 @@ import 'package:flutter/widgets.dart';
void
main
(
)
{
testWidgets
(
'Events bubble up the tree'
,
(
WidgetTester
tester
)
async
{
final
List
<
String
>
log
=
new
List
<
String
>()
;
final
List
<
String
>
log
=
<
String
>[]
;
await
tester
.
pumpWidget
(
new
Listener
(
...
...
packages/flutter_tools/lib/src/devfs.dart
View file @
329e52c0
...
...
@@ -330,7 +330,7 @@ class DevFS {
final
Set
<
String
>
assetPathsToEvict
=
new
Set
<
String
>();
final
List
<
Future
<
Map
<
String
,
dynamic
>>>
_pendingOperations
=
new
List
<
Future
<
Map
<
String
,
dynamic
>>>()
;
<
Future
<
Map
<
String
,
dynamic
>>>[]
;
Uri
_baseUri
;
Uri
get
baseUri
=>
_baseUri
;
...
...
@@ -376,7 +376,7 @@ class DevFS {
// Handle deletions.
printTrace
(
'Scanning for deleted files'
);
final
String
assetBuildDirPrefix
=
_asUriPath
(
getAssetBuildDirectory
());
final
List
<
Uri
>
toRemove
=
new
List
<
Uri
>()
;
final
List
<
Uri
>
toRemove
=
<
Uri
>[]
;
_entries
.
forEach
((
Uri
deviceUri
,
DevFSContent
content
)
{
if
(!
content
.
_exists
)
{
final
Future
<
Map
<
String
,
dynamic
>>
operation
=
...
...
packages/flutter_tools/lib/src/ios/devices.dart
View file @
329e52c0
...
...
@@ -434,7 +434,7 @@ class _IOSDeviceLogReader extends DeviceLogReader {
}
class
_IOSDevicePortForwarder
extends
DevicePortForwarder
{
_IOSDevicePortForwarder
(
this
.
device
)
:
_forwardedPorts
=
new
List
<
ForwardedPort
>()
;
_IOSDevicePortForwarder
(
this
.
device
)
:
_forwardedPorts
=
<
ForwardedPort
>[]
;
final
IOSDevice
device
;
...
...
packages/flutter_tools/lib/src/run_hot.dart
View file @
329e52c0
...
...
@@ -61,7 +61,7 @@ class HotRunner extends ResidentRunner {
Uri
_observatoryUri
;
final
bool
benchmarkMode
;
final
Map
<
String
,
int
>
benchmarkData
=
new
Map
<
String
,
int
>()
;
final
Map
<
String
,
int
>
benchmarkData
=
<
String
,
int
>{}
;
// The initial launch is from a snapshot.
bool
_runningFromSnapshot
=
true
;
String
kernelFilePath
;
...
...
@@ -141,7 +141,7 @@ class HotRunner extends ResidentRunner {
return
1
;
}
final
Map
<
String
,
dynamic
>
platformArgs
=
new
Map
<
String
,
dynamic
>()
;
final
Map
<
String
,
dynamic
>
platformArgs
=
<
String
,
dynamic
>{}
;
await
startEchoingDeviceLog
(
package
);
...
...
packages/flutter_tools/lib/src/template.dart
View file @
329e52c0
...
...
@@ -24,7 +24,7 @@ const String _kCopyTemplateExtension = '.copy.tmpl';
/// extensions.
class
Template
{
Template
(
Directory
templateSource
,
Directory
baseDir
)
{
_templateFilePaths
=
new
Map
<
String
,
String
>()
;
_templateFilePaths
=
<
String
,
String
>{}
;
if
(!
templateSource
.
existsSync
())
{
return
;
...
...
packages/flutter_tools/lib/src/vmservice.dart
View file @
329e52c0
...
...
@@ -505,14 +505,14 @@ class VM extends ServiceObjectOwner {
_removeDeadIsolates
(
map
[
'isolates'
]);
}
final
Map
<
String
,
ServiceObject
>
_cache
=
new
Map
<
String
,
ServiceObject
>()
;
final
Map
<
String
,
Isolate
>
_isolateCache
=
new
Map
<
String
,
Isolate
>()
;
final
Map
<
String
,
ServiceObject
>
_cache
=
<
String
,
ServiceObject
>{}
;
final
Map
<
String
,
Isolate
>
_isolateCache
=
<
String
,
Isolate
>{}
;
/// The list of live isolates, ordered by isolate start time.
final
List
<
Isolate
>
isolates
=
new
List
<
Isolate
>()
;
final
List
<
Isolate
>
isolates
=
<
Isolate
>[]
;
/// The set of live views.
final
Map
<
String
,
FlutterView
>
_viewCache
=
new
Map
<
String
,
FlutterView
>()
;
final
Map
<
String
,
FlutterView
>
_viewCache
=
<
String
,
FlutterView
>{}
;
int
_compareIsolates
(
Isolate
a
,
Isolate
b
)
{
final
DateTime
aStart
=
a
.
startTime
;
...
...
@@ -767,7 +767,7 @@ class Isolate extends ServiceObjectOwner {
DateTime
startTime
;
ServiceEvent
pauseEvent
;
final
Map
<
String
,
ServiceObject
>
_cache
=
new
Map
<
String
,
ServiceObject
>()
;
final
Map
<
String
,
ServiceObject
>
_cache
=
<
String
,
ServiceObject
>{}
;
@override
ServiceObject
getFromMap
(
Map
<
String
,
dynamic
>
map
)
{
...
...
@@ -967,7 +967,7 @@ class Isolate extends ServiceObjectOwner {
class
ServiceMap
extends
ServiceObject
implements
Map
<
String
,
dynamic
>
{
ServiceMap
.
_empty
(
ServiceObjectOwner
owner
)
:
super
.
_empty
(
owner
);
final
Map
<
String
,
dynamic
>
_map
=
new
Map
<
String
,
dynamic
>()
;
final
Map
<
String
,
dynamic
>
_map
=
<
String
,
dynamic
>{}
;
@override
void
_update
(
Map
<
String
,
dynamic
>
map
,
bool
mapIsRef
)
{
...
...
packages/flutter_tools/test/src/mocks.dart
View file @
329e52c0
...
...
@@ -77,7 +77,7 @@ void applyMocksToCommand(FlutterCommand command) {
/// Common functionality for tracking mock interaction
class
BasicMock
{
final
List
<
String
>
messages
=
new
List
<
String
>()
;
final
List
<
String
>
messages
=
<
String
>[]
;
void
expectMessages
(
List
<
String
>
expectedMessages
)
{
final
List
<
String
>
actualMessages
=
new
List
<
String
>.
from
(
messages
);
...
...
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