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
e4a1d3e1
Unverified
Commit
e4a1d3e1
authored
Dec 07, 2021
by
Dan Field
Committed by
GitHub
Dec 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefer .of to .from (#94772)
parent
ac6b5951
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
38 additions
and
38 deletions
+38
-38
listener_helpers.dart
packages/flutter/lib/src/animation/listener_helpers.dart
+2
-2
tab_view.dart
packages/flutter/lib/src/cupertino/tab_view.dart
+1
-1
basic_types.dart
packages/flutter/lib/src/foundation/basic_types.dart
+1
-1
multitap.dart
packages/flutter/lib/src/gestures/multitap.dart
+1
-1
pointer_router.dart
packages/flutter/lib/src/gestures/pointer_router.dart
+2
-2
recognizer.dart
packages/flutter/lib/src/gestures/recognizer.dart
+1
-1
dropdown.dart
packages/flutter/lib/src/material/dropdown.dart
+2
-2
mergeable_material.dart
packages/flutter/lib/src/material/mergeable_material.dart
+1
-1
tabs.dart
packages/flutter/lib/src/material/tabs.dart
+1
-1
image_stream.dart
packages/flutter/lib/src/painting/image_stream.dart
+1
-1
table.dart
packages/flutter/lib/src/rendering/table.dart
+1
-1
binding.dart
packages/flutter/lib/src/scheduler/binding.dart
+3
-3
semantics.dart
packages/flutter/lib/src/semantics/semantics.dart
+5
-5
raw_keyboard.dart
packages/flutter/lib/src/services/raw_keyboard.dart
+1
-1
actions.dart
packages/flutter/lib/src/widgets/actions.dart
+1
-1
binding.dart
packages/flutter/lib/src/widgets/binding.dart
+3
-3
focus_manager.dart
packages/flutter/lib/src/widgets/focus_manager.dart
+1
-1
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+2
-2
localizations.dart
packages/flutter/lib/src/widgets/localizations.dart
+1
-1
overlay.dart
packages/flutter/lib/src/widgets/overlay.dart
+1
-1
routes.dart
packages/flutter/lib/src/widgets/routes.dart
+1
-1
scroll_controller.dart
packages/flutter/lib/src/widgets/scroll_controller.dart
+1
-1
scroll_notification_observer.dart
...flutter/lib/src/widgets/scroll_notification_observer.dart
+1
-1
shared_app_data.dart
packages/flutter/lib/src/widgets/shared_app_data.dart
+1
-1
shortcuts.dart
packages/flutter/lib/src/widgets/shortcuts.dart
+1
-1
sliver.dart
packages/flutter/lib/src/widgets/sliver.dart
+1
-1
No files found.
packages/flutter/lib/src/animation/listener_helpers.dart
View file @
e4a1d3e1
...
...
@@ -137,7 +137,7 @@ mixin AnimationLocalListenersMixin {
@protected
@pragma
(
'vm:notify-debugger-on-exception'
)
void
notifyListeners
()
{
final
List
<
VoidCallback
>
localListeners
=
List
<
VoidCallback
>.
from
(
_listeners
);
final
List
<
VoidCallback
>
localListeners
=
List
<
VoidCallback
>.
of
(
_listeners
);
for
(
final
VoidCallback
listener
in
localListeners
)
{
InformationCollector
?
collector
;
assert
(()
{
...
...
@@ -226,7 +226,7 @@ mixin AnimationLocalStatusListenersMixin {
@protected
@pragma
(
'vm:notify-debugger-on-exception'
)
void
notifyStatusListeners
(
AnimationStatus
status
)
{
final
List
<
AnimationStatusListener
>
localListeners
=
List
<
AnimationStatusListener
>.
from
(
_statusListeners
);
final
List
<
AnimationStatusListener
>
localListeners
=
List
<
AnimationStatusListener
>.
of
(
_statusListeners
);
for
(
final
AnimationStatusListener
listener
in
localListeners
)
{
try
{
if
(
_statusListeners
.
contains
(
listener
))
...
...
packages/flutter/lib/src/cupertino/tab_view.dart
View file @
e4a1d3e1
...
...
@@ -159,7 +159,7 @@ class _CupertinoTabViewState extends State<CupertinoTabView> {
void
_updateObservers
()
{
_navigatorObservers
=
List
<
NavigatorObserver
>.
from
(
widget
.
navigatorObservers
)
List
<
NavigatorObserver
>.
of
(
widget
.
navigatorObservers
)
..
add
(
_heroController
);
}
...
...
packages/flutter/lib/src/foundation/basic_types.dart
View file @
e4a1d3e1
...
...
@@ -179,7 +179,7 @@ class CachingIterable<E> extends IterableBase<E> {
@override
List
<
E
>
toList
({
bool
growable
=
true
})
{
_precacheEntireList
();
return
List
<
E
>.
from
(
_results
,
growable:
growable
);
return
List
<
E
>.
of
(
_results
,
growable:
growable
);
}
void
_precacheEntireList
()
{
...
...
packages/flutter/lib/src/gestures/multitap.dart
View file @
e4a1d3e1
...
...
@@ -583,7 +583,7 @@ class MultiTapGestureRecognizer extends GestureRecognizer {
@override
void
dispose
()
{
final
List
<
_TapGesture
>
localGestures
=
List
<
_TapGesture
>.
from
(
_gestureMap
.
values
);
final
List
<
_TapGesture
>
localGestures
=
List
<
_TapGesture
>.
of
(
_gestureMap
.
values
);
for
(
final
_TapGesture
gesture
in
localGestures
)
gesture
.
cancel
();
// Rejection of each gesture should cause it to be removed from our map
...
...
packages/flutter/lib/src/gestures/pointer_router.dart
View file @
e4a1d3e1
...
...
@@ -118,12 +118,12 @@ class PointerRouter {
/// PointerRouter object.
void
route
(
PointerEvent
event
)
{
final
Map
<
PointerRoute
,
Matrix4
?>?
routes
=
_routeMap
[
event
.
pointer
];
final
Map
<
PointerRoute
,
Matrix4
?>
copiedGlobalRoutes
=
Map
<
PointerRoute
,
Matrix4
?>.
from
(
_globalRoutes
);
final
Map
<
PointerRoute
,
Matrix4
?>
copiedGlobalRoutes
=
Map
<
PointerRoute
,
Matrix4
?>.
of
(
_globalRoutes
);
if
(
routes
!=
null
)
{
_dispatchEventToRoutes
(
event
,
routes
,
Map
<
PointerRoute
,
Matrix4
?>.
from
(
routes
),
Map
<
PointerRoute
,
Matrix4
?>.
of
(
routes
),
);
}
_dispatchEventToRoutes
(
event
,
_globalRoutes
,
copiedGlobalRoutes
);
...
...
packages/flutter/lib/src/gestures/recognizer.dart
View file @
e4a1d3e1
...
...
@@ -300,7 +300,7 @@ abstract class OneSequenceGestureRecognizer extends GestureRecognizer {
@protected
@mustCallSuper
void
resolve
(
GestureDisposition
disposition
)
{
final
List
<
GestureArenaEntry
>
localEntries
=
List
<
GestureArenaEntry
>.
from
(
_entries
.
values
);
final
List
<
GestureArenaEntry
>
localEntries
=
List
<
GestureArenaEntry
>.
of
(
_entries
.
values
);
_entries
.
clear
();
for
(
final
GestureArenaEntry
entry
in
localEntries
)
entry
.
resolve
(
disposition
);
...
...
packages/flutter/lib/src/material/dropdown.dart
View file @
e4a1d3e1
...
...
@@ -1360,8 +1360,8 @@ class _DropdownButtonState<T> extends State<DropdownButton<T>> with WidgetsBindi
// otherwise, no explicit type adding items maybe trigger a crash/failure
// when hint and selectedItemBuilder are provided.
final
List
<
Widget
>
items
=
widget
.
selectedItemBuilder
==
null
?
(
widget
.
items
!=
null
?
List
<
Widget
>.
from
(
widget
.
items
!)
:
<
Widget
>[])
:
List
<
Widget
>.
from
(
widget
.
selectedItemBuilder
!(
context
));
?
(
widget
.
items
!=
null
?
List
<
Widget
>.
of
(
widget
.
items
!)
:
<
Widget
>[])
:
List
<
Widget
>.
of
(
widget
.
selectedItemBuilder
!(
context
));
int
?
hintIndex
;
if
(
widget
.
hint
!=
null
||
(!
_enabled
&&
widget
.
disabledHint
!=
null
))
{
...
...
packages/flutter/lib/src/material/mergeable_material.dart
View file @
e4a1d3e1
...
...
@@ -168,7 +168,7 @@ class _MergeableMaterialState extends State<MergeableMaterial> with TickerProvid
@override
void
initState
()
{
super
.
initState
();
_children
=
List
<
MergeableMaterialItem
>.
from
(
widget
.
children
);
_children
=
List
<
MergeableMaterialItem
>.
of
(
widget
.
children
);
for
(
int
i
=
0
;
i
<
_children
.
length
;
i
+=
1
)
{
final
MergeableMaterialItem
child
=
_children
[
i
];
...
...
packages/flutter/lib/src/material/tabs.dart
View file @
e4a1d3e1
...
...
@@ -1419,7 +1419,7 @@ class _TabBarViewState extends State<TabBarView> {
setState
(()
{
_warpUnderwayCount
+=
1
;
_childrenWithKey
=
List
<
Widget
>.
from
(
_childrenWithKey
,
growable:
false
);
_childrenWithKey
=
List
<
Widget
>.
of
(
_childrenWithKey
,
growable:
false
);
final
Widget
temp
=
_childrenWithKey
[
initialPage
];
_childrenWithKey
[
initialPage
]
=
_childrenWithKey
[
previousIndex
];
_childrenWithKey
[
previousIndex
]
=
temp
;
...
...
packages/flutter/lib/src/painting/image_stream.dart
View file @
e4a1d3e1
...
...
@@ -627,7 +627,7 @@ abstract class ImageStreamCompleter with Diagnosticable {
return
;
// Make a copy to allow for concurrent modification.
final
List
<
ImageStreamListener
>
localListeners
=
List
<
ImageStreamListener
>.
from
(
_listeners
);
List
<
ImageStreamListener
>.
of
(
_listeners
);
for
(
final
ImageStreamListener
listener
in
localListeners
)
{
try
{
listener
.
onImage
(
image
.
clone
(),
false
);
...
...
packages/flutter/lib/src/rendering/table.dart
View file @
e4a1d3e1
...
...
@@ -647,7 +647,7 @@ class RenderTable extends RenderBox {
// update our internal values
_columns
=
columns
;
_rows
=
cells
.
length
~/
columns
;
_children
=
List
<
RenderBox
?>.
from
(
cells
);
_children
=
List
<
RenderBox
?>.
of
(
cells
);
assert
(
_children
.
length
==
rows
*
columns
);
markNeedsLayout
();
}
...
...
packages/flutter/lib/src/scheduler/binding.dart
View file @
e4a1d3e1
...
...
@@ -279,7 +279,7 @@ mixin SchedulerBinding on BindingBase {
@pragma
(
'vm:notify-debugger-on-exception'
)
void
_executeTimingsCallbacks
(
List
<
FrameTiming
>
timings
)
{
final
List
<
TimingsCallback
>
clonedCallbacks
=
List
<
TimingsCallback
>.
from
(
_timingsCallbacks
);
List
<
TimingsCallback
>.
of
(
_timingsCallbacks
);
for
(
final
TimingsCallback
callback
in
clonedCallbacks
)
{
try
{
if
(
_timingsCallbacks
.
contains
(
callback
))
{
...
...
@@ -562,7 +562,7 @@ mixin SchedulerBinding on BindingBase {
// even if the information collector is called after
// the problem has been resolved.
final
int
count
=
transientCallbackCount
;
final
Map
<
int
,
_FrameCallbackEntry
>
callbacks
=
Map
<
int
,
_FrameCallbackEntry
>.
from
(
_transientCallbacks
);
final
Map
<
int
,
_FrameCallbackEntry
>
callbacks
=
Map
<
int
,
_FrameCallbackEntry
>.
of
(
_transientCallbacks
);
FlutterError
.
reportError
(
FlutterErrorDetails
(
exception:
reason
,
library
:
'scheduler library'
,
...
...
@@ -1084,7 +1084,7 @@ mixin SchedulerBinding on BindingBase {
// POST-FRAME CALLBACKS
_schedulerPhase
=
SchedulerPhase
.
postFrameCallbacks
;
final
List
<
FrameCallback
>
localPostFrameCallbacks
=
List
<
FrameCallback
>.
from
(
_postFrameCallbacks
);
List
<
FrameCallback
>.
of
(
_postFrameCallbacks
);
_postFrameCallbacks
.
clear
();
for
(
final
FrameCallback
callback
in
localPostFrameCallbacks
)
_invokeFrameCallback
(
callback
,
_currentFrameTimeStamp
!);
...
...
packages/flutter/lib/src/semantics/semantics.dart
View file @
e4a1d3e1
...
...
@@ -217,7 +217,7 @@ class AttributedString {
// None of the strings is empty.
final
String
newString
=
string
+
other
.
string
;
final
List
<
StringAttribute
>
newAttributes
=
List
<
StringAttribute
>.
from
(
attributes
);
final
List
<
StringAttribute
>
newAttributes
=
List
<
StringAttribute
>.
of
(
attributes
);
if
(
other
.
attributes
.
isNotEmpty
)
{
final
int
offset
=
string
.
length
;
for
(
final
StringAttribute
attribute
in
other
.
attributes
)
{
...
...
@@ -1739,7 +1739,7 @@ class SemanticsNode extends AbstractNode with DiagnosticableTreeMixin {
}
assert
(!
newChildren
.
any
((
SemanticsNode
node
)
=>
node
.
isMergedIntoParent
)
||
isPartOfNodeMerging
);
_debugPreviousSnapshot
=
List
<
SemanticsNode
>.
from
(
newChildren
);
_debugPreviousSnapshot
=
List
<
SemanticsNode
>.
of
(
newChildren
);
SemanticsNode
ancestor
=
this
;
while
(
ancestor
.
parent
is
SemanticsNode
)
...
...
@@ -2262,8 +2262,8 @@ class SemanticsNode extends AbstractNode with DiagnosticableTreeMixin {
_flags
=
config
.
_flags
;
_textDirection
=
config
.
textDirection
;
_sortKey
=
config
.
sortKey
;
_actions
=
Map
<
SemanticsAction
,
SemanticsActionHandler
>.
from
(
config
.
_actions
);
_customSemanticsActions
=
Map
<
CustomSemanticsAction
,
VoidCallback
>.
from
(
config
.
_customSemanticsActions
);
_actions
=
Map
<
SemanticsAction
,
SemanticsActionHandler
>.
of
(
config
.
_actions
);
_customSemanticsActions
=
Map
<
CustomSemanticsAction
,
VoidCallback
>.
of
(
config
.
_customSemanticsActions
);
_actionsAsBits
=
config
.
_actionsAsBits
;
_textSelection
=
config
.
_textSelection
;
_isMultiline
=
config
.
isMultiline
;
...
...
@@ -2304,7 +2304,7 @@ class SemanticsNode extends AbstractNode with DiagnosticableTreeMixin {
AttributedString
attributedDecreasedValue
=
_attributedDecreasedValue
;
AttributedString
attributedHint
=
_attributedHint
;
TextDirection
?
textDirection
=
_textDirection
;
Set
<
SemanticsTag
>?
mergedTags
=
tags
==
null
?
null
:
Set
<
SemanticsTag
>.
from
(
tags
!);
Set
<
SemanticsTag
>?
mergedTags
=
tags
==
null
?
null
:
Set
<
SemanticsTag
>.
of
(
tags
!);
TextSelection
?
textSelection
=
_textSelection
;
int
?
scrollChildCount
=
_scrollChildCount
;
int
?
scrollIndex
=
_scrollIndex
;
...
...
packages/flutter/lib/src/services/raw_keyboard.dart
View file @
e4a1d3e1
...
...
@@ -672,7 +672,7 @@ class RawKeyboard {
'
${event.data}
'
,
);
// Send the event to passive listeners.
for
(
final
ValueChanged
<
RawKeyEvent
>
listener
in
List
<
ValueChanged
<
RawKeyEvent
>>.
from
(
_listeners
))
{
for
(
final
ValueChanged
<
RawKeyEvent
>
listener
in
List
<
ValueChanged
<
RawKeyEvent
>>.
of
(
_listeners
))
{
try
{
if
(
_listeners
.
contains
(
listener
))
{
listener
(
event
);
...
...
packages/flutter/lib/src/widgets/actions.dart
View file @
e4a1d3e1
...
...
@@ -341,7 +341,7 @@ abstract class Action<T extends Intent> with Diagnosticable {
// Make a local copy so that a listener can unregister while the list is
// being iterated over.
final
List
<
ActionListenerCallback
>
localListeners
=
List
<
ActionListenerCallback
>.
from
(
_listeners
);
final
List
<
ActionListenerCallback
>
localListeners
=
List
<
ActionListenerCallback
>.
of
(
_listeners
);
for
(
final
ActionListenerCallback
listener
in
localListeners
)
{
InformationCollector
?
collector
;
assert
(()
{
...
...
packages/flutter/lib/src/widgets/binding.dart
View file @
e4a1d3e1
...
...
@@ -635,7 +635,7 @@ mixin WidgetsBinding on BindingBase, ServicesBinding, SchedulerBinding, GestureB
/// [SystemChannels.navigation].
@protected
Future
<
void
>
handlePopRoute
()
async
{
for
(
final
WidgetsBindingObserver
observer
in
List
<
WidgetsBindingObserver
>.
from
(
_observers
))
{
for
(
final
WidgetsBindingObserver
observer
in
List
<
WidgetsBindingObserver
>.
of
(
_observers
))
{
if
(
await
observer
.
didPopRoute
())
return
;
}
...
...
@@ -655,14 +655,14 @@ mixin WidgetsBinding on BindingBase, ServicesBinding, SchedulerBinding, GestureB
@protected
@mustCallSuper
Future
<
void
>
handlePushRoute
(
String
route
)
async
{
for
(
final
WidgetsBindingObserver
observer
in
List
<
WidgetsBindingObserver
>.
from
(
_observers
))
{
for
(
final
WidgetsBindingObserver
observer
in
List
<
WidgetsBindingObserver
>.
of
(
_observers
))
{
if
(
await
observer
.
didPushRoute
(
route
))
return
;
}
}
Future
<
void
>
_handlePushRouteInformation
(
Map
<
dynamic
,
dynamic
>
routeArguments
)
async
{
for
(
final
WidgetsBindingObserver
observer
in
List
<
WidgetsBindingObserver
>.
from
(
_observers
))
{
for
(
final
WidgetsBindingObserver
observer
in
List
<
WidgetsBindingObserver
>.
of
(
_observers
))
{
if
(
await
observer
.
didPushRouteInformation
(
RouteInformation
(
...
...
packages/flutter/lib/src/widgets/focus_manager.dart
View file @
e4a1d3e1
...
...
@@ -1511,7 +1511,7 @@ class FocusManager with DiagnosticableTreeMixin, ChangeNotifier {
if
(
_listeners
.
isEmpty
)
{
return
;
}
final
List
<
ValueChanged
<
FocusHighlightMode
>>
localListeners
=
List
<
ValueChanged
<
FocusHighlightMode
>>.
from
(
_listeners
);
final
List
<
ValueChanged
<
FocusHighlightMode
>>
localListeners
=
List
<
ValueChanged
<
FocusHighlightMode
>>.
of
(
_listeners
);
for
(
final
ValueChanged
<
FocusHighlightMode
>
listener
in
localListeners
)
{
try
{
if
(
_listeners
.
contains
(
listener
))
{
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
e4a1d3e1
...
...
@@ -1854,7 +1854,7 @@ abstract class MultiChildRenderObjectWidget extends RenderObjectWidget {
///
/// Widget build(...) {
/// // Always create a new list of children as a Widget is immutable.
/// return Row(children: List.
from
(_children));
/// return Row(children: List.
of
(_children));
/// }
/// }
/// ```
...
...
@@ -5053,7 +5053,7 @@ class InheritedElement extends ProxyElement {
assert
(
_lifecycleState
==
_ElementLifecycle
.
active
);
final
Map
<
Type
,
InheritedElement
>?
incomingWidgets
=
_parent
?.
_inheritedWidgets
;
if
(
incomingWidgets
!=
null
)
_inheritedWidgets
=
HashMap
<
Type
,
InheritedElement
>.
from
(
incomingWidgets
);
_inheritedWidgets
=
HashMap
<
Type
,
InheritedElement
>.
of
(
incomingWidgets
);
else
_inheritedWidgets
=
HashMap
<
Type
,
InheritedElement
>();
_inheritedWidgets
![
widget
.
runtimeType
]
=
this
;
...
...
packages/flutter/lib/src/widgets/localizations.dart
View file @
e4a1d3e1
...
...
@@ -448,7 +448,7 @@ class Localizations extends StatefulWidget {
assert
(
context
!=
null
);
final
_LocalizationsScope
?
scope
=
context
.
dependOnInheritedWidgetOfExactType
<
_LocalizationsScope
>();
assert
(
scope
!=
null
,
'a Localizations ancestor was not found'
);
return
List
<
LocalizationsDelegate
<
dynamic
>>.
from
(
scope
!.
localizationsState
.
widget
.
delegates
);
return
List
<
LocalizationsDelegate
<
dynamic
>>.
of
(
scope
!.
localizationsState
.
widget
.
delegates
);
}
/// Returns the localized resources object of the given `type` for the widget
...
...
packages/flutter/lib/src/widgets/overlay.dart
View file @
e4a1d3e1
...
...
@@ -437,7 +437,7 @@ class OverlayState extends State<Overlay> with TickerProviderStateMixin {
return
;
if
(
listEquals
(
_entries
,
newEntriesList
))
return
;
final
LinkedHashSet
<
OverlayEntry
>
old
=
LinkedHashSet
<
OverlayEntry
>.
from
(
_entries
);
final
LinkedHashSet
<
OverlayEntry
>
old
=
LinkedHashSet
<
OverlayEntry
>.
of
(
_entries
);
for
(
final
OverlayEntry
entry
in
newEntriesList
)
{
entry
.
_overlay
??=
this
;
}
...
...
packages/flutter/lib/src/widgets/routes.dart
View file @
e4a1d3e1
...
...
@@ -1405,7 +1405,7 @@ abstract class ModalRoute<T> extends TransitionRoute<T> with LocalHistoryRoute<T
Future
<
RoutePopDisposition
>
willPop
()
async
{
final
_ModalScopeState
<
T
>?
scope
=
_scopeKey
.
currentState
;
assert
(
scope
!=
null
);
for
(
final
WillPopCallback
callback
in
List
<
WillPopCallback
>.
from
(
_willPopCallbacks
))
{
for
(
final
WillPopCallback
callback
in
List
<
WillPopCallback
>.
of
(
_willPopCallbacks
))
{
if
(
await
callback
()
!=
true
)
return
RoutePopDisposition
.
doNotPop
;
}
...
...
packages/flutter/lib/src/widgets/scroll_controller.dart
View file @
e4a1d3e1
...
...
@@ -168,7 +168,7 @@ class ScrollController extends ChangeNotifier {
/// value was out of range.
void
jumpTo
(
double
value
)
{
assert
(
_positions
.
isNotEmpty
,
'ScrollController not attached to any scroll views.'
);
for
(
final
ScrollPosition
position
in
List
<
ScrollPosition
>.
from
(
_positions
))
for
(
final
ScrollPosition
position
in
List
<
ScrollPosition
>.
of
(
_positions
))
position
.
jumpTo
(
value
);
}
...
...
packages/flutter/lib/src/widgets/scroll_notification_observer.dart
View file @
e4a1d3e1
...
...
@@ -128,7 +128,7 @@ class ScrollNotificationObserverState extends State<ScrollNotificationObserver>
if
(
_listeners
!.
isEmpty
)
return
;
final
List
<
_ListenerEntry
>
localListeners
=
List
<
_ListenerEntry
>.
from
(
_listeners
!);
final
List
<
_ListenerEntry
>
localListeners
=
List
<
_ListenerEntry
>.
of
(
_listeners
!);
for
(
final
_ListenerEntry
entry
in
localListeners
)
{
try
{
if
(
entry
.
list
!=
null
)
...
...
packages/flutter/lib/src/widgets/shared_app_data.dart
View file @
e4a1d3e1
...
...
@@ -167,7 +167,7 @@ class _SharedAppDataState extends State<SharedAppData> {
void
setValue
<
K
extends
Object
,
V
>(
K
key
,
V
value
)
{
if
(
data
[
key
]
!=
value
)
{
setState
(()
{
data
=
Map
<
Object
,
Object
?>.
from
(
data
);
data
=
Map
<
Object
,
Object
?>.
of
(
data
);
data
[
key
]
=
value
;
});
}
...
...
packages/flutter/lib/src/widgets/shortcuts.dart
View file @
e4a1d3e1
...
...
@@ -74,7 +74,7 @@ class KeySet<T extends KeyboardKey> {
:
assert
(
keys
!=
null
),
assert
(
keys
.
isNotEmpty
),
assert
(!
keys
.
contains
(
null
)),
_keys
=
HashSet
<
T
>.
from
(
keys
);
_keys
=
HashSet
<
T
>.
of
(
keys
);
/// Returns a copy of the [KeyboardKey]s in this [KeySet].
Set
<
T
>
get
keys
=>
_keys
.
toSet
();
...
...
packages/flutter/lib/src/widgets/sliver.dart
View file @
e4a1d3e1
...
...
@@ -662,7 +662,7 @@ class SliverChildListDelegate extends SliverChildDelegate {
///
/// Widget build(BuildContext context) {
/// // Always create a new list of children as a Widget is immutable.
/// return PageView(children: List<Widget>.
from
(_children));
/// return PageView(children: List<Widget>.
of
(_children));
/// }
/// }
/// ```
...
...
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