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
a5b31391
Commit
a5b31391
authored
Jan 15, 2018
by
Vyacheslav Egorov
Committed by
Siva
Jan 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use void as type argument instead of Null where appropriate
parent
84580b54
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
42 additions
and
42 deletions
+42
-42
stock_settings.dart
examples/stocks/lib/stock_settings.dart
+1
-1
long_press.dart
packages/flutter/lib/src/gestures/long_press.dart
+1
-1
monodrag.dart
packages/flutter/lib/src/gestures/monodrag.dart
+7
-7
multitap.dart
packages/flutter/lib/src/gestures/multitap.dart
+6
-6
scale.dart
packages/flutter/lib/src/gestures/scale.dart
+4
-4
tap.dart
packages/flutter/lib/src/gestures/tap.dart
+5
-5
dropdown.dart
packages/flutter/lib/src/material/dropdown.dart
+1
-1
expansion_tile.dart
packages/flutter/lib/src/material/expansion_tile.dart
+1
-1
popup_menu.dart
packages/flutter/lib/src/material/popup_menu.dart
+1
-1
refresh_indicator.dart
packages/flutter/lib/src/material/refresh_indicator.dart
+2
-2
scaffold.dart
packages/flutter/lib/src/material/scaffold.dart
+2
-2
image_provider.dart
packages/flutter/lib/src/painting/image_provider.dart
+1
-1
image_resolution.dart
packages/flutter/lib/src/painting/image_resolution.dart
+1
-1
image_stream.dart
packages/flutter/lib/src/painting/image_stream.dart
+2
-2
asset_bundle.dart
packages/flutter/lib/src/services/asset_bundle.dart
+1
-1
animated_list.dart
packages/flutter/lib/src/widgets/animated_list.dart
+2
-2
async.dart
packages/flutter/lib/src/widgets/async.dart
+1
-1
capture_output.dart
packages/flutter/test/foundation/capture_output.dart
+1
-1
image_resolution_test.dart
packages/flutter/test/widgets/image_resolution_test.dart
+2
-2
No files found.
examples/stocks/lib/stock_settings.dart
View file @
a5b31391
...
...
@@ -85,7 +85,7 @@ class StockSettingsState extends State<StockSettings> {
),
]
)
).
then
<
Null
>(
_handleOptimismChanged
);
).
then
<
void
>(
_handleOptimismChanged
);
break
;
}
}
...
...
packages/flutter/lib/src/gestures/long_press.dart
View file @
a5b31391
...
...
@@ -26,7 +26,7 @@ class LongPressGestureRecognizer extends PrimaryPointerGestureRecognizer {
void
didExceedDeadline
()
{
resolve
(
GestureDisposition
.
accepted
);
if
(
onLongPress
!=
null
)
invokeCallback
<
Null
>(
'onLongPress'
,
onLongPress
);
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onLongPress'
,
onLongPress
);
}
@override
...
...
packages/flutter/lib/src/gestures/monodrag.dart
View file @
a5b31391
...
...
@@ -120,7 +120,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer {
_pendingDragOffset
=
Offset
.
zero
;
_lastPendingEventTimestamp
=
event
.
timeStamp
;
if
(
onDown
!=
null
)
invokeCallback
<
Null
>(
'onDown'
,
()
=>
onDown
(
new
DragDownDetails
(
globalPosition:
_initialPosition
)));
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onDown'
,
()
=>
onDown
(
new
DragDownDetails
(
globalPosition:
_initialPosition
)));
}
else
if
(
_state
==
_DragState
.
accepted
)
{
resolve
(
GestureDisposition
.
accepted
);
}
...
...
@@ -140,7 +140,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer {
final
Offset
delta
=
event
.
delta
;
if
(
_state
==
_DragState
.
accepted
)
{
if
(
onUpdate
!=
null
)
{
invokeCallback
<
Null
>(
'onUpdate'
,
()
=>
onUpdate
(
new
DragUpdateDetails
(
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onUpdate'
,
()
=>
onUpdate
(
new
DragUpdateDetails
(
sourceTimeStamp:
event
.
timeStamp
,
delta:
_getDeltaForDetails
(
delta
),
primaryDelta:
_getPrimaryValueFromOffset
(
delta
),
...
...
@@ -166,13 +166,13 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer {
_pendingDragOffset
=
Offset
.
zero
;
_lastPendingEventTimestamp
=
null
;
if
(
onStart
!=
null
)
{
invokeCallback
<
Null
>(
'onStart'
,
()
=>
onStart
(
new
DragStartDetails
(
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onStart'
,
()
=>
onStart
(
new
DragStartDetails
(
sourceTimeStamp:
timestamp
,
globalPosition:
_initialPosition
,
)));
}
if
(
delta
!=
Offset
.
zero
&&
onUpdate
!=
null
)
{
invokeCallback
<
Null
>(
'onUpdate'
,
()
=>
onUpdate
(
new
DragUpdateDetails
(
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onUpdate'
,
()
=>
onUpdate
(
new
DragUpdateDetails
(
sourceTimeStamp:
timestamp
,
delta:
_getDeltaForDetails
(
delta
),
primaryDelta:
_getPrimaryValueFromOffset
(
delta
),
...
...
@@ -193,7 +193,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer {
resolve
(
GestureDisposition
.
rejected
);
_state
=
_DragState
.
ready
;
if
(
onCancel
!=
null
)
invokeCallback
<
Null
>(
'onCancel'
,
onCancel
);
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onCancel'
,
onCancel
);
return
;
}
final
bool
wasAccepted
=
(
_state
==
_DragState
.
accepted
);
...
...
@@ -206,14 +206,14 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer {
if
(
estimate
!=
null
&&
_isFlingGesture
(
estimate
))
{
final
Velocity
velocity
=
new
Velocity
(
pixelsPerSecond:
estimate
.
pixelsPerSecond
)
.
clampMagnitude
(
minFlingVelocity
??
kMinFlingVelocity
,
maxFlingVelocity
??
kMaxFlingVelocity
);
invokeCallback
<
Null
>(
'onEnd'
,
()
=>
onEnd
(
new
DragEndDetails
(
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onEnd'
,
()
=>
onEnd
(
new
DragEndDetails
(
velocity:
velocity
,
primaryVelocity:
_getPrimaryValueFromOffset
(
velocity
.
pixelsPerSecond
),
)),
debugReport:
()
{
return
'
$estimate
; fling at
$velocity
.'
;
});
}
else
{
invokeCallback
<
Null
>(
'onEnd'
,
()
=>
onEnd
(
new
DragEndDetails
(
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onEnd'
,
()
=>
onEnd
(
new
DragEndDetails
(
velocity:
Velocity
.
zero
,
primaryVelocity:
0.0
,
)),
debugReport:
()
{
...
...
packages/flutter/lib/src/gestures/multitap.dart
View file @
a5b31391
...
...
@@ -194,7 +194,7 @@ class DoubleTapGestureRecognizer extends GestureRecognizer {
_freezeTracker
(
tracker
);
_trackers
.
remove
(
tracker
.
pointer
);
if
(
onDoubleTap
!=
null
)
invokeCallback
<
Null
>(
'onDoubleTap'
,
onDoubleTap
);
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onDoubleTap'
,
onDoubleTap
);
_reset
();
}
...
...
@@ -353,7 +353,7 @@ class MultiTapGestureRecognizer extends GestureRecognizer {
longTapDelay:
longTapDelay
);
if
(
onTapDown
!=
null
)
invokeCallback
<
Null
>(
'onTapDown'
,
()
=>
onTapDown
(
event
.
pointer
,
new
TapDownDetails
(
globalPosition:
event
.
position
)));
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onTapDown'
,
()
=>
onTapDown
(
event
.
pointer
,
new
TapDownDetails
(
globalPosition:
event
.
position
)));
}
@override
...
...
@@ -373,22 +373,22 @@ class MultiTapGestureRecognizer extends GestureRecognizer {
assert
(
_gestureMap
.
containsKey
(
pointer
));
_gestureMap
.
remove
(
pointer
);
if
(
onTapCancel
!=
null
)
invokeCallback
<
Null
>(
'onTapCancel'
,
()
=>
onTapCancel
(
pointer
));
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onTapCancel'
,
()
=>
onTapCancel
(
pointer
));
}
void
_dispatchTap
(
int
pointer
,
Offset
globalPosition
)
{
assert
(
_gestureMap
.
containsKey
(
pointer
));
_gestureMap
.
remove
(
pointer
);
if
(
onTapUp
!=
null
)
invokeCallback
<
Null
>(
'onTapUp'
,
()
=>
onTapUp
(
pointer
,
new
TapUpDetails
(
globalPosition:
globalPosition
)));
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onTapUp'
,
()
=>
onTapUp
(
pointer
,
new
TapUpDetails
(
globalPosition:
globalPosition
)));
if
(
onTap
!=
null
)
invokeCallback
<
Null
>(
'onTap'
,
()
=>
onTap
(
pointer
));
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onTap'
,
()
=>
onTap
(
pointer
));
}
void
_dispatchLongTap
(
int
pointer
,
Offset
lastPosition
)
{
assert
(
_gestureMap
.
containsKey
(
pointer
));
if
(
onLongTapDown
!=
null
)
invokeCallback
<
Null
>(
'onLongTapDown'
,
()
=>
onLongTapDown
(
pointer
,
new
TapDownDetails
(
globalPosition:
lastPosition
)));
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onLongTapDown'
,
()
=>
onLongTapDown
(
pointer
,
new
TapDownDetails
(
globalPosition:
lastPosition
)));
}
@override
...
...
packages/flutter/lib/src/gestures/scale.dart
View file @
a5b31391
...
...
@@ -200,9 +200,9 @@ class ScaleGestureRecognizer extends OneSequenceGestureRecognizer {
final
Offset
pixelsPerSecond
=
velocity
.
pixelsPerSecond
;
if
(
pixelsPerSecond
.
distanceSquared
>
kMaxFlingVelocity
*
kMaxFlingVelocity
)
velocity
=
new
Velocity
(
pixelsPerSecond:
(
pixelsPerSecond
/
pixelsPerSecond
.
distance
)
*
kMaxFlingVelocity
);
invokeCallback
<
Null
>(
'onEnd'
,
()
=>
onEnd
(
new
ScaleEndDetails
(
velocity:
velocity
)));
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onEnd'
,
()
=>
onEnd
(
new
ScaleEndDetails
(
velocity:
velocity
)));
}
else
{
invokeCallback
<
Null
>(
'onEnd'
,
()
=>
onEnd
(
new
ScaleEndDetails
(
velocity:
Velocity
.
zero
)));
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onEnd'
,
()
=>
onEnd
(
new
ScaleEndDetails
(
velocity:
Velocity
.
zero
)));
}
}
_state
=
_ScaleState
.
accepted
;
...
...
@@ -230,13 +230,13 @@ class ScaleGestureRecognizer extends OneSequenceGestureRecognizer {
}
if
(
_state
==
_ScaleState
.
started
&&
onUpdate
!=
null
)
invokeCallback
<
Null
>(
'onUpdate'
,
()
=>
onUpdate
(
new
ScaleUpdateDetails
(
scale:
_scaleFactor
,
focalPoint:
_currentFocalPoint
)));
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onUpdate'
,
()
=>
onUpdate
(
new
ScaleUpdateDetails
(
scale:
_scaleFactor
,
focalPoint:
_currentFocalPoint
)));
}
void
_dispatchOnStartCallbackIfNeeded
()
{
assert
(
_state
==
_ScaleState
.
started
);
if
(
onStart
!=
null
)
invokeCallback
<
Null
>(
'onStart'
,
()
=>
onStart
(
new
ScaleStartDetails
(
focalPoint:
_currentFocalPoint
)));
// ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
invokeCallback
<
void
>(
'onStart'
,
()
=>
onStart
(
new
ScaleStartDetails
(
focalPoint:
_currentFocalPoint
)));
}
@override
...
...
packages/flutter/lib/src/gestures/tap.dart
View file @
a5b31391
...
...
@@ -103,7 +103,7 @@ class TapGestureRecognizer extends PrimaryPointerGestureRecognizer {
// This can happen if the superclass decides the primary pointer
// exceeded the touch slop, or if the recognizer is disposed.
if
(
onTapCancel
!=
null
)
invokeCallback
<
Null
>(
'spontaneous onTapCancel'
,
onTapCancel
);
invokeCallback
<
void
>(
'spontaneous onTapCancel'
,
onTapCancel
);
_reset
();
}
super
.
resolve
(
disposition
);
...
...
@@ -131,7 +131,7 @@ class TapGestureRecognizer extends PrimaryPointerGestureRecognizer {
// Another gesture won the arena.
assert
(
state
!=
GestureRecognizerState
.
possible
);
if
(
onTapCancel
!=
null
)
invokeCallback
<
Null
>(
'forced onTapCancel'
,
onTapCancel
);
invokeCallback
<
void
>(
'forced onTapCancel'
,
onTapCancel
);
_reset
();
}
}
...
...
@@ -139,7 +139,7 @@ class TapGestureRecognizer extends PrimaryPointerGestureRecognizer {
void
_checkDown
()
{
if
(!
_sentTapDown
)
{
if
(
onTapDown
!=
null
)
invokeCallback
<
Null
>(
'onTapDown'
,
()
{
onTapDown
(
new
TapDownDetails
(
globalPosition:
initialPosition
));
});
invokeCallback
<
void
>(
'onTapDown'
,
()
{
onTapDown
(
new
TapDownDetails
(
globalPosition:
initialPosition
));
});
_sentTapDown
=
true
;
}
}
...
...
@@ -156,9 +156,9 @@ class TapGestureRecognizer extends PrimaryPointerGestureRecognizer {
return
;
}
if
(
onTapUp
!=
null
)
invokeCallback
<
Null
>(
'onTapUp'
,
()
{
onTapUp
(
new
TapUpDetails
(
globalPosition:
_finalPosition
));
});
invokeCallback
<
void
>(
'onTapUp'
,
()
{
onTapUp
(
new
TapUpDetails
(
globalPosition:
_finalPosition
));
});
if
(
onTap
!=
null
)
invokeCallback
<
Null
>(
'onTap'
,
onTap
);
invokeCallback
<
void
>(
'onTap'
,
onTap
);
_reset
();
}
}
...
...
packages/flutter/lib/src/material/dropdown.dart
View file @
a5b31391
...
...
@@ -578,7 +578,7 @@ class _DropdownButtonState<T> extends State<DropdownButton<T>> with WidgetsBindi
barrierLabel:
MaterialLocalizations
.
of
(
context
).
modalBarrierDismissLabel
,
);
Navigator
.
push
(
context
,
_dropdownRoute
).
then
<
Null
>((
_DropdownRouteResult
<
T
>
newValue
)
{
Navigator
.
push
(
context
,
_dropdownRoute
).
then
<
void
>((
_DropdownRouteResult
<
T
>
newValue
)
{
_dropdownRoute
=
null
;
if
(!
mounted
||
newValue
==
null
)
return
null
;
...
...
packages/flutter/lib/src/material/expansion_tile.dart
View file @
a5b31391
...
...
@@ -120,7 +120,7 @@ class _ExpansionTileState extends State<ExpansionTile> with SingleTickerProvider
if
(
_isExpanded
)
_controller
.
forward
();
else
_controller
.
reverse
().
then
<
Null
>((
Null
value
)
{
_controller
.
reverse
().
then
<
void
>((
Null
value
)
{
setState
(()
{
// Rebuild without widget.children.
});
...
...
packages/flutter/lib/src/material/popup_menu.dart
View file @
a5b31391
...
...
@@ -813,7 +813,7 @@ class _PopupMenuButtonState<T> extends State<PopupMenuButton<T>> {
initialValue:
widget
.
initialValue
,
position:
position
,
)
.
then
<
Null
>((
T
newValue
)
{
.
then
<
void
>((
T
newValue
)
{
if
(!
mounted
||
newValue
==
null
)
return
null
;
if
(
widget
.
onSelected
!=
null
)
...
...
packages/flutter/lib/src/material/refresh_indicator.dart
View file @
a5b31391
...
...
@@ -119,7 +119,7 @@ class RefreshIndicator extends StatefulWidget {
/// The progress indicator's background color. The current theme's
/// [ThemeData.canvasColor] by default.
final
Color
backgroundColor
;
/// A check that specifies whether a [ScrollNotification] should be
/// handled by this widget.
///
...
...
@@ -322,7 +322,7 @@ class RefreshIndicatorState extends State<RefreshIndicator> with TickerProviderS
_mode
=
_RefreshIndicatorMode
.
snap
;
_positionController
.
animateTo
(
1.0
/
_kDragSizeFactorLimit
,
duration:
_kIndicatorSnapDuration
)
.
then
<
Null
>((
Null
value
)
{
.
then
<
void
>((
Null
value
)
{
if
(
mounted
&&
_mode
==
_RefreshIndicatorMode
.
snap
)
{
assert
(
widget
.
onRefresh
!=
null
);
setState
(()
{
...
...
packages/flutter/lib/src/material/scaffold.dart
View file @
a5b31391
...
...
@@ -369,7 +369,7 @@ class Scaffold extends StatefulWidget {
/// A panel displayed to the side of the [body], often hidden on mobile
/// devices. Swipes in from either left-to-right ([TextDirection.ltr]) or
/// right-to-left ([TextDirection.rtl])
///
///
/// In the uncommon case that you wish to open the drawer manually, use the
/// [ScaffoldState.openDrawer] function.
///
...
...
@@ -678,7 +678,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin {
if
(
_snackBars
.
isEmpty
||
_snackBarController
.
status
==
AnimationStatus
.
dismissed
)
return
;
final
Completer
<
SnackBarClosedReason
>
completer
=
_snackBars
.
first
.
_completer
;
_snackBarController
.
reverse
().
then
<
Null
>((
Null
_
)
{
_snackBarController
.
reverse
().
then
<
void
>((
Null
_
)
{
assert
(
mounted
);
if
(!
completer
.
isCompleted
)
completer
.
complete
(
reason
);
...
...
packages/flutter/lib/src/painting/image_provider.dart
View file @
a5b31391
...
...
@@ -261,7 +261,7 @@ abstract class ImageProvider<T> {
assert
(
configuration
!=
null
);
final
ImageStream
stream
=
new
ImageStream
();
T
obtainedKey
;
obtainKey
(
configuration
).
then
<
Null
>((
T
key
)
{
obtainKey
(
configuration
).
then
<
void
>((
T
key
)
{
obtainedKey
=
key
;
stream
.
setCompleter
(
PaintingBinding
.
instance
.
imageCache
.
putIfAbsent
(
key
,
()
=>
load
(
key
)));
}).
catchError
(
...
...
packages/flutter/lib/src/painting/image_resolution.dart
View file @
a5b31391
...
...
@@ -166,7 +166,7 @@ class AssetImage extends AssetBundleImageProvider {
final
AssetBundle
chosenBundle
=
bundle
??
configuration
.
bundle
??
rootBundle
;
Completer
<
AssetBundleImageKey
>
completer
;
Future
<
AssetBundleImageKey
>
result
;
chosenBundle
.
loadStructuredData
<
Map
<
String
,
List
<
String
>>>(
_kAssetManifestFileName
,
_manifestParser
).
then
<
Null
>(
chosenBundle
.
loadStructuredData
<
Map
<
String
,
List
<
String
>>>(
_kAssetManifestFileName
,
_manifestParser
).
then
<
void
>(
(
Map
<
String
,
List
<
String
>>
manifest
)
{
final
String
chosenName
=
_chooseVariant
(
keyName
,
...
...
packages/flutter/lib/src/painting/image_stream.dart
View file @
a5b31391
...
...
@@ -270,7 +270,7 @@ class OneFrameImageStreamCompleter extends ImageStreamCompleter {
/// FlutterErrorDetails]).
OneFrameImageStreamCompleter
(
Future
<
ImageInfo
>
image
,
{
InformationCollector
informationCollector
})
:
assert
(
image
!=
null
)
{
image
.
then
<
Null
>(
setImage
,
onError:
(
dynamic
error
,
StackTrace
stack
)
{
image
.
then
<
void
>(
setImage
,
onError:
(
dynamic
error
,
StackTrace
stack
)
{
FlutterError
.
reportError
(
new
FlutterErrorDetails
(
exception:
error
,
stack:
stack
,
...
...
@@ -333,7 +333,7 @@ class MultiFrameImageStreamCompleter extends ImageStreamCompleter {
_scale
=
scale
,
_framesEmitted
=
0
,
_timer
=
null
{
codec
.
then
<
Null
>(
_handleCodecReady
,
onError:
(
dynamic
error
,
StackTrace
stack
)
{
codec
.
then
<
void
>(
_handleCodecReady
,
onError:
(
dynamic
error
,
StackTrace
stack
)
{
FlutterError
.
reportError
(
new
FlutterErrorDetails
(
exception:
error
,
stack:
stack
,
...
...
packages/flutter/lib/src/services/asset_bundle.dart
View file @
a5b31391
...
...
@@ -181,7 +181,7 @@ abstract class CachingAssetBundle extends AssetBundle {
return
_structuredDataCache
[
key
];
Completer
<
T
>
completer
;
Future
<
T
>
result
;
loadString
(
key
,
cache:
false
).
then
<
T
>(
parser
).
then
<
Null
>((
T
value
)
{
loadString
(
key
,
cache:
false
).
then
<
T
>(
parser
).
then
<
void
>((
T
value
)
{
result
=
new
SynchronousFuture
<
T
>(
value
);
_structuredDataCache
[
key
]
=
result
;
if
(
completer
!=
null
)
{
...
...
packages/flutter/lib/src/widgets/animated_list.dart
View file @
a5b31391
...
...
@@ -298,7 +298,7 @@ class AnimatedListState extends State<AnimatedList> with TickerProviderStateMixi
_itemsCount
+=
1
;
});
controller
.
forward
().
then
<
Null
>((
Null
value
)
{
controller
.
forward
().
then
<
void
>((
Null
value
)
{
_removeActiveItemAt
(
_incomingItems
,
incomingItem
.
itemIndex
).
controller
.
dispose
();
});
}
...
...
@@ -333,7 +333,7 @@ class AnimatedListState extends State<AnimatedList> with TickerProviderStateMixi
..
sort
();
});
controller
.
reverse
().
then
<
Null
>((
Null
value
)
{
controller
.
reverse
().
then
<
void
>((
Null
value
)
{
_removeActiveItemAt
(
_outgoingItems
,
outgoingItem
.
itemIndex
).
controller
.
dispose
();
// Decrement the incoming and outgoing item indices to account
...
...
packages/flutter/lib/src/widgets/async.dart
View file @
a5b31391
...
...
@@ -513,7 +513,7 @@ class _FutureBuilderState<T> extends State<FutureBuilder<T>> {
if
(
widget
.
future
!=
null
)
{
final
Object
callbackIdentity
=
new
Object
();
_activeCallbackIdentity
=
callbackIdentity
;
widget
.
future
.
then
<
Null
>((
T
data
)
{
widget
.
future
.
then
<
void
>((
T
data
)
{
if
(
_activeCallbackIdentity
==
callbackIdentity
)
{
setState
(()
{
_snapshot
=
new
AsyncSnapshot
<
T
>.
withData
(
ConnectionState
.
done
,
data
);
...
...
packages/flutter/test/foundation/capture_output.dart
View file @
a5b31391
...
...
@@ -8,7 +8,7 @@ import 'dart:ui' show VoidCallback;
List
<
String
>
captureOutput
(
VoidCallback
fn
)
{
final
List
<
String
>
log
=
<
String
>[];
runZoned
<
Null
>(
fn
,
zoneSpecification:
new
ZoneSpecification
(
runZoned
<
void
>(
fn
,
zoneSpecification:
new
ZoneSpecification
(
print:
(
Zone
self
,
ZoneDelegate
parent
,
Zone
zone
,
...
...
packages/flutter/test/widgets/image_resolution_test.dart
View file @
a5b31391
...
...
@@ -90,7 +90,7 @@ class TestAssetBundle extends CachingAssetBundle {
class
FakeImageStreamCompleter
extends
ImageStreamCompleter
{
FakeImageStreamCompleter
(
Future
<
ImageInfo
>
image
)
{
image
.
then
<
Null
>(
setImage
);
image
.
then
<
void
>(
setImage
);
}
}
...
...
@@ -100,7 +100,7 @@ class TestAssetImage extends AssetImage {
@override
ImageStreamCompleter
load
(
AssetBundleImageKey
key
)
{
ImageInfo
imageInfo
;
key
.
bundle
.
load
(
key
.
name
).
then
<
Null
>((
ByteData
data
)
{
key
.
bundle
.
load
(
key
.
name
).
then
<
void
>((
ByteData
data
)
{
final
TestByteData
testData
=
data
;
final
ui
.
Image
image
=
new
TestImage
(
testData
.
scale
);
imageInfo
=
new
ImageInfo
(
image:
image
,
scale:
key
.
scale
);
...
...
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