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
c2ae654d
Unverified
Commit
c2ae654d
authored
Mar 05, 2020
by
Alexandre Ardhuin
Committed by
GitHub
Mar 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable avoid_single_cascade_in_expression_statements (#51944)
parent
3018d8dd
Changes
40
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
85 additions
and
102 deletions
+85
-102
analysis_options.yaml
analysis_options.yaml
+1
-1
ticker_test.dart
dev/automated_tests/flutter_test/ticker_test.dart
+1
-1
material_arc.dart
dev/manual_tests/lib/material_arc.dart
+2
-4
expansion_tile.dart
packages/flutter/lib/src/material/expansion_tile.dart
+2
-4
floating_action_button.dart
...ages/flutter/lib/src/material/floating_action_button.dart
+1
-2
ink_ripple.dart
packages/flutter/lib/src/material/ink_ripple.dart
+1
-2
object.dart
packages/flutter/lib/src/rendering/object.dart
+1
-2
binding.dart
packages/flutter/lib/src/services/binding.dart
+1
-2
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+2
-4
color_filter.dart
packages/flutter/lib/src/widgets/color_filter.dart
+1
-1
gesture_detector.dart
packages/flutter/lib/src/widgets/gesture_detector.dart
+1
-2
image_filter.dart
packages/flutter/lib/src/widgets/image_filter.dart
+2
-3
navigator.dart
packages/flutter/lib/src/widgets/navigator.dart
+1
-1
nested_scroll_view.dart
packages/flutter/lib/src/widgets/nested_scroll_view.dart
+2
-4
image_cache_test.dart
packages/flutter/test/painting/image_cache_test.dart
+12
-12
gesture_detector_semantics_test.dart
...flutter/test/widgets/gesture_detector_semantics_test.dart
+2
-4
aot.dart
packages/flutter_tools/lib/src/aot.dart
+1
-1
asset.dart
packages/flutter_tools/lib/src/asset.dart
+1
-1
web.dart
packages/flutter_tools/lib/src/build_system/targets/web.dart
+1
-1
build_web_test.dart
...er_tools/test/commands.shard/hermetic/build_web_test.dart
+3
-3
drive_test.dart
...lutter_tools/test/commands.shard/hermetic/drive_test.dart
+1
-1
generate_test.dart
...ter_tools/test/commands.shard/hermetic/generate_test.dart
+1
-1
ide_config_test.dart
...r_tools/test/commands.shard/hermetic/ide_config_test.dart
+1
-1
run_test.dart
.../flutter_tools/test/commands.shard/hermetic/run_test.dart
+2
-2
gradle_test.dart
...flutter_tools/test/general.shard/android/gradle_test.dart
+3
-3
gradle_utils_test.dart
...r_tools/test/general.shard/android/gradle_utils_test.dart
+2
-2
asset_bundle_test.dart
...s/flutter_tools/test/general.shard/asset_bundle_test.dart
+1
-1
asset_bundle_variant_test.dart
...r_tools/test/general.shard/asset_bundle_variant_test.dart
+1
-1
logger_test.dart
...es/flutter_tools/test/general.shard/base/logger_test.dart
+6
-6
android_test.dart
...test/general.shard/build_system/targets/android_test.dart
+3
-3
assets_test.dart
.../test/general.shard/build_system/targets/assets_test.dart
+4
-4
ios_test.dart
...ols/test/general.shard/build_system/targets/ios_test.dart
+2
-2
macos_test.dart
...s/test/general.shard/build_system/targets/macos_test.dart
+2
-2
web_test.dart
...ols/test/general.shard/build_system/targets/web_test.dart
+3
-3
cache_test.dart
packages/flutter_tools/test/general.shard/cache_test.dart
+1
-1
pub_get_test.dart
...s/flutter_tools/test/general.shard/dart/pub_get_test.dart
+8
-8
cocoapods_test.dart
...lutter_tools/test/general.shard/macos/cocoapods_test.dart
+1
-1
plugins_test.dart
packages/flutter_tools/test/general.shard/plugins_test.dart
+2
-2
resident_web_runner_test.dart
...er_tools/test/general.shard/resident_web_runner_test.dart
+1
-1
mocks.dart
packages/flutter_tools/test/src/mocks.dart
+1
-2
No files found.
analysis_options.yaml
View file @
c2ae654d
...
@@ -79,7 +79,7 @@ linter:
...
@@ -79,7 +79,7 @@ linter:
# - avoid_returning_this # there are plenty of valid reasons to return this
# - avoid_returning_this # there are plenty of valid reasons to return this
# - avoid_setters_without_getters # not yet tested
# - avoid_setters_without_getters # not yet tested
# - avoid_shadowing_type_parameters # not yet tested
# - avoid_shadowing_type_parameters # not yet tested
# - avoid_single_cascade_in_expression_statements # not yet tested
-
avoid_single_cascade_in_expression_statements
-
avoid_slow_async_io
-
avoid_slow_async_io
-
avoid_types_as_parameter_names
-
avoid_types_as_parameter_names
# - avoid_types_on_closure_parameters # conflicts with always_specify_types
# - avoid_types_on_closure_parameters # conflicts with always_specify_types
...
...
dev/automated_tests/flutter_test/ticker_test.dart
View file @
c2ae654d
...
@@ -8,7 +8,7 @@ import 'package:flutter_test/flutter_test.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_test/flutter_test.dart';
void
main
(
)
{
void
main
(
)
{
testWidgets
(
'Does flutter_test catch leaking tickers?'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Does flutter_test catch leaking tickers?'
,
(
WidgetTester
tester
)
async
{
Ticker
((
Duration
duration
)
{
}).
.
start
();
Ticker
((
Duration
duration
)
{
}).
start
();
final
ByteData
message
=
const
StringCodec
().
encodeMessage
(
'AppLifecycleState.paused'
);
final
ByteData
message
=
const
StringCodec
().
encodeMessage
(
'AppLifecycleState.paused'
);
await
ServicesBinding
.
instance
.
defaultBinaryMessenger
.
handlePlatformMessage
(
'flutter/lifecycle'
,
message
,
(
_
)
{});
await
ServicesBinding
.
instance
.
defaultBinaryMessenger
.
handlePlatformMessage
(
'flutter/lifecycle'
,
message
,
(
_
)
{});
...
...
dev/manual_tests/lib/material_arc.dart
View file @
c2ae654d
...
@@ -193,8 +193,7 @@ class _PointDemoState extends State<_PointDemo> {
...
@@ -193,8 +193,7 @@ class _PointDemoState extends State<_PointDemo> {
ImmediateMultiDragGestureRecognizer:
GestureRecognizerFactoryWithHandlers
<
ImmediateMultiDragGestureRecognizer
>(
ImmediateMultiDragGestureRecognizer:
GestureRecognizerFactoryWithHandlers
<
ImmediateMultiDragGestureRecognizer
>(
()
=>
ImmediateMultiDragGestureRecognizer
(),
()
=>
ImmediateMultiDragGestureRecognizer
(),
(
ImmediateMultiDragGestureRecognizer
instance
)
{
(
ImmediateMultiDragGestureRecognizer
instance
)
{
instance
instance
.
onStart
=
_handleOnStart
;
..
onStart
=
_handleOnStart
;
},
},
),
),
},
},
...
@@ -366,8 +365,7 @@ class _RectangleDemoState extends State<_RectangleDemo> {
...
@@ -366,8 +365,7 @@ class _RectangleDemoState extends State<_RectangleDemo> {
ImmediateMultiDragGestureRecognizer:
GestureRecognizerFactoryWithHandlers
<
ImmediateMultiDragGestureRecognizer
>(
ImmediateMultiDragGestureRecognizer:
GestureRecognizerFactoryWithHandlers
<
ImmediateMultiDragGestureRecognizer
>(
()
=>
ImmediateMultiDragGestureRecognizer
(),
()
=>
ImmediateMultiDragGestureRecognizer
(),
(
ImmediateMultiDragGestureRecognizer
instance
)
{
(
ImmediateMultiDragGestureRecognizer
instance
)
{
instance
instance
.
onStart
=
_handleOnStart
;
..
onStart
=
_handleOnStart
;
},
},
),
),
},
},
...
...
packages/flutter/lib/src/material/expansion_tile.dart
View file @
c2ae654d
...
@@ -188,16 +188,14 @@ class _ExpansionTileState extends State<ExpansionTile> with SingleTickerProvider
...
@@ -188,16 +188,14 @@ class _ExpansionTileState extends State<ExpansionTile> with SingleTickerProvider
@override
@override
void
didChangeDependencies
()
{
void
didChangeDependencies
()
{
final
ThemeData
theme
=
Theme
.
of
(
context
);
final
ThemeData
theme
=
Theme
.
of
(
context
);
_borderColorTween
_borderColorTween
.
end
=
theme
.
dividerColor
;
..
end
=
theme
.
dividerColor
;
_headerColorTween
_headerColorTween
..
begin
=
theme
.
textTheme
.
subtitle1
.
color
..
begin
=
theme
.
textTheme
.
subtitle1
.
color
..
end
=
theme
.
accentColor
;
..
end
=
theme
.
accentColor
;
_iconColorTween
_iconColorTween
..
begin
=
theme
.
unselectedWidgetColor
..
begin
=
theme
.
unselectedWidgetColor
..
end
=
theme
.
accentColor
;
..
end
=
theme
.
accentColor
;
_backgroundColorTween
_backgroundColorTween
.
end
=
widget
.
backgroundColor
;
..
end
=
widget
.
backgroundColor
;
super
.
didChangeDependencies
();
super
.
didChangeDependencies
();
}
}
...
...
packages/flutter/lib/src/material/floating_action_button.dart
View file @
c2ae654d
...
@@ -563,8 +563,7 @@ class _ChildOverflowBox extends SingleChildRenderObjectWidget {
...
@@ -563,8 +563,7 @@ class _ChildOverflowBox extends SingleChildRenderObjectWidget {
@override
@override
void
updateRenderObject
(
BuildContext
context
,
_RenderChildOverflowBox
renderObject
)
{
void
updateRenderObject
(
BuildContext
context
,
_RenderChildOverflowBox
renderObject
)
{
renderObject
renderObject
.
textDirection
=
Directionality
.
of
(
context
);
..
textDirection
=
Directionality
.
of
(
context
);
}
}
}
}
...
...
packages/flutter/lib/src/material/ink_ripple.dart
View file @
c2ae654d
...
@@ -198,8 +198,7 @@ class InkRipple extends InteractiveInkFeature {
...
@@ -198,8 +198,7 @@ class InkRipple extends InteractiveInkFeature {
..
forward
();
..
forward
();
// This confirm may have been preceded by a cancel.
// This confirm may have been preceded by a cancel.
_fadeInController
.
forward
();
_fadeInController
.
forward
();
_fadeOutController
_fadeOutController
.
animateTo
(
1.0
,
duration:
_kFadeOutDuration
);
..
animateTo
(
1.0
,
duration:
_kFadeOutDuration
);
}
}
@override
@override
...
...
packages/flutter/lib/src/rendering/object.dart
View file @
c2ae654d
...
@@ -581,8 +581,7 @@ class PaintingContext extends ClipContext {
...
@@ -581,8 +581,7 @@ class PaintingContext extends ClipContext {
..
save
()
..
save
()
..
transform
(
effectiveTransform
.
storage
);
..
transform
(
effectiveTransform
.
storage
);
painter
(
this
,
offset
);
painter
(
this
,
offset
);
canvas
canvas
.
restore
();
..
restore
();
return
null
;
return
null
;
}
}
}
}
...
...
packages/flutter/lib/src/services/binding.dart
View file @
c2ae654d
...
@@ -24,8 +24,7 @@ mixin ServicesBinding on BindingBase {
...
@@ -24,8 +24,7 @@ mixin ServicesBinding on BindingBase {
super
.
initInstances
();
super
.
initInstances
();
_instance
=
this
;
_instance
=
this
;
_defaultBinaryMessenger
=
createBinaryMessenger
();
_defaultBinaryMessenger
=
createBinaryMessenger
();
window
window
.
onPlatformMessage
=
defaultBinaryMessenger
.
handlePlatformMessage
;
..
onPlatformMessage
=
defaultBinaryMessenger
.
handlePlatformMessage
;
initLicenses
();
initLicenses
();
SystemChannels
.
system
.
setMessageHandler
(
handleSystemMessage
);
SystemChannels
.
system
.
setMessageHandler
(
handleSystemMessage
);
}
}
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
c2ae654d
...
@@ -1306,8 +1306,7 @@ class CompositedTransformTarget extends SingleChildRenderObjectWidget {
...
@@ -1306,8 +1306,7 @@ class CompositedTransformTarget extends SingleChildRenderObjectWidget {
@override
@override
void
updateRenderObject
(
BuildContext
context
,
RenderLeaderLayer
renderObject
)
{
void
updateRenderObject
(
BuildContext
context
,
RenderLeaderLayer
renderObject
)
{
renderObject
renderObject
.
link
=
link
;
..
link
=
link
;
}
}
}
}
...
@@ -4993,8 +4992,7 @@ class Flow extends MultiChildRenderObjectWidget {
...
@@ -4993,8 +4992,7 @@ class Flow extends MultiChildRenderObjectWidget {
@override
@override
void
updateRenderObject
(
BuildContext
context
,
RenderFlow
renderObject
)
{
void
updateRenderObject
(
BuildContext
context
,
RenderFlow
renderObject
)
{
renderObject
renderObject
.
delegate
=
delegate
;
..
delegate
=
delegate
;
}
}
}
}
...
...
packages/flutter/lib/src/widgets/color_filter.dart
View file @
c2ae654d
...
@@ -27,7 +27,7 @@ class ColorFiltered extends SingleChildRenderObjectWidget {
...
@@ -27,7 +27,7 @@ class ColorFiltered extends SingleChildRenderObjectWidget {
@override
@override
void
updateRenderObject
(
BuildContext
context
,
_ColorFilterRenderObject
renderObject
)
{
void
updateRenderObject
(
BuildContext
context
,
_ColorFilterRenderObject
renderObject
)
{
renderObject
.
.
colorFilter
=
colorFilter
;
renderObject
.
colorFilter
=
colorFilter
;
}
}
@override
@override
...
...
packages/flutter/lib/src/widgets/gesture_detector.dart
View file @
c2ae654d
...
@@ -624,8 +624,7 @@ class GestureDetector extends StatelessWidget {
...
@@ -624,8 +624,7 @@ class GestureDetector extends StatelessWidget {
gestures
[
DoubleTapGestureRecognizer
]
=
GestureRecognizerFactoryWithHandlers
<
DoubleTapGestureRecognizer
>(
gestures
[
DoubleTapGestureRecognizer
]
=
GestureRecognizerFactoryWithHandlers
<
DoubleTapGestureRecognizer
>(
()
=>
DoubleTapGestureRecognizer
(
debugOwner:
this
),
()
=>
DoubleTapGestureRecognizer
(
debugOwner:
this
),
(
DoubleTapGestureRecognizer
instance
)
{
(
DoubleTapGestureRecognizer
instance
)
{
instance
instance
.
onDoubleTap
=
onDoubleTap
;
..
onDoubleTap
=
onDoubleTap
;
},
},
);
);
}
}
...
...
packages/flutter/lib/src/widgets/image_filter.dart
View file @
c2ae654d
...
@@ -30,7 +30,7 @@ class ImageFiltered extends SingleChildRenderObjectWidget {
...
@@ -30,7 +30,7 @@ class ImageFiltered extends SingleChildRenderObjectWidget {
@override
@override
void
updateRenderObject
(
BuildContext
context
,
_ImageFilterRenderObject
renderObject
)
{
void
updateRenderObject
(
BuildContext
context
,
_ImageFilterRenderObject
renderObject
)
{
renderObject
.
.
imageFilter
=
imageFilter
;
renderObject
.
imageFilter
=
imageFilter
;
}
}
@override
@override
...
@@ -63,8 +63,7 @@ class _ImageFilterRenderObject extends RenderProxyBox {
...
@@ -63,8 +63,7 @@ class _ImageFilterRenderObject extends RenderProxyBox {
layer
=
ImageFilterLayer
(
imageFilter:
imageFilter
);
layer
=
ImageFilterLayer
(
imageFilter:
imageFilter
);
}
else
{
}
else
{
final
ImageFilterLayer
filterLayer
=
layer
as
ImageFilterLayer
;
final
ImageFilterLayer
filterLayer
=
layer
as
ImageFilterLayer
;
filterLayer
filterLayer
.
imageFilter
=
imageFilter
;
..
imageFilter
=
imageFilter
;
}
}
context
.
pushLayer
(
layer
,
super
.
paint
,
offset
);
context
.
pushLayer
(
layer
,
super
.
paint
,
offset
);
assert
(
layer
!=
null
);
assert
(
layer
!=
null
);
...
...
packages/flutter/lib/src/widgets/navigator.dart
View file @
c2ae654d
...
@@ -168,7 +168,7 @@ abstract class Route<T> {
...
@@ -168,7 +168,7 @@ abstract class Route<T> {
// For example, ModalRoute create a focus scope in its overlay entries. The
// For example, ModalRoute create a focus scope in its overlay entries. The
// focused child can only be attached to navigator after initState which
// focused child can only be attached to navigator after initState which
// will be guarded by the asynchronous gap.
// will be guarded by the asynchronous gap.
TickerFuture
.
complete
().
.
then
<
void
>((
void
_
)
{
TickerFuture
.
complete
().
then
<
void
>((
void
_
)
{
navigator
.
focusScopeNode
.
requestFocus
();
navigator
.
focusScopeNode
.
requestFocus
();
});
});
}
}
...
...
packages/flutter/lib/src/widgets/nested_scroll_view.dart
View file @
c2ae654d
...
@@ -1519,8 +1519,7 @@ class SliverOverlapAbsorber extends SingleChildRenderObjectWidget {
...
@@ -1519,8 +1519,7 @@ class SliverOverlapAbsorber extends SingleChildRenderObjectWidget {
@override
@override
void
updateRenderObject
(
BuildContext
context
,
RenderSliverOverlapAbsorber
renderObject
)
{
void
updateRenderObject
(
BuildContext
context
,
RenderSliverOverlapAbsorber
renderObject
)
{
renderObject
renderObject
.
handle
=
handle
;
..
handle
=
handle
;
}
}
@override
@override
...
@@ -1694,8 +1693,7 @@ class SliverOverlapInjector extends SingleChildRenderObjectWidget {
...
@@ -1694,8 +1693,7 @@ class SliverOverlapInjector extends SingleChildRenderObjectWidget {
@override
@override
void
updateRenderObject
(
BuildContext
context
,
RenderSliverOverlapInjector
renderObject
)
{
void
updateRenderObject
(
BuildContext
context
,
RenderSliverOverlapInjector
renderObject
)
{
renderObject
renderObject
.
handle
=
handle
;
..
handle
=
handle
;
}
}
@override
@override
...
...
packages/flutter/test/painting/image_cache_test.dart
View file @
c2ae654d
...
@@ -287,12 +287,12 @@ void main() {
...
@@ -287,12 +287,12 @@ void main() {
test
(
'Live image cache avoids leaks of unlistened streams'
,
()
async
{
test
(
'Live image cache avoids leaks of unlistened streams'
,
()
async
{
imageCache
.
maximumSize
=
3
;
imageCache
.
maximumSize
=
3
;
const
TestImageProvider
(
1
,
1
).
.
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
1
,
1
).
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
2
,
2
).
.
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
2
,
2
).
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
3
,
3
).
.
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
3
,
3
).
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
4
,
4
).
.
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
4
,
4
).
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
5
,
5
).
.
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
5
,
5
).
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
6
,
6
).
.
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
6
,
6
).
resolve
(
ImageConfiguration
.
empty
);
// wait an event loop to let image resolution process.
// wait an event loop to let image resolution process.
await
null
;
await
null
;
...
@@ -304,12 +304,12 @@ void main() {
...
@@ -304,12 +304,12 @@ void main() {
test
(
'Disabled image cache does not leak live images'
,
()
async
{
test
(
'Disabled image cache does not leak live images'
,
()
async
{
imageCache
.
maximumSize
=
0
;
imageCache
.
maximumSize
=
0
;
const
TestImageProvider
(
1
,
1
).
.
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
1
,
1
).
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
2
,
2
).
.
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
2
,
2
).
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
3
,
3
).
.
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
3
,
3
).
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
4
,
4
).
.
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
4
,
4
).
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
5
,
5
).
.
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
5
,
5
).
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
6
,
6
).
.
resolve
(
ImageConfiguration
.
empty
);
const
TestImageProvider
(
6
,
6
).
resolve
(
ImageConfiguration
.
empty
);
// wait an event loop to let image resolution process.
// wait an event loop to let image resolution process.
await
null
;
await
null
;
...
...
packages/flutter/test/widgets/gesture_detector_semantics_test.dart
View file @
c2ae654d
...
@@ -122,8 +122,7 @@ void main() {
...
@@ -122,8 +122,7 @@ void main() {
TapGestureRecognizer:
GestureRecognizerFactoryWithHandlers
<
TapGestureRecognizer
>(
TapGestureRecognizer:
GestureRecognizerFactoryWithHandlers
<
TapGestureRecognizer
>(
()
=>
TapGestureRecognizer
(),
()
=>
TapGestureRecognizer
(),
(
TapGestureRecognizer
instance
)
{
(
TapGestureRecognizer
instance
)
{
instance
instance
.
onTap
=
()
{
logs
.
add
(
'tap'
);
};
..
onTap
=
()
{
logs
.
add
(
'tap'
);
};
},
},
),
),
});
});
...
@@ -146,8 +145,7 @@ void main() {
...
@@ -146,8 +145,7 @@ void main() {
HorizontalDragGestureRecognizer:
GestureRecognizerFactoryWithHandlers
<
HorizontalDragGestureRecognizer
>(
HorizontalDragGestureRecognizer:
GestureRecognizerFactoryWithHandlers
<
HorizontalDragGestureRecognizer
>(
()
=>
HorizontalDragGestureRecognizer
(),
()
=>
HorizontalDragGestureRecognizer
(),
(
HorizontalDragGestureRecognizer
instance
)
{
(
HorizontalDragGestureRecognizer
instance
)
{
instance
instance
.
onStart
=
(
_
)
{
logs
.
add
(
'horizontal'
);
};
..
onStart
=
(
_
)
{
logs
.
add
(
'horizontal'
);
};
},
},
),
),
},
},
...
...
packages/flutter_tools/lib/src/aot.dart
View file @
c2ae654d
...
@@ -103,7 +103,7 @@ class AotBuilder {
...
@@ -103,7 +103,7 @@ class AotBuilder {
if
((
await
Future
.
wait
<
int
>(
exitCodes
.
values
)).
every
((
int
buildExitCode
)
=>
buildExitCode
==
0
))
{
if
((
await
Future
.
wait
<
int
>(
exitCodes
.
values
)).
every
((
int
buildExitCode
)
=>
buildExitCode
==
0
))
{
final
Iterable
<
String
>
dylibs
=
iosBuilds
.
values
.
map
<
String
>(
final
Iterable
<
String
>
dylibs
=
iosBuilds
.
values
.
map
<
String
>(
(
String
outputDir
)
=>
globals
.
fs
.
path
.
join
(
outputDir
,
'App.framework'
,
'App'
));
(
String
outputDir
)
=>
globals
.
fs
.
path
.
join
(
outputDir
,
'App.framework'
,
'App'
));
globals
.
fs
.
directory
(
globals
.
fs
.
path
.
join
(
outputPath
,
'App.framework'
)).
.
createSync
();
globals
.
fs
.
directory
(
globals
.
fs
.
path
.
join
(
outputPath
,
'App.framework'
)).
createSync
();
await
processUtils
.
run
(
await
processUtils
.
run
(
<
String
>[
<
String
>[
'lipo'
,
'lipo'
,
...
...
packages/flutter_tools/lib/src/asset.dart
View file @
c2ae654d
...
@@ -418,7 +418,7 @@ class LicenseCollector {
...
@@ -418,7 +418,7 @@ class LicenseCollector {
licenseText
=
rawLicense
;
licenseText
=
rawLicense
;
}
}
packageLicenses
.
putIfAbsent
(
licenseText
,
()
=>
<
String
>{})
packageLicenses
.
putIfAbsent
(
licenseText
,
()
=>
<
String
>{})
.
.
addAll
(
packageNames
);
.
addAll
(
packageNames
);
allPackages
.
addAll
(
packageNames
);
allPackages
.
addAll
(
packageNames
);
}
}
}
}
...
...
packages/flutter_tools/lib/src/build_system/targets/web.dart
View file @
c2ae654d
...
@@ -116,7 +116,7 @@ Future<void> main() async {
...
@@ -116,7 +116,7 @@ Future<void> main() async {
'''
;
'''
;
}
}
environment
.
buildDir
.
childFile
(
'main.dart'
)
environment
.
buildDir
.
childFile
(
'main.dart'
)
.
.
writeAsStringSync
(
contents
);
.
writeAsStringSync
(
contents
);
}
}
}
}
...
...
packages/flutter_tools/test/commands.shard/hermetic/build_web_test.dart
View file @
c2ae654d
...
@@ -134,12 +134,12 @@ void main() {
...
@@ -134,12 +134,12 @@ void main() {
// Project files.
// Project files.
fileSystem
.
file
(
'.packages'
)
fileSystem
.
file
(
'.packages'
)
.
.
writeAsStringSync
(
'''
.
writeAsStringSync
(
'''
foo:lib/
foo:lib/
fizz:bar/lib/
fizz:bar/lib/
'''
);
'''
);
fileSystem
.
file
(
'pubspec.yaml'
)
fileSystem
.
file
(
'pubspec.yaml'
)
.
.
writeAsStringSync
(
'''
.
writeAsStringSync
(
'''
name: foo
name: foo
dependencies:
dependencies:
...
@@ -167,7 +167,7 @@ flutter:
...
@@ -167,7 +167,7 @@ flutter:
class UrlLauncherPlugin {}
class UrlLauncherPlugin {}
'''
);
'''
);
fileSystem
.
file
(
fileSystem
.
path
.
join
(
'lib'
,
'main.dart'
))
fileSystem
.
file
(
fileSystem
.
path
.
join
(
'lib'
,
'main.dart'
))
.
.
writeAsStringSync
(
'void main() { }'
);
.
writeAsStringSync
(
'void main() { }'
);
// Process calls. We're not testing that these invocations are correct because
// Process calls. We're not testing that these invocations are correct because
// that is covered in targets/web_test.dart.
// that is covered in targets/web_test.dart.
...
...
packages/flutter_tools/test/commands.shard/hermetic/drive_test.dart
View file @
c2ae654d
...
@@ -42,7 +42,7 @@ void main() {
...
@@ -42,7 +42,7 @@ void main() {
fs
.
currentDirectory
=
tempDir
;
fs
.
currentDirectory
=
tempDir
;
fs
.
directory
(
'test'
).
createSync
();
fs
.
directory
(
'test'
).
createSync
();
fs
.
directory
(
'test_driver'
).
createSync
();
fs
.
directory
(
'test_driver'
).
createSync
();
fs
.
file
(
'pubspec.yaml'
).
.
createSync
();
fs
.
file
(
'pubspec.yaml'
).
createSync
();
fs
.
file
(
'.packages'
).
createSync
();
fs
.
file
(
'.packages'
).
createSync
();
setExitFunctionForTests
();
setExitFunctionForTests
();
appStarter
=
(
DriveCommand
command
,
Uri
webUri
)
{
appStarter
=
(
DriveCommand
command
,
Uri
webUri
)
{
...
...
packages/flutter_tools/test/commands.shard/hermetic/generate_test.dart
View file @
c2ae654d
...
@@ -48,7 +48,7 @@ void main() {
...
@@ -48,7 +48,7 @@ void main() {
final
GenerateCommand
command
=
GenerateCommand
();
final
GenerateCommand
command
=
GenerateCommand
();
applyMocksToCommand
(
command
);
applyMocksToCommand
(
command
);
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
'lib'
,
'main.dart'
))
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
'lib'
,
'main.dart'
))
.
.
createSync
(
recursive:
true
);
.
createSync
(
recursive:
true
);
globals
.
fs
.
currentDirectory
globals
.
fs
.
currentDirectory
.
childDirectory
(
'.dart_tool'
)
.
childDirectory
(
'.dart_tool'
)
...
...
packages/flutter_tools/test/commands.shard/hermetic/ide_config_test.dart
View file @
c2ae654d
...
@@ -58,7 +58,7 @@ void main() {
...
@@ -58,7 +58,7 @@ void main() {
void
_populateDir
(
Map
<
String
,
String
>
manifest
)
{
void
_populateDir
(
Map
<
String
,
String
>
manifest
)
{
for
(
final
String
key
in
manifest
.
keys
)
{
for
(
final
String
key
in
manifest
.
keys
)
{
if
(
manifest
[
key
]
==
'dir'
)
{
if
(
manifest
[
key
]
==
'dir'
)
{
tempDir
.
childDirectory
(
key
).
.
createSync
(
recursive:
true
);
tempDir
.
childDirectory
(
key
).
createSync
(
recursive:
true
);
}
}
}
}
for
(
final
String
key
in
manifest
.
keys
)
{
for
(
final
String
key
in
manifest
.
keys
)
{
...
...
packages/flutter_tools/test/commands.shard/hermetic/run_test.dart
View file @
c2ae654d
...
@@ -156,9 +156,9 @@ void main() {
...
@@ -156,9 +156,9 @@ void main() {
fs
.
currentDirectory
=
tempDir
;
fs
.
currentDirectory
=
tempDir
;
tempDir
.
childFile
(
'pubspec.yaml'
)
tempDir
.
childFile
(
'pubspec.yaml'
)
.
.
writeAsStringSync
(
'name: flutter_app'
);
.
writeAsStringSync
(
'name: flutter_app'
);
tempDir
.
childFile
(
'.packages'
)
tempDir
.
childFile
(
'.packages'
)
.
.
writeAsStringSync
(
'# Generated by pub on 2019-11-25 12:38:01.801784.'
);
.
writeAsStringSync
(
'# Generated by pub on 2019-11-25 12:38:01.801784.'
);
final
Directory
libDir
=
tempDir
.
childDirectory
(
'lib'
);
final
Directory
libDir
=
tempDir
.
childDirectory
(
'lib'
);
libDir
.
createSync
();
libDir
.
createSync
();
final
File
mainFile
=
libDir
.
childFile
(
'main.dart'
);
final
File
mainFile
=
libDir
.
childFile
(
'main.dart'
);
...
...
packages/flutter_tools/test/general.shard/android/gradle_test.dart
View file @
c2ae654d
...
@@ -1414,7 +1414,7 @@ plugin1=${plugin1.path}
...
@@ -1414,7 +1414,7 @@ plugin1=${plugin1.path}
.
childDirectory
(
'apk'
)
.
childDirectory
(
'apk'
)
.
childDirectory
(
'release'
)
.
childDirectory
(
'release'
)
.
childFile
(
'app-release.apk'
)
.
childFile
(
'app-release.apk'
)
.
.
createSync
(
recursive:
true
);
.
createSync
(
recursive:
true
);
await
buildGradleApp
(
await
buildGradleApp
(
project:
FlutterProject
.
current
(),
project:
FlutterProject
.
current
(),
...
@@ -1580,7 +1580,7 @@ plugin1=${plugin1.path}
...
@@ -1580,7 +1580,7 @@ plugin1=${plugin1.path}
.
childDirectory
(
'apk'
)
.
childDirectory
(
'apk'
)
.
childDirectory
(
'release'
)
.
childDirectory
(
'release'
)
.
childFile
(
'app-release.apk'
)
.
childFile
(
'app-release.apk'
)
.
.
createSync
(
recursive:
true
);
.
createSync
(
recursive:
true
);
await
buildGradleApp
(
await
buildGradleApp
(
project:
FlutterProject
.
current
(),
project:
FlutterProject
.
current
(),
...
@@ -2621,7 +2621,7 @@ FlutterProject generateFakeAppBundle(String directoryName, String fileName) {
...
@@ -2621,7 +2621,7 @@ FlutterProject generateFakeAppBundle(String directoryName, String fileName) {
final
Directory
bundleDirectory
=
getBundleDirectory
(
project
);
final
Directory
bundleDirectory
=
getBundleDirectory
(
project
);
bundleDirectory
bundleDirectory
.
childDirectory
(
directoryName
)
.
childDirectory
(
directoryName
)
.
.
createSync
(
recursive:
true
);
.
createSync
(
recursive:
true
);
bundleDirectory
bundleDirectory
.
childDirectory
(
directoryName
)
.
childDirectory
(
directoryName
)
...
...
packages/flutter_tools/test/general.shard/android/gradle_utils_test.dart
View file @
c2ae654d
...
@@ -236,8 +236,8 @@ void main() {
...
@@ -236,8 +236,8 @@ void main() {
testUsingContext
(
'returns the gradlew path'
,
()
{
testUsingContext
(
'returns the gradlew path'
,
()
{
final
Directory
androidDirectory
=
globals
.
fs
.
directory
(
'/android'
)..
createSync
();
final
Directory
androidDirectory
=
globals
.
fs
.
directory
(
'/android'
)..
createSync
();
androidDirectory
.
childFile
(
'gradlew'
).
.
createSync
();
androidDirectory
.
childFile
(
'gradlew'
).
createSync
();
androidDirectory
.
childFile
(
'gradlew.bat'
).
.
createSync
();
androidDirectory
.
childFile
(
'gradlew.bat'
).
createSync
();
androidDirectory
.
childFile
(
'gradle.properties'
).
createSync
();
androidDirectory
.
childFile
(
'gradle.properties'
).
createSync
();
when
(
gradleUtils
.
injectGradleWrapperIfNeeded
(
any
)).
thenReturn
(
null
);
when
(
gradleUtils
.
injectGradleWrapperIfNeeded
(
any
)).
thenReturn
(
null
);
...
...
packages/flutter_tools/test/general.shard/asset_bundle_test.dart
View file @
c2ae654d
...
@@ -134,7 +134,7 @@ name: example''')
...
@@ -134,7 +134,7 @@ name: example''')
// touch .packages to make sure its change time is after pubspec.yaml's
// touch .packages to make sure its change time is after pubspec.yaml's
globals
.
fs
.
file
(
'.packages'
)
globals
.
fs
.
file
(
'.packages'
)
.
.
setLastModifiedSync
(
modifiedTime
);
.
setLastModifiedSync
(
modifiedTime
);
// Even though the previous file was removed, it is left in the
// Even though the previous file was removed, it is left in the
// asset manifest and not updated. This is due to the devfs not
// asset manifest and not updated. This is due to the devfs not
...
...
packages/flutter_tools/test/general.shard/asset_bundle_variant_test.dart
View file @
c2ae654d
...
@@ -57,7 +57,7 @@ flutter:
...
@@ -57,7 +57,7 @@ flutter:
- a/b/c/foo
- a/b/c/foo
'''
'''
);
);
globals
.
fs
.
file
(
'.packages'
).
.
createSync
();
globals
.
fs
.
file
(
'.packages'
).
createSync
();
final
List
<
String
>
assets
=
<
String
>[
final
List
<
String
>
assets
=
<
String
>[
'a/b/c/foo'
,
'a/b/c/foo'
,
...
...
packages/flutter_tools/test/general.shard/base/logger_test.dart
View file @
c2ae654d
...
@@ -921,8 +921,8 @@ void main() {
...
@@ -921,8 +921,8 @@ void main() {
outputPreferences:
OutputPreferences
.
test
(
showColor:
false
),
outputPreferences:
OutputPreferences
.
test
(
showColor:
false
),
timeoutConfiguration:
const
TimeoutConfiguration
(),
timeoutConfiguration:
const
TimeoutConfiguration
(),
);
);
logger
.
startProgress
(
'AAA'
,
timeout:
const
TimeoutConfiguration
().
fastOperation
).
.
stop
();
logger
.
startProgress
(
'AAA'
,
timeout:
const
TimeoutConfiguration
().
fastOperation
).
stop
();
logger
.
startProgress
(
'BBB'
,
timeout:
const
TimeoutConfiguration
().
fastOperation
).
.
stop
();
logger
.
startProgress
(
'BBB'
,
timeout:
const
TimeoutConfiguration
().
fastOperation
).
stop
();
final
List
<
String
>
output
=
outputStdout
();
final
List
<
String
>
output
=
outputStdout
();
expect
(
output
.
length
,
equals
(
3
));
expect
(
output
.
length
,
equals
(
3
));
...
@@ -947,8 +947,8 @@ void main() {
...
@@ -947,8 +947,8 @@ void main() {
),
),
stopwatchFactory:
FakeStopwatchFactory
(),
stopwatchFactory:
FakeStopwatchFactory
(),
);
);
logger
.
startProgress
(
'AAA'
,
timeout:
const
TimeoutConfiguration
().
fastOperation
).
.
stop
();
logger
.
startProgress
(
'AAA'
,
timeout:
const
TimeoutConfiguration
().
fastOperation
).
stop
();
logger
.
startProgress
(
'BBB'
,
timeout:
const
TimeoutConfiguration
().
fastOperation
).
.
stop
();
logger
.
startProgress
(
'BBB'
,
timeout:
const
TimeoutConfiguration
().
fastOperation
).
stop
();
expect
(
outputStdout
(),
<
Matcher
>[
expect
(
outputStdout
(),
<
Matcher
>[
matches
(
r'^\[ (?: {0,2}\+[0-9]{1,4} ms| )\] AAA$'
),
matches
(
r'^\[ (?: {0,2}\+[0-9]{1,4} ms| )\] AAA$'
),
...
@@ -967,8 +967,8 @@ void main() {
...
@@ -967,8 +967,8 @@ void main() {
),
),
outputPreferences:
OutputPreferences
.
test
(),
outputPreferences:
OutputPreferences
.
test
(),
);
);
logger
.
startProgress
(
'AAA'
,
timeout:
const
TimeoutConfiguration
().
fastOperation
).
.
stop
();
logger
.
startProgress
(
'AAA'
,
timeout:
const
TimeoutConfiguration
().
fastOperation
).
stop
();
logger
.
startProgress
(
'BBB'
,
timeout:
const
TimeoutConfiguration
().
fastOperation
).
.
stop
();
logger
.
startProgress
(
'BBB'
,
timeout:
const
TimeoutConfiguration
().
fastOperation
).
stop
();
expect
(
logger
.
statusText
,
'AAA
\n
BBB
\n
'
);
expect
(
logger
.
statusText
,
'AAA
\n
BBB
\n
'
);
});
});
...
...
packages/flutter_tools/test/general.shard/build_system/targets/android_test.dart
View file @
c2ae654d
...
@@ -34,7 +34,7 @@ void main() {
...
@@ -34,7 +34,7 @@ void main() {
// create pre-requisites.
// create pre-requisites.
environment
.
buildDir
.
childFile
(
'app.dill'
)
environment
.
buildDir
.
childFile
(
'app.dill'
)
.
.
writeAsStringSync
(
'abcd'
);
.
writeAsStringSync
(
'abcd'
);
final
Directory
hostDirectory
=
globals
.
fs
.
currentDirectory
final
Directory
hostDirectory
=
globals
.
fs
.
currentDirectory
.
childDirectory
(
getNameForHostPlatform
(
getCurrentHostPlatform
()))
.
childDirectory
(
getNameForHostPlatform
(
getCurrentHostPlatform
()))
..
createSync
(
recursive:
true
);
..
createSync
(
recursive:
true
);
...
@@ -61,7 +61,7 @@ void main() {
...
@@ -61,7 +61,7 @@ void main() {
// create pre-requisites.
// create pre-requisites.
environment
.
buildDir
.
childFile
(
'app.so'
)
environment
.
buildDir
.
childFile
(
'app.so'
)
.
.
writeAsStringSync
(
'abcd'
);
.
writeAsStringSync
(
'abcd'
);
await
const
ProfileAndroidApplication
().
build
(
environment
);
await
const
ProfileAndroidApplication
().
build
(
environment
);
...
@@ -80,7 +80,7 @@ void main() {
...
@@ -80,7 +80,7 @@ void main() {
// create pre-requisites.
// create pre-requisites.
environment
.
buildDir
.
childFile
(
'app.so'
)
environment
.
buildDir
.
childFile
(
'app.so'
)
.
.
writeAsStringSync
(
'abcd'
);
.
writeAsStringSync
(
'abcd'
);
await
const
ReleaseAndroidApplication
().
build
(
environment
);
await
const
ReleaseAndroidApplication
().
build
(
environment
);
...
...
packages/flutter_tools/test/general.shard/build_system/targets/assets_test.dart
View file @
c2ae654d
...
@@ -26,13 +26,13 @@ void main() {
...
@@ -26,13 +26,13 @@ void main() {
);
);
fileSystem
.
file
(
environment
.
buildDir
.
childFile
(
'app.dill'
)).
createSync
(
recursive:
true
);
fileSystem
.
file
(
environment
.
buildDir
.
childFile
(
'app.dill'
)).
createSync
(
recursive:
true
);
fileSystem
.
file
(
'packages/flutter_tools/lib/src/build_system/targets/assets.dart'
)
fileSystem
.
file
(
'packages/flutter_tools/lib/src/build_system/targets/assets.dart'
)
.
.
createSync
(
recursive:
true
);
.
createSync
(
recursive:
true
);
fileSystem
.
file
(
'assets/foo/bar.png'
)
fileSystem
.
file
(
'assets/foo/bar.png'
)
.
.
createSync
(
recursive:
true
);
.
createSync
(
recursive:
true
);
fileSystem
.
file
(
'assets/wildcard/#bar.png'
)
fileSystem
.
file
(
'assets/wildcard/#bar.png'
)
.
.
createSync
(
recursive:
true
);
.
createSync
(
recursive:
true
);
fileSystem
.
file
(
'.packages'
)
fileSystem
.
file
(
'.packages'
)
.
.
createSync
();
.
createSync
();
fileSystem
.
file
(
'pubspec.yaml'
)
fileSystem
.
file
(
'pubspec.yaml'
)
..
createSync
()
..
createSync
()
..
writeAsStringSync
(
'''
..
writeAsStringSync
(
'''
...
...
packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart
View file @
c2ae654d
...
@@ -111,7 +111,7 @@ void main() {
...
@@ -111,7 +111,7 @@ void main() {
globals
.
fs
.
file
(
'.packages'
).
writeAsStringSync
(
'
\n
'
);
globals
.
fs
.
file
(
'.packages'
).
writeAsStringSync
(
'
\n
'
);
// Plist file
// Plist file
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
'ios'
,
'Flutter'
,
'AppFrameworkInfo.plist'
))
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
'ios'
,
'Flutter'
,
'AppFrameworkInfo.plist'
))
.
.
createSync
(
recursive:
true
);
.
createSync
(
recursive:
true
);
// App kernel
// App kernel
environment
.
buildDir
.
childFile
(
'app.dill'
).
createSync
(
recursive:
true
);
environment
.
buildDir
.
childFile
(
'app.dill'
).
createSync
(
recursive:
true
);
// Stub framework
// Stub framework
...
@@ -140,7 +140,7 @@ void main() {
...
@@ -140,7 +140,7 @@ void main() {
globals
.
fs
.
file
(
'.packages'
).
writeAsStringSync
(
'
\n
'
);
globals
.
fs
.
file
(
'.packages'
).
writeAsStringSync
(
'
\n
'
);
// Plist file
// Plist file
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
'ios'
,
'Flutter'
,
'AppFrameworkInfo.plist'
))
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
'ios'
,
'Flutter'
,
'AppFrameworkInfo.plist'
))
.
.
createSync
(
recursive:
true
);
.
createSync
(
recursive:
true
);
// Real framework
// Real framework
environment
.
buildDir
environment
.
buildDir
...
...
packages/flutter_tools/test/general.shard/build_system/targets/macos_test.dart
View file @
c2ae654d
...
@@ -137,7 +137,7 @@ void main() {
...
@@ -137,7 +137,7 @@ void main() {
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
'bin'
,
'cache'
,
'artifacts'
,
'engine'
,
'darwin-x64'
,
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
'bin'
,
'cache'
,
'artifacts'
,
'engine'
,
'darwin-x64'
,
'isolate_snapshot.bin'
)).
createSync
(
recursive:
true
);
'isolate_snapshot.bin'
)).
createSync
(
recursive:
true
);
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
environment
.
buildDir
.
path
,
'App.framework'
,
'App'
))
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
environment
.
buildDir
.
path
,
'App.framework'
,
'App'
))
.
.
createSync
(
recursive:
true
);
.
createSync
(
recursive:
true
);
final
String
inputKernel
=
globals
.
fs
.
path
.
join
(
environment
.
buildDir
.
path
,
'app.dill'
);
final
String
inputKernel
=
globals
.
fs
.
path
.
join
(
environment
.
buildDir
.
path
,
'app.dill'
);
final
String
outputKernel
=
globals
.
fs
.
path
.
join
(
'App.framework'
,
'Versions'
,
'A'
,
'Resources'
,
final
String
outputKernel
=
globals
.
fs
.
path
.
join
(
'App.framework'
,
'Versions'
,
'A'
,
'Resources'
,
...
@@ -160,7 +160,7 @@ void main() {
...
@@ -160,7 +160,7 @@ void main() {
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
'bin'
,
'cache'
,
'artifacts'
,
'engine'
,
'darwin-x64'
,
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
'bin'
,
'cache'
,
'artifacts'
,
'engine'
,
'darwin-x64'
,
'isolate_snapshot.bin'
)).
createSync
(
recursive:
true
);
'isolate_snapshot.bin'
)).
createSync
(
recursive:
true
);
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
environment
.
buildDir
.
path
,
'App.framework'
,
'App'
))
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
environment
.
buildDir
.
path
,
'App.framework'
,
'App'
))
.
.
createSync
(
recursive:
true
);
.
createSync
(
recursive:
true
);
final
String
outputKernel
=
globals
.
fs
.
path
.
join
(
'App.framework'
,
'Resources'
,
final
String
outputKernel
=
globals
.
fs
.
path
.
join
(
'App.framework'
,
'Resources'
,
'flutter_assets'
,
'kernel_blob.bin'
);
'flutter_assets'
,
'kernel_blob.bin'
);
final
String
precompiledVm
=
globals
.
fs
.
path
.
join
(
'App.framework'
,
'Resources'
,
final
String
precompiledVm
=
globals
.
fs
.
path
.
join
(
'App.framework'
,
'Resources'
,
...
...
packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart
View file @
c2ae654d
...
@@ -90,9 +90,9 @@ void main() {
...
@@ -90,9 +90,9 @@ void main() {
environment
.
defines
[
kBuildMode
]
=
'release'
;
environment
.
defines
[
kBuildMode
]
=
'release'
;
final
Directory
webResources
=
environment
.
projectDir
.
childDirectory
(
'web'
);
final
Directory
webResources
=
environment
.
projectDir
.
childDirectory
(
'web'
);
webResources
.
childFile
(
'index.html'
)
webResources
.
childFile
(
'index.html'
)
.
.
createSync
(
recursive:
true
);
.
createSync
(
recursive:
true
);
webResources
.
childFile
(
'foo.txt'
)
webResources
.
childFile
(
'foo.txt'
)
.
.
writeAsStringSync
(
'A'
);
.
writeAsStringSync
(
'A'
);
environment
.
buildDir
.
childFile
(
'main.dart.js'
).
createSync
();
environment
.
buildDir
.
childFile
(
'main.dart.js'
).
createSync
();
await
const
WebReleaseBundle
().
build
(
environment
);
await
const
WebReleaseBundle
().
build
(
environment
);
...
@@ -315,7 +315,7 @@ void main() {
...
@@ -315,7 +315,7 @@ void main() {
environment
.
defines
[
kBuildMode
]
=
'release'
;
environment
.
defines
[
kBuildMode
]
=
'release'
;
when
(
globals
.
processManager
.
run
(
any
)).
thenAnswer
((
Invocation
invocation
)
async
{
when
(
globals
.
processManager
.
run
(
any
)).
thenAnswer
((
Invocation
invocation
)
async
{
environment
.
buildDir
.
childFile
(
'main.dart.js.deps'
)
environment
.
buildDir
.
childFile
(
'main.dart.js.deps'
)
.
.
writeAsStringSync
(
'file:///a.dart'
);
.
writeAsStringSync
(
'file:///a.dart'
);
return
FakeProcessResult
(
exitCode:
0
);
return
FakeProcessResult
(
exitCode:
0
);
});
});
await
const
Dart2JSTarget
().
build
(
environment
);
await
const
Dart2JSTarget
().
build
(
environment
);
...
...
packages/flutter_tools/test/general.shard/cache_test.dart
View file @
c2ae654d
...
@@ -423,7 +423,7 @@ void main() {
...
@@ -423,7 +423,7 @@ void main() {
final
File
ideviceScreenshotFile
=
iosUsbArtifacts
.
location
.
childFile
(
'idevicescreenshot'
)
final
File
ideviceScreenshotFile
=
iosUsbArtifacts
.
location
.
childFile
(
'idevicescreenshot'
)
..
createSync
();
..
createSync
();
iosUsbArtifacts
.
location
.
childFile
(
'idevicesyslog'
)
iosUsbArtifacts
.
location
.
childFile
(
'idevicesyslog'
)
.
.
createSync
();
.
createSync
();
expect
(
iosUsbArtifacts
.
isUpToDateInner
(),
true
);
expect
(
iosUsbArtifacts
.
isUpToDateInner
(),
true
);
...
...
packages/flutter_tools/test/general.shard/dart/pub_get_test.dart
View file @
c2ae654d
...
@@ -260,7 +260,7 @@ void main() {
...
@@ -260,7 +260,7 @@ void main() {
],
],
onRun:
()
{
onRun:
()
{
globals
.
fs
.
file
(
'.packages'
)
globals
.
fs
.
file
(
'.packages'
)
.
.
setLastModifiedSync
(
DateTime
(
2002
));
.
setLastModifiedSync
(
DateTime
(
2002
));
}
}
),
),
const
FakeCommand
(
const
FakeCommand
(
...
@@ -280,7 +280,7 @@ void main() {
...
@@ -280,7 +280,7 @@ void main() {
],
],
onRun:
()
{
onRun:
()
{
globals
.
fs
.
file
(
'pubspec.yaml'
)
globals
.
fs
.
file
(
'pubspec.yaml'
)
.
.
setLastModifiedSync
(
DateTime
(
2002
));
.
setLastModifiedSync
(
DateTime
(
2002
));
}
}
),
),
const
FakeCommand
(
const
FakeCommand
(
...
@@ -309,9 +309,9 @@ void main() {
...
@@ -309,9 +309,9 @@ void main() {
testLogger
.
clear
();
testLogger
.
clear
();
// bad scenario 1: pub doesn't update file; doesn't matter, because we do instead
// bad scenario 1: pub doesn't update file; doesn't matter, because we do instead
globals
.
fs
.
file
(
'.packages'
)
globals
.
fs
.
file
(
'.packages'
)
.
.
setLastModifiedSync
(
DateTime
(
2000
));
.
setLastModifiedSync
(
DateTime
(
2000
));
globals
.
fs
.
file
(
'pubspec.yaml'
)
globals
.
fs
.
file
(
'pubspec.yaml'
)
.
.
setLastModifiedSync
(
DateTime
(
2001
));
.
setLastModifiedSync
(
DateTime
(
2001
));
await
pub
.
get
(
context:
PubContext
.
flutterTests
,
checkLastModified:
true
);
// pub does nothing
await
pub
.
get
(
context:
PubContext
.
flutterTests
,
checkLastModified:
true
);
// pub does nothing
expect
(
testLogger
.
statusText
,
'Running "flutter pub get" in /...
\n
'
);
expect
(
testLogger
.
statusText
,
'Running "flutter pub get" in /...
\n
'
);
expect
(
testLogger
.
errorText
,
isEmpty
);
expect
(
testLogger
.
errorText
,
isEmpty
);
...
@@ -321,9 +321,9 @@ void main() {
...
@@ -321,9 +321,9 @@ void main() {
testLogger
.
clear
();
testLogger
.
clear
();
// bad scenario 2: pub changes pubspec.yaml instead
// bad scenario 2: pub changes pubspec.yaml instead
globals
.
fs
.
file
(
'.packages'
)
globals
.
fs
.
file
(
'.packages'
)
.
.
setLastModifiedSync
(
DateTime
(
2000
));
.
setLastModifiedSync
(
DateTime
(
2000
));
globals
.
fs
.
file
(
'pubspec.yaml'
)
globals
.
fs
.
file
(
'pubspec.yaml'
)
.
.
setLastModifiedSync
(
DateTime
(
2001
));
.
setLastModifiedSync
(
DateTime
(
2001
));
try
{
try
{
await
pub
.
get
(
context:
PubContext
.
flutterTests
,
checkLastModified:
true
);
await
pub
.
get
(
context:
PubContext
.
flutterTests
,
checkLastModified:
true
);
expect
(
true
,
isFalse
,
reason:
'pub.get did not throw'
);
expect
(
true
,
isFalse
,
reason:
'pub.get did not throw'
);
...
@@ -337,9 +337,9 @@ void main() {
...
@@ -337,9 +337,9 @@ void main() {
expect
(
globals
.
fs
.
file
(
'.packages'
).
lastModifiedSync
(),
DateTime
(
2000
));
// because nothing touched it
expect
(
globals
.
fs
.
file
(
'.packages'
).
lastModifiedSync
(),
DateTime
(
2000
));
// because nothing touched it
// bad scenario 3: pubspec.yaml was created in the future
// bad scenario 3: pubspec.yaml was created in the future
globals
.
fs
.
file
(
'.packages'
)
globals
.
fs
.
file
(
'.packages'
)
.
.
setLastModifiedSync
(
DateTime
(
2000
));
.
setLastModifiedSync
(
DateTime
(
2000
));
globals
.
fs
.
file
(
'pubspec.yaml'
)
globals
.
fs
.
file
(
'pubspec.yaml'
)
.
.
setLastModifiedSync
(
DateTime
(
9999
));
.
setLastModifiedSync
(
DateTime
(
9999
));
assert
(
DateTime
(
9999
).
isAfter
(
DateTime
.
now
()));
assert
(
DateTime
(
9999
).
isAfter
(
DateTime
.
now
()));
await
pub
.
get
(
context:
PubContext
.
flutterTests
,
checkLastModified:
true
);
// pub does nothing
await
pub
.
get
(
context:
PubContext
.
flutterTests
,
checkLastModified:
true
);
// pub does nothing
expect
(
testLogger
.
statusText
,
contains
(
'Running "flutter pub get" in /...
\n
'
));
expect
(
testLogger
.
statusText
,
contains
(
'Running "flutter pub get" in /...
\n
'
));
...
...
packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart
View file @
c2ae654d
...
@@ -575,7 +575,7 @@ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by
...
@@ -575,7 +575,7 @@ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by
..
writeAsStringSync
(
'Existing lock file.'
);
..
writeAsStringSync
(
'Existing lock file.'
);
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
10
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
10
));
projectUnderTest
.
ios
.
podfile
projectUnderTest
.
ios
.
podfile
.
.
writeAsStringSync
(
'Updated Podfile'
);
.
writeAsStringSync
(
'Updated Podfile'
);
await
cocoaPodsUnderTest
.
processPods
(
await
cocoaPodsUnderTest
.
processPods
(
xcodeProject:
projectUnderTest
.
ios
,
xcodeProject:
projectUnderTest
.
ios
,
engineDir:
'engine/path'
,
engineDir:
'engine/path'
,
...
...
packages/flutter_tools/test/general.shard/plugins_test.dart
View file @
c2ae654d
...
@@ -236,7 +236,7 @@ flutter:
...
@@ -236,7 +236,7 @@ flutter:
.
childDirectory
(
'java'
)
.
childDirectory
(
'java'
)
.
childDirectory
(
pluginName
)
.
childDirectory
(
pluginName
)
.
childFile
(
'UseOldEmbedding.java'
)
.
childFile
(
'UseOldEmbedding.java'
)
.
.
createSync
(
recursive:
true
);
.
createSync
(
recursive:
true
);
flutterProject
.
directory
flutterProject
.
directory
.
childFile
(
'.packages'
)
.
childFile
(
'.packages'
)
...
@@ -855,7 +855,7 @@ EndGlobal''');
...
@@ -855,7 +855,7 @@ EndGlobal''');
.
childDirectory
(
'lib'
)
.
childDirectory
(
'lib'
)
.
childDirectory
(
'src'
)
.
childDirectory
(
'src'
)
.
childFile
(
'web_plugin.dart'
)
.
childFile
(
'web_plugin.dart'
)
.
.
createSync
(
recursive:
true
);
.
createSync
(
recursive:
true
);
flutterProject
.
directory
flutterProject
.
directory
.
childFile
(
'.packages'
)
.
childFile
(
'.packages'
)
...
...
packages/flutter_tools/test/general.shard/resident_web_runner_test.dart
View file @
c2ae654d
...
@@ -81,7 +81,7 @@ void main() {
...
@@ -81,7 +81,7 @@ void main() {
urlTunneller:
null
,
urlTunneller:
null
,
)
as
ResidentWebRunner
;
)
as
ResidentWebRunner
;
globals
.
fs
.
currentDirectory
.
childFile
(
'.packages'
)
globals
.
fs
.
currentDirectory
.
childFile
(
'.packages'
)
.
.
writeAsStringSync
(
'
\n
'
);
.
writeAsStringSync
(
'
\n
'
);
},
},
);
);
});
});
...
...
packages/flutter_tools/test/src/mocks.dart
View file @
c2ae654d
...
@@ -632,8 +632,7 @@ class MockDeviceLogReader extends DeviceLogReader {
...
@@ -632,8 +632,7 @@ class MockDeviceLogReader extends DeviceLogReader {
}
}
void
applyMocksToCommand
(
FlutterCommand
command
)
{
void
applyMocksToCommand
(
FlutterCommand
command
)
{
command
command
.
applicationPackages
=
MockApplicationPackageStore
();
..
applicationPackages
=
MockApplicationPackageStore
();
}
}
/// Common functionality for tracking mock interaction
/// Common functionality for tracking mock interaction
...
...
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