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
989f8644
Unverified
Commit
989f8644
authored
3 years ago
by
Ian Hickson
Committed by
GitHub
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable avoid_setters_without_getters (#91067)
parent
50604c61
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
131 additions
and
117 deletions
+131
-117
analysis_options.yaml
analysis_options.yaml
+3
-3
dialog.dart
packages/flutter/lib/src/cupertino/dialog.dart
+4
-1
text_selection_toolbar.dart
...ges/flutter/lib/src/cupertino/text_selection_toolbar.dart
+2
-0
platform_view.dart
packages/flutter/lib/src/rendering/platform_view.dart
+4
-9
proxy_box.dart
packages/flutter/lib/src/rendering/proxy_box.dart
+7
-4
platform_views.dart
packages/flutter/lib/src/services/platform_views.dart
+7
-6
actions.dart
packages/flutter/lib/src/widgets/actions.dart
+18
-21
fake_platform_views.dart
packages/flutter/test/services/fake_platform_views.dart
+1
-1
semantics_10_test.dart
packages/flutter/test/widgets/semantics_10_test.dart
+2
-1
_binding_io.dart
packages/flutter_test/lib/src/_binding_io.dart
+4
-4
window.dart
packages/flutter_test/lib/src/window.dart
+16
-16
bot_detector.dart
packages/flutter_tools/lib/src/base/bot_detector.dart
+6
-2
terminal.dart
packages/flutter_tools/lib/src/base/terminal.dart
+11
-0
upgrade.dart
packages/flutter_tools/lib/src/commands/upgrade.dart
+2
-2
devices.dart
packages/flutter_tools/lib/src/ios/devices.dart
+5
-5
persistent_tool_state.dart
packages/flutter_tools/lib/src/persistent_tool_state.dart
+6
-6
first_run.dart
packages/flutter_tools/lib/src/reporting/first_run.dart
+1
-1
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+6
-6
test_compiler.dart
packages/flutter_tools/lib/src/test/test_compiler.dart
+1
-1
web_device.dart
packages/flutter_tools/lib/src/web/web_device.dart
+1
-1
windows_device.dart
packages/flutter_tools/lib/src/windows/windows_device.dart
+1
-1
custom_devices.dart
...er_tools/test/commands.shard/hermetic/custom_devices.dart
+2
-0
doctor_test.dart
...utter_tools/test/commands.shard/hermetic/doctor_test.dart
+1
-1
error_handling_io_test.dart
...tools/test/general.shard/base/error_handling_io_test.dart
+4
-0
terminal_test.dart
.../flutter_tools/test/general.shard/base/terminal_test.dart
+1
-0
persistent_tool_state_test.dart
..._tools/test/general.shard/persistent_tool_state_test.dart
+2
-2
first_run_test.dart
...er_tools/test/general.shard/reporting/first_run_test.dart
+1
-1
resident_devtools_handler_test.dart
...ls/test/general.shard/resident_devtools_handler_test.dart
+1
-3
resident_web_runner_test.dart
...er_tools/test/general.shard/resident_web_runner_test.dart
+5
-5
context.dart
packages/flutter_tools/test/src/context.dart
+1
-3
fake_http_client.dart
packages/flutter_tools/test/src/fake_http_client.dart
+4
-10
plugin_event_channel.dart
...ges/flutter_web_plugins/lib/src/plugin_event_channel.dart
+1
-1
No files found.
analysis_options.yaml
View file @
989f8644
...
...
@@ -81,11 +81,11 @@ linter:
-
avoid_relative_lib_imports
-
avoid_renaming_method_parameters
-
avoid_return_types_on_setters
# - avoid_returning_null #
there are plenty of valid reasons to return null
# - avoid_returning_null_for_future # not yet tested
# - avoid_returning_null #
still violated by some pre-nnbd code that we haven't yet migrated
-
avoid_returning_null_for_future
-
avoid_returning_null_for_void
# - avoid_returning_this # there are plenty of valid reasons to return this
# - avoid_setters_without_getters # not yet tested
-
avoid_setters_without_getters
-
avoid_shadowing_type_parameters
-
avoid_single_cascade_in_expression_statements
-
avoid_slow_async_io
...
...
This diff is collapsed.
Click to expand it.
packages/flutter/lib/src/cupertino/dialog.dart
View file @
989f8644
...
...
@@ -2012,6 +2012,7 @@ class _RenderCupertinoDialogActions extends RenderBox
markNeedsLayout
();
}
Color
get
dialogColor
=>
_buttonBackgroundPaint
.
color
;
final
Paint
_buttonBackgroundPaint
;
set
dialogColor
(
Color
value
)
{
if
(
value
==
_buttonBackgroundPaint
.
color
)
...
...
@@ -2021,6 +2022,7 @@ class _RenderCupertinoDialogActions extends RenderBox
markNeedsPaint
();
}
Color
get
dialogPressedColor
=>
_pressedButtonBackgroundPaint
.
color
;
final
Paint
_pressedButtonBackgroundPaint
;
set
dialogPressedColor
(
Color
value
)
{
if
(
value
==
_pressedButtonBackgroundPaint
.
color
)
...
...
@@ -2030,6 +2032,7 @@ class _RenderCupertinoDialogActions extends RenderBox
markNeedsPaint
();
}
Color
get
dividerColor
=>
_dividerPaint
.
color
;
final
Paint
_dividerPaint
;
set
dividerColor
(
Color
value
)
{
if
(
value
==
_dividerPaint
.
color
)
...
...
@@ -2039,8 +2042,8 @@ class _RenderCupertinoDialogActions extends RenderBox
markNeedsPaint
();
}
bool
_isActionSheet
;
bool
get
isActionSheet
=>
_isActionSheet
;
bool
_isActionSheet
;
set
isActionSheet
(
bool
value
)
{
if
(
value
==
_isActionSheet
)
return
;
...
...
This diff is collapsed.
Click to expand it.
packages/flutter/lib/src/cupertino/text_selection_toolbar.dart
View file @
989f8644
...
...
@@ -196,6 +196,7 @@ class _RenderCupertinoTextSelectionToolbarShape extends RenderShiftedBox {
@override
bool
get
isRepaintBoundary
=>
true
;
Offset
get
anchor
=>
_anchor
;
Offset
_anchor
;
set
anchor
(
Offset
value
)
{
if
(
value
==
_anchor
)
{
...
...
@@ -205,6 +206,7 @@ class _RenderCupertinoTextSelectionToolbarShape extends RenderShiftedBox {
markNeedsLayout
();
}
bool
get
isAbove
=>
_isAbove
;
bool
_isAbove
;
set
isAbove
(
bool
value
)
{
if
(
_isAbove
==
value
)
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter/lib/src/rendering/platform_view.dart
View file @
989f8644
...
...
@@ -13,7 +13,6 @@ import 'box.dart';
import
'layer.dart'
;
import
'object.dart'
;
/// How an embedded platform view behave during hit tests.
enum
PlatformViewHitTestBehavior
{
/// Opaque targets can be hit by hit tests, causing them to both receive
...
...
@@ -75,7 +74,6 @@ Set<Type> _factoriesTypeSet<T>(Set<Factory<T>> factories) {
/// * [AndroidView] which is a widget that is used to show an Android view.
/// * [PlatformViewsService] which is a service for controlling platform views.
class
RenderAndroidView
extends
RenderBox
with
_PlatformViewGestureMixin
{
/// Creates a render object for an Android view.
RenderAndroidView
({
required
AndroidViewController
viewController
,
...
...
@@ -97,7 +95,7 @@ class RenderAndroidView extends RenderBox with _PlatformViewGestureMixin {
_PlatformViewState
_state
=
_PlatformViewState
.
uninitialized
;
/// The Android view controller for the Android view associated with this render object.
AndroidViewController
get
view
c
ontroller
=>
_viewController
;
AndroidViewController
get
view
C
ontroller
=>
_viewController
;
AndroidViewController
_viewController
;
/// Sets a new Android view controller.
///
...
...
@@ -451,7 +449,6 @@ class _UiKitViewGestureRecognizer extends OneSequenceGestureRecognizer {
).
toSet
();
}
// We use OneSequenceGestureRecognizers as they support gesture arena teams.
// TODO(amirh): get a list of GestureRecognizers here.
// https://github.com/flutter/flutter/issues/20953
...
...
@@ -615,7 +612,6 @@ class _PlatformViewGestureRecognizer extends OneSequenceGestureRecognizer {
/// [PlatformViewRenderBox] presents a platform view by adding a [PlatformViewLayer] layer,
/// integrates it with the gesture arenas system and adds relevant semantic nodes to the semantics tree.
class
PlatformViewRenderBox
extends
RenderBox
with
_PlatformViewGestureMixin
{
/// Creating a render object for a [PlatformViewSurface].
///
/// The `controller` parameter must not be null.
...
...
@@ -631,8 +627,9 @@ class PlatformViewRenderBox extends RenderBox with _PlatformViewGestureMixin {
updateGestureRecognizers
(
gestureRecognizers
);
}
/// Sets the [controller] for this render object.
///
/// The controller for this render object.
PlatformViewController
get
controller
=>
_controller
;
PlatformViewController
_controller
;
/// This value must not be null, and setting it to a new value will result in a repaint.
set
controller
(
PlatformViewController
controller
)
{
assert
(
controller
!=
null
);
...
...
@@ -657,8 +654,6 @@ class PlatformViewRenderBox extends RenderBox with _PlatformViewGestureMixin {
_updateGestureRecognizersWithCallBack
(
gestureRecognizers
,
_controller
.
dispatchPointerEvent
);
}
PlatformViewController
_controller
;
@override
bool
get
sizedByParent
=>
true
;
...
...
This diff is collapsed.
Click to expand it.
packages/flutter/lib/src/rendering/proxy_box.dart
View file @
989f8644
...
...
@@ -2265,11 +2265,14 @@ class RenderTransform extends RenderProxyBox {
/// always honor the transformation, regardless of the value of this property.
bool
transformHitTests
;
// Note the lack of a getter for transform because Matrix4 is not immutable
Matrix4
?
_transform
;
/// The matrix to transform the child by during painting.
set
transform
(
Matrix4
value
)
{
/// The matrix to transform the child by during painting. The provided value
/// is copied on assignment.
///
/// There is no getter for [transform], because [Matrix4] is mutable, and
/// mutations outside of the control of the render object could not reliably
/// be reflected in the rendering.
set
transform
(
Matrix4
value
)
{
// ignore: avoid_setters_without_getters
assert
(
value
!=
null
);
if
(
_transform
==
value
)
return
;
...
...
This diff is collapsed.
Click to expand it.
packages/flutter/lib/src/services/platform_views.dart
View file @
989f8644
...
...
@@ -522,8 +522,8 @@ class _AndroidMotionEventConverter {
<
int
,
AndroidPointerProperties
>{};
final
Set
<
int
>
usedAndroidPointerIds
=
<
int
>{};
PointTransformer
get
pointTransformer
=>
_pointTransformer
;
late
PointTransformer
_pointTransformer
;
set
pointTransformer
(
PointTransformer
transformer
)
{
assert
(
transformer
!=
null
);
_pointTransformer
=
transformer
;
...
...
@@ -813,10 +813,12 @@ abstract class AndroidViewController extends PlatformViewController {
);
}
/// Converts a given point from the global coordinate system in logical pixels to the local coordinate system for this box.
/// Converts a given point from the global coordinate system in logical pixels
/// to the local coordinate system for this box.
///
/// This is required to convert a [PointerEvent] to an [AndroidMotionEvent].
/// It is typically provided by using [RenderBox.globalToLocal].
PointTransformer
get
pointTransformer
=>
_motionEventConverter
.
_pointTransformer
;
set
pointTransformer
(
PointTransformer
transformer
)
{
assert
(
transformer
!=
null
);
_motionEventConverter
.
_pointTransformer
=
transformer
;
...
...
@@ -1146,18 +1148,17 @@ class UiKitViewController {
}
}
/// An interface for
a
controlling a single platform view.
/// An interface for controlling a single platform view.
///
/// Used by [PlatformViewSurface] to interface with the platform view it embeds.
abstract
class
PlatformViewController
{
/// The viewId associated with this controller.
///
/// The viewId should always be unique and non-negative.
And it must not be null.
/// The viewId should always be unique and non-negative.
///
/// See also:
///
/// * [PlatformViewsRegistry], which is a helper for managing platform view
id
s.
/// * [PlatformViewsRegistry], which is a helper for managing platform view
ID
s.
int
get
viewId
;
/// Dispatches the `event` to the platform view.
...
...
This diff is collapsed.
Click to expand it.
packages/flutter/lib/src/widgets/actions.dart
View file @
989f8644
...
...
@@ -160,13 +160,10 @@ abstract class Action<T extends Intent> with Diagnosticable {
final
ObserverList
<
ActionListenerCallback
>
_listeners
=
ObserverList
<
ActionListenerCallback
>();
Action
<
T
>?
_currentCallingAction
;
set
_callingAction
(
Action
<
T
>?
newAction
)
{
if
(
newAction
==
_currentCallingAction
)
{
return
;
}
assert
(
newAction
==
null
||
_currentCallingAction
==
null
);
_currentCallingAction
=
newAction
;
void
_updateCallingAction
(
Action
<
T
>?
value
)
{
_currentCallingAction
=
value
;
}
/// The [Action] overridden by this [Action].
///
/// The [Action.overridable] constructor creates an overridable [Action] that
...
...
@@ -1526,9 +1523,9 @@ mixin _OverridableActionMixin<T extends Intent> on Action<T> {
}
@override
set
_callingAction
(
Action
<
T
>?
newAction
)
{
super
.
_
callingAction
=
newAction
;
defaultAction
.
_
callingAction
=
newAction
;
void
_updateCallingAction
(
Action
<
T
>?
value
)
{
super
.
_
updateCallingAction
(
value
)
;
defaultAction
.
_
updateCallingAction
(
value
)
;
}
Object
?
_invokeOverride
(
Action
<
T
>
overrideAction
,
T
intent
,
BuildContext
?
context
)
{
...
...
@@ -1537,11 +1534,11 @@ mixin _OverridableActionMixin<T extends Intent> on Action<T> {
debugAssertMutuallyRecursive
=
true
;
return
true
;
}());
overrideAction
.
_
callingAction
=
defaultAction
;
overrideAction
.
_
updateCallingAction
(
defaultAction
)
;
final
Object
?
returnValue
=
overrideAction
is
ContextAction
<
T
>
?
overrideAction
.
invoke
(
intent
,
context
)
:
overrideAction
.
invoke
(
intent
);
overrideAction
.
_
callingAction
=
null
;
overrideAction
.
_
updateCallingAction
(
null
)
;
assert
(()
{
debugAssertMutuallyRecursive
=
false
;
return
true
;
...
...
@@ -1564,9 +1561,9 @@ mixin _OverridableActionMixin<T extends Intent> on Action<T> {
debugAssertIsActionEnabledMutuallyRecursive
=
true
;
return
true
;
}());
overrideAction
.
_
callingAction
=
defaultAction
;
overrideAction
.
_
updateCallingAction
(
defaultAction
)
;
final
bool
isOverrideEnabled
=
overrideAction
.
isActionEnabled
;
overrideAction
.
_
callingAction
=
null
;
overrideAction
.
_
updateCallingAction
(
null
)
;
assert
(()
{
debugAssertIsActionEnabledMutuallyRecursive
=
false
;
return
true
;
...
...
@@ -1592,9 +1589,9 @@ mixin _OverridableActionMixin<T extends Intent> on Action<T> {
}());
final
Action
<
T
>?
overrideAction
=
getOverrideAction
();
overrideAction
?.
_
callingAction
=
defaultAction
;
overrideAction
?.
_
updateCallingAction
(
defaultAction
)
;
final
bool
returnValue
=
(
overrideAction
??
defaultAction
).
isEnabled
(
intent
);
overrideAction
?.
_
callingAction
=
null
;
overrideAction
?.
_
updateCallingAction
(
null
)
;
assert
(()
{
debugAssertIsEnabledMutuallyRecursive
=
false
;
return
true
;
...
...
@@ -1610,9 +1607,9 @@ mixin _OverridableActionMixin<T extends Intent> on Action<T> {
return
true
;
}());
final
Action
<
T
>?
overrideAction
=
getOverrideAction
();
overrideAction
?.
_
callingAction
=
defaultAction
;
overrideAction
?.
_
updateCallingAction
(
defaultAction
)
;
final
bool
isEnabled
=
(
overrideAction
??
defaultAction
).
consumesKey
(
intent
);
overrideAction
?.
_
callingAction
=
null
;
overrideAction
?.
_
updateCallingAction
(
null
)
;
assert
(()
{
debugAssertConsumeKeyMutuallyRecursive
=
false
;
return
true
;
...
...
@@ -1674,11 +1671,11 @@ class _OverridableContextAction<T extends Intent> extends ContextAction<T> with
// overrideAction is not a ContextAction and thus have no access to the
// calling BuildContext.
final
Action
<
T
>
wrappedDefault
=
_ContextActionToActionAdapter
<
T
>(
invokeContext:
context
!,
action:
defaultAction
);
overrideAction
.
_
callingAction
=
wrappedDefault
;
overrideAction
.
_
updateCallingAction
(
wrappedDefault
)
;
final
Object
?
returnValue
=
overrideAction
is
ContextAction
<
T
>
?
overrideAction
.
invoke
(
intent
,
context
)
:
overrideAction
.
invoke
(
intent
);
overrideAction
.
_
callingAction
=
null
;
overrideAction
.
_
updateCallingAction
(
null
)
;
assert
(()
{
debugAssertMutuallyRecursive
=
false
;
...
...
@@ -1710,8 +1707,8 @@ class _ContextActionToActionAdapter<T extends Intent> extends Action<T> {
final
ContextAction
<
T
>
action
;
@override
set
_callingAction
(
Action
<
T
>?
newAction
)
{
action
.
_
callingAction
=
newAction
;
void
_updateCallingAction
(
Action
<
T
>?
value
)
{
action
.
_
updateCallingAction
(
value
)
;
}
@override
...
...
This diff is collapsed.
Click to expand it.
packages/flutter/test/services/fake_platform_views.dart
View file @
989f8644
...
...
@@ -59,7 +59,7 @@ class FakeAndroidViewController implements AndroidViewController {
final
int
viewId
;
@override
Offset
Function
(
Offset
position
)?
pointTransformer
;
late
PointTransformer
pointTransformer
;
@override
Future
<
void
>
dispatchPointerEvent
(
PointerEvent
event
)
async
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter/test/widgets/semantics_10_test.dart
View file @
989f8644
...
...
@@ -92,7 +92,6 @@ class TestWidget extends SingleChildRenderObjectWidget {
}
class
RenderTest
extends
RenderProxyBox
{
@override
void
describeSemanticsConfiguration
(
SemanticsConfiguration
config
)
{
super
.
describeSemanticsConfiguration
(
config
);
...
...
@@ -107,6 +106,7 @@ class RenderTest extends RenderProxyBox {
}
String
get
label
=>
_label
;
String
_label
=
'<>'
;
set
label
(
String
value
)
{
if
(
value
==
_label
)
...
...
@@ -116,6 +116,7 @@ class RenderTest extends RenderProxyBox {
}
bool
get
isSemanticBoundary
=>
_isSemanticBoundary
;
bool
_isSemanticBoundary
=
false
;
set
isSemanticBoundary
(
bool
value
)
{
if
(
_isSemanticBoundary
==
value
)
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_test/lib/src/_binding_io.dart
View file @
989f8644
...
...
@@ -120,13 +120,13 @@ class _MockHttpClient implements HttpClient {
void
addProxyCredentials
(
String
host
,
int
port
,
String
realm
,
HttpClientCredentials
credentials
)
{
}
@override
set
authenticate
(
Future
<
bool
>
Function
(
Uri
url
,
String
scheme
,
String
realm
)?
f
)
{
}
Future
<
bool
>
Function
(
Uri
url
,
String
scheme
,
String
realm
)?
authenticate
;
@override
set
authenticateProxy
(
Future
<
bool
>
Function
(
String
host
,
int
port
,
String
scheme
,
String
realm
)?
f
)
{
}
Future
<
bool
>
Function
(
String
host
,
int
port
,
String
scheme
,
String
realm
)?
authenticateProxy
;
@override
set
badCertificateCallback
(
bool
Function
(
X509Certificate
cert
,
String
host
,
int
port
)?
callback
)
{
}
bool
Function
(
X509Certificate
cert
,
String
host
,
int
port
)?
badCertificateCallback
;
@override
void
close
({
bool
force
=
false
})
{
}
...
...
@@ -142,7 +142,7 @@ class _MockHttpClient implements HttpClient {
}
@override
set
findProxy
(
String
Function
(
Uri
url
)?
f
)
{
}
String
Function
(
Uri
url
)?
findProxy
;
@override
Future
<
HttpClientRequest
>
get
(
String
host
,
int
port
,
String
path
)
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_test/lib/src/window.dart
View file @
989f8644
...
...
@@ -59,7 +59,7 @@ class TestWindow implements ui.SingletonFlutterWindow {
double
?
_devicePixelRatio
;
/// Hides the real device pixel ratio and reports the given [devicePixelRatio]
/// instead.
set
devicePixelRatioTestValue
(
double
devicePixelRatio
)
{
set
devicePixelRatioTestValue
(
double
devicePixelRatio
)
{
// ignore: avoid_setters_without_getters
_devicePixelRatio
=
devicePixelRatio
;
onMetricsChanged
?.
call
();
}
...
...
@@ -75,7 +75,7 @@ class TestWindow implements ui.SingletonFlutterWindow {
ui
.
Size
?
_physicalSizeTestValue
;
/// Hides the real physical size and reports the given [physicalSizeTestValue]
/// instead.
set
physicalSizeTestValue
(
ui
.
Size
physicalSizeTestValue
)
{
set
physicalSizeTestValue
(
ui
.
Size
physicalSizeTestValue
)
{
// ignore: avoid_setters_without_getters
_physicalSizeTestValue
=
physicalSizeTestValue
;
onMetricsChanged
?.
call
();
}
...
...
@@ -91,7 +91,7 @@ class TestWindow implements ui.SingletonFlutterWindow {
ui
.
WindowPadding
?
_viewInsetsTestValue
;
/// Hides the real view insets and reports the given [viewInsetsTestValue]
/// instead.
set
viewInsetsTestValue
(
ui
.
WindowPadding
viewInsetsTestValue
)
{
set
viewInsetsTestValue
(
ui
.
WindowPadding
viewInsetsTestValue
)
{
// ignore: avoid_setters_without_getters
_viewInsetsTestValue
=
viewInsetsTestValue
;
onMetricsChanged
?.
call
();
}
...
...
@@ -107,7 +107,7 @@ class TestWindow implements ui.SingletonFlutterWindow {
ui
.
WindowPadding
?
_viewPaddingTestValue
;
/// Hides the real view padding and reports the given [paddingTestValue]
/// instead.
set
viewPaddingTestValue
(
ui
.
WindowPadding
viewPaddingTestValue
)
{
set
viewPaddingTestValue
(
ui
.
WindowPadding
viewPaddingTestValue
)
{
// ignore: avoid_setters_without_getters
_viewPaddingTestValue
=
viewPaddingTestValue
;
onMetricsChanged
?.
call
();
}
...
...
@@ -122,7 +122,7 @@ class TestWindow implements ui.SingletonFlutterWindow {
ui
.
WindowPadding
get
padding
=>
_paddingTestValue
??
_window
.
padding
;
ui
.
WindowPadding
?
_paddingTestValue
;
/// Hides the real padding and reports the given [paddingTestValue] instead.
set
paddingTestValue
(
ui
.
WindowPadding
paddingTestValue
)
{
set
paddingTestValue
(
ui
.
WindowPadding
paddingTestValue
)
{
// ignore: avoid_setters_without_getters
_paddingTestValue
=
paddingTestValue
;
onMetricsChanged
?.
call
();
}
...
...
@@ -136,7 +136,7 @@ class TestWindow implements ui.SingletonFlutterWindow {
ui
.
WindowPadding
get
systemGestureInsets
=>
_systemGestureInsetsTestValue
??
_window
.
systemGestureInsets
;
ui
.
WindowPadding
?
_systemGestureInsetsTestValue
;
/// Hides the real system gesture insets and reports the given [systemGestureInsetsTestValue] instead.
set
systemGestureInsetsTestValue
(
ui
.
WindowPadding
systemGestureInsetsTestValue
)
{
set
systemGestureInsetsTestValue
(
ui
.
WindowPadding
systemGestureInsetsTestValue
)
{
// ignore: avoid_setters_without_getters
_systemGestureInsetsTestValue
=
systemGestureInsetsTestValue
;
onMetricsChanged
?.
call
();
}
...
...
@@ -157,7 +157,7 @@ class TestWindow implements ui.SingletonFlutterWindow {
ui
.
Locale
get
locale
=>
_localeTestValue
??
platformDispatcher
.
locale
;
ui
.
Locale
?
_localeTestValue
;
/// Hides the real locale and reports the given [localeTestValue] instead.
set
localeTestValue
(
ui
.
Locale
localeTestValue
)
{
set
localeTestValue
(
ui
.
Locale
localeTestValue
)
{
// ignore: avoid_setters_without_getters
_localeTestValue
=
localeTestValue
;
onLocaleChanged
?.
call
();
}
...
...
@@ -171,7 +171,7 @@ class TestWindow implements ui.SingletonFlutterWindow {
List
<
ui
.
Locale
>
get
locales
=>
_localesTestValue
??
platformDispatcher
.
locales
;
List
<
ui
.
Locale
>?
_localesTestValue
;
/// Hides the real locales and reports the given [localesTestValue] instead.
set
localesTestValue
(
List
<
ui
.
Locale
>
localesTestValue
)
{
set
localesTestValue
(
List
<
ui
.
Locale
>
localesTestValue
)
{
// ignore: avoid_setters_without_getters
_localesTestValue
=
localesTestValue
;
onLocaleChanged
?.
call
();
}
...
...
@@ -192,7 +192,7 @@ class TestWindow implements ui.SingletonFlutterWindow {
String
get
initialLifecycleState
=>
_initialLifecycleStateTestValue
;
String
_initialLifecycleStateTestValue
=
''
;
/// Sets a faked initialLifecycleState for testing.
set
initialLifecycleStateTestValue
(
String
state
)
{
set
initialLifecycleStateTestValue
(
String
state
)
{
// ignore: avoid_setters_without_getters
_initialLifecycleStateTestValue
=
state
;
}
...
...
@@ -201,7 +201,7 @@ class TestWindow implements ui.SingletonFlutterWindow {
double
?
_textScaleFactorTestValue
;
/// Hides the real text scale factor and reports the given
/// [textScaleFactorTestValue] instead.
set
textScaleFactorTestValue
(
double
textScaleFactorTestValue
)
{
set
textScaleFactorTestValue
(
double
textScaleFactorTestValue
)
{
// ignore: avoid_setters_without_getters
_textScaleFactorTestValue
=
textScaleFactorTestValue
;
onTextScaleFactorChanged
?.
call
();
}
...
...
@@ -223,7 +223,7 @@ class TestWindow implements ui.SingletonFlutterWindow {
}
/// Hides the real text scale factor and reports the given
/// [platformBrightnessTestValue] instead.
set
platformBrightnessTestValue
(
ui
.
Brightness
platformBrightnessTestValue
)
{
set
platformBrightnessTestValue
(
ui
.
Brightness
platformBrightnessTestValue
)
{
// ignore: avoid_setters_without_getters
_platformBrightnessTestValue
=
platformBrightnessTestValue
;
onPlatformBrightnessChanged
?.
call
();
}
...
...
@@ -239,7 +239,7 @@ class TestWindow implements ui.SingletonFlutterWindow {
bool
?
_alwaysUse24HourFormatTestValue
;
/// Hides the real clock format and reports the given
/// [alwaysUse24HourFormatTestValue] instead.
set
alwaysUse24HourFormatTestValue
(
bool
alwaysUse24HourFormatTestValue
)
{
set
alwaysUse24HourFormatTestValue
(
bool
alwaysUse24HourFormatTestValue
)
{
// ignore: avoid_setters_without_getters
_alwaysUse24HourFormatTestValue
=
alwaysUse24HourFormatTestValue
;
}
/// Deletes any existing test clock format and returns to using the real clock
...
...
@@ -288,7 +288,7 @@ class TestWindow implements ui.SingletonFlutterWindow {
String
?
_defaultRouteNameTestValue
;
/// Hides the real default route name and reports the given
/// [defaultRouteNameTestValue] instead.
set
defaultRouteNameTestValue
(
String
defaultRouteNameTestValue
)
{
set
defaultRouteNameTestValue
(
String
defaultRouteNameTestValue
)
{
// ignore: avoid_setters_without_getters
_defaultRouteNameTestValue
=
defaultRouteNameTestValue
;
}
/// Deletes any existing test default route name and returns to using the real
...
...
@@ -312,7 +312,7 @@ class TestWindow implements ui.SingletonFlutterWindow {
bool
?
_semanticsEnabledTestValue
;
/// Hides the real semantics enabled and reports the given
/// [semanticsEnabledTestValue] instead.
set
semanticsEnabledTestValue
(
bool
semanticsEnabledTestValue
)
{
set
semanticsEnabledTestValue
(
bool
semanticsEnabledTestValue
)
{
// ignore: avoid_setters_without_getters
_semanticsEnabledTestValue
=
semanticsEnabledTestValue
;
onSemanticsEnabledChanged
?.
call
();
}
...
...
@@ -342,7 +342,7 @@ class TestWindow implements ui.SingletonFlutterWindow {
ui
.
AccessibilityFeatures
?
_accessibilityFeaturesTestValue
;
/// Hides the real accessibility features and reports the given
/// [accessibilityFeaturesTestValue] instead.
set
accessibilityFeaturesTestValue
(
ui
.
AccessibilityFeatures
accessibilityFeaturesTestValue
)
{
set
accessibilityFeaturesTestValue
(
ui
.
AccessibilityFeatures
accessibilityFeaturesTestValue
)
{
// ignore: avoid_setters_without_getters
_accessibilityFeaturesTestValue
=
accessibilityFeaturesTestValue
;
onAccessibilityFeaturesChanged
?.
call
();
}
...
...
@@ -358,7 +358,7 @@ class TestWindow implements ui.SingletonFlutterWindow {
ui
.
ViewConfiguration
?
_viewConfiguration
;
/// Hide the real view configuration and report the provided [value] instead.
set
viewConfigurationTestValue
(
ui
.
ViewConfiguration
?
value
)
{
set
viewConfigurationTestValue
(
ui
.
ViewConfiguration
?
value
)
{
// ignore: avoid_setters_without_getters
_viewConfiguration
=
value
;
onMetricsChanged
?.
call
();
}
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/base/bot_detector.dart
View file @
989f8644
...
...
@@ -37,14 +37,15 @@ class BotDetector {
// When set, GA logs to a local file (normally for tests) so we don't need to filter.
||
_platform
.
environment
.
containsKey
(
'FLUTTER_ANALYTICS_LOG_FILE'
)
)
{
return
_persistentToolState
.
runningOnBot
=
false
;
_persistentToolState
.
setIsRunningOnBot
(
false
);
return
false
;
}
if
(
_persistentToolState
.
isRunningOnBot
!=
null
)
{
return
_persistentToolState
.
isRunningOnBot
!;
}
return
_persistentToolState
.
runningOnBo
t
=
_platform
.
environment
[
'BOT'
]
==
'true'
final
bool
resul
t
=
_platform
.
environment
[
'BOT'
]
==
'true'
// https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables
||
_platform
.
environment
[
'TRAVIS'
]
==
'true'
...
...
@@ -77,6 +78,9 @@ class BotDetector {
// Property when running on Azure.
||
await
_azureDetector
.
isRunningOnAzure
;
_persistentToolState
.
setIsRunningOnBot
(
result
);
return
result
;
}
}
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/base/terminal.dart
View file @
989f8644
...
...
@@ -111,6 +111,7 @@ abstract class Terminal {
String
clearScreen
();
bool
get
singleCharMode
;
set
singleCharMode
(
bool
value
);
/// Return keystrokes from the console.
...
...
@@ -269,6 +270,14 @@ class AnsiTerminal implements Terminal {
@override
String
clearScreen
()
=>
supportsColor
?
clear
:
'
\n\n
'
;
@override
bool
get
singleCharMode
{
if
(!
_stdio
.
stdinHasTerminal
)
{
return
false
;
}
final
io
.
Stdin
stdin
=
_stdio
.
stdin
as
io
.
Stdin
;
return
stdin
.
lineMode
&&
stdin
.
echoMode
;
}
@override
set
singleCharMode
(
bool
value
)
{
if
(!
_stdio
.
stdinHasTerminal
)
{
...
...
@@ -365,6 +374,8 @@ class _TestTerminal implements Terminal {
throw
UnsupportedError
(
'promptForCharInput not supported in the test terminal.'
);
}
@override
bool
get
singleCharMode
=>
false
;
@override
set
singleCharMode
(
bool
value
)
{
}
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/commands/upgrade.dart
View file @
989f8644
...
...
@@ -198,12 +198,12 @@ class UpgradeCommandRunner {
// re-entrantly with the `--continue` flag
Future
<
void
>
runCommandSecondHalf
(
FlutterVersion
flutterVersion
)
async
{
// Make sure the welcome message re-display is delayed until the end.
globals
.
persistentToolState
.
redisplayWelcomeMessage
=
false
;
globals
.
persistentToolState
.
setShouldRedisplayWelcomeMessage
(
false
)
;
await
precacheArtifacts
();
await
updatePackages
(
flutterVersion
);
await
runDoctor
();
// Force the welcome message to re-display following the upgrade.
globals
.
persistentToolState
.
redisplayWelcomeMessage
=
true
;
globals
.
persistentToolState
.
setShouldRedisplayWelcomeMessage
(
true
)
;
}
Future
<
bool
>
hasUncommittedChanges
()
async
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/ios/devices.dart
View file @
989f8644
...
...
@@ -704,6 +704,7 @@ class IOSDeviceLogReader extends DeviceLogReader {
}
/// Log reader will listen to [debugger.logLines] and will detach debugger on dispose.
IOSDeployDebugger
get
debuggerStream
=>
_iosDeployDebugger
;
set
debuggerStream
(
IOSDeployDebugger
debugger
)
{
// Logging is gathered from syslog on iOS 13 and earlier.
if
(
_majorSdkVersion
<
minimumUniversalLoggingSdkVersion
)
{
...
...
@@ -736,14 +737,13 @@ class IOSDeviceLogReader extends DeviceLogReader {
_linesController
.
close
();
}
});
assert
(
_
idevicesyslogProcess
==
null
);
_
idevicesyslogProcess
=
process
;
assert
(
idevicesyslogProcess
==
null
);
idevicesyslogProcess
=
process
;
});
}
@visibleForTesting
set
idevicesyslogProcess
(
Process
process
)
=>
_idevicesyslogProcess
=
process
;
Process
_idevicesyslogProcess
;
Process
idevicesyslogProcess
;
// Returns a stateful line handler to properly capture multiline output.
//
...
...
@@ -781,7 +781,7 @@ class IOSDeviceLogReader extends DeviceLogReader {
for
(
final
StreamSubscription
<
void
>
loggingSubscription
in
_loggingSubscriptions
)
{
loggingSubscription
.
cancel
();
}
_
idevicesyslogProcess
?.
kill
();
idevicesyslogProcess
?.
kill
();
_iosDeployDebugger
?.
detach
();
}
}
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/persistent_tool_state.dart
View file @
989f8644
...
...
@@ -38,7 +38,7 @@ abstract class PersistentToolState {
///
/// May give null if the value has not been set.
bool
?
get
shouldRedisplayWelcomeMessage
;
set
r
edisplayWelcomeMessage
(
bool
value
);
// Enforced nonnull setter.
void
setShouldR
edisplayWelcomeMessage
(
bool
value
);
// Enforced nonnull setter.
/// Returns the last active version for a given [channel].
///
...
...
@@ -50,11 +50,11 @@ abstract class PersistentToolState {
/// Return the hash of the last active license terms.
String
?
get
lastActiveLicenseTermsHash
;
set
lastActiveLicenseTerms
(
String
value
);
// Enforced nonnull setter.
void
setLastActiveLicenseTermsHash
(
String
value
);
// Enforced nonnull setter.
/// Whether this client was already determined to be or not be a bot.
bool
?
get
isRunningOnBot
;
set
r
unningOnBot
(
bool
value
);
// Enforced nonnull setter.
void
setIsR
unningOnBot
(
bool
value
);
// Enforced nonnull setter.
}
class
_DefaultPersistentToolState
implements
PersistentToolState
{
...
...
@@ -98,7 +98,7 @@ class _DefaultPersistentToolState implements PersistentToolState {
}
@override
set
r
edisplayWelcomeMessage
(
bool
value
)
{
void
setShouldR
edisplayWelcomeMessage
(
bool
value
)
{
_config
.
setValue
(
_kRedisplayWelcomeMessage
,
value
);
}
...
...
@@ -120,7 +120,7 @@ class _DefaultPersistentToolState implements PersistentToolState {
String
?
get
lastActiveLicenseTermsHash
=>
_config
.
getValue
(
_kLicenseHash
)
as
String
?;
@override
set
lastActiveLicenseTerms
(
String
value
)
{
void
setLastActiveLicenseTermsHash
(
String
value
)
{
_config
.
setValue
(
_kLicenseHash
,
value
);
}
...
...
@@ -132,7 +132,7 @@ class _DefaultPersistentToolState implements PersistentToolState {
bool
?
get
isRunningOnBot
=>
_config
.
getValue
(
_kBotKey
)
as
bool
?;
@override
set
r
unningOnBot
(
bool
value
)
{
void
setIsR
unningOnBot
(
bool
value
)
{
_config
.
setValue
(
_kBotKey
,
value
);
}
}
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/reporting/first_run.dart
View file @
989f8644
...
...
@@ -67,7 +67,7 @@ class FirstRunMessenger {
/// Update the cached license terms hash once the new terms have been displayed.
void confirmLicenseTermsDisplayed() {
_persistentToolState.
lastActiveLicenseTerms = _currentHash
;
_persistentToolState.
setLastActiveLicenseTermsHash(_currentHash)
;
}
/// The hash of the current license representation.
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
989f8644
...
...
@@ -188,8 +188,6 @@ abstract class FlutterCommand extends Command<void> {
bool
_excludeDebug
=
false
;
bool
_excludeRelease
=
false
;
BuildMode
_defaultBuildMode
;
void
requiresPubspecYaml
()
{
_requiresPubspecYaml
=
true
;
}
...
...
@@ -833,9 +831,11 @@ abstract class FlutterCommand extends Command<void> {
usesTrackWidgetCreation
(
verboseHelp:
verboseHelp
);
}
set
defaultBuildMode
(
BuildMode
value
)
{
_defaultBuildMode
=
value
;
}
/// The build mode that this command will use if no build mode is
/// explicitly specified.
///
/// Use [getBuildMode] to obtain the actual effective build mode.
BuildMode
defaultBuildMode
;
BuildMode
getBuildMode
()
{
// No debug when _excludeDebug is true.
...
...
@@ -865,7 +865,7 @@ abstract class FlutterCommand extends Command<void> {
if
(
jitReleaseResult
)
{
return
BuildMode
.
jitRelease
;
}
return
_
defaultBuildMode
;
return
defaultBuildMode
;
}
void
usesFlavorOption
()
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/test/test_compiler.dart
View file @
989f8644
...
...
@@ -81,7 +81,7 @@ class TestCompiler {
Future
<
String
>
compile
(
Uri
mainDart
)
{
final
Completer
<
String
>
completer
=
Completer
<
String
>();
if
(
compilerController
.
isClosed
)
{
return
null
;
return
Future
<
String
>.
value
(
null
)
;
}
compilerController
.
add
(
CompilationRequest
(
mainDart
,
completer
));
return
completer
.
future
;
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/web/web_device.dart
View file @
989f8644
...
...
@@ -394,7 +394,7 @@ class WebServerDevice extends Device {
void
clearLogs
()
{
}
@override
Future
<
String
>
get
emulatorId
=>
null
;
Future
<
String
>
get
emulatorId
async
=>
null
;
DeviceLogReader
_logReader
;
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/windows/windows_device.dart
View file @
989f8644
...
...
@@ -125,7 +125,7 @@ class WindowsUWPDevice extends Device {
Future
<
void
>
dispose
()
async
{
}
@override
Future
<
String
>
get
emulatorId
=>
null
;
Future
<
String
>
get
emulatorId
async
=>
null
;
@override
FutureOr
<
DeviceLogReader
>
getLogReader
({
covariant
BuildableUwpApp
app
,
bool
includePastLogs
=
false
})
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/commands.shard/hermetic/custom_devices.dart
View file @
989f8644
...
...
@@ -233,6 +233,8 @@ class FakeTerminal implements Terminal {
displayAcceptedCharacters:
displayAcceptedCharacters
);
@override
bool
get
singleCharMode
=>
terminal
.
singleCharMode
;
@override
set
singleCharMode
(
bool
value
)
=>
terminal
.
singleCharMode
=
value
;
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/commands.shard/hermetic/doctor_test.dart
View file @
989f8644
...
...
@@ -672,7 +672,7 @@ class NoOpDoctor implements Doctor {
List
<
ValidatorTask
>
startValidatorTasks
()
=>
<
ValidatorTask
>[];
@override
Future
<
void
>
summary
()
=>
null
;
Future
<
void
>
summary
()
async
{
}
@override
List
<
DoctorValidator
>
get
validators
=>
<
DoctorValidator
>[];
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/general.shard/base/error_handling_io_test.dart
View file @
989f8644
...
...
@@ -1264,6 +1264,10 @@ class FakeFileSystem extends Fake implements FileSystem {
@override
p
.
Context
get
path
=>
p
.
Context
();
@override
Directory
get
currentDirectory
{
throw
UnimplementedError
();
}
@override
set
currentDirectory
(
dynamic
path
)
{
}
}
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/general.shard/base/terminal_test.dart
View file @
989f8644
...
...
@@ -236,6 +236,7 @@ class TestTerminal extends AnsiTerminal {
return
mockStdInStream
;
}
@override
bool
singleCharMode
=
false
;
@override
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/general.shard/persistent_tool_state_test.dart
View file @
989f8644
...
...
@@ -21,10 +21,10 @@ void main() {
logger:
BufferLogger
.
test
(),
);
expect
(
state1
.
shouldRedisplayWelcomeMessage
,
null
);
state1
.
redisplayWelcomeMessage
=
true
;
state1
.
setShouldRedisplayWelcomeMessage
(
true
)
;
expect
(
stateFile
.
existsSync
(),
true
);
expect
(
state1
.
shouldRedisplayWelcomeMessage
,
true
);
state1
.
redisplayWelcomeMessage
=
false
;
state1
.
setShouldRedisplayWelcomeMessage
(
false
)
;
expect
(
state1
.
shouldRedisplayWelcomeMessage
,
false
);
final
PersistentToolState
state2
=
PersistentToolState
.
test
(
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/general.shard/reporting/first_run_test.dart
View file @
989f8644
...
...
@@ -50,7 +50,7 @@ FirstRunMessenger setUpFirstRunMessenger({bool? redisplayWelcomeMessage, bool te
final
MemoryFileSystem
fileSystem
=
MemoryFileSystem
.
test
();
final
PersistentToolState
state
=
PersistentToolState
.
test
(
directory:
fileSystem
.
currentDirectory
,
logger:
BufferLogger
.
test
());
if
(
redisplayWelcomeMessage
!=
null
)
{
state
.
redisplayWelcomeMessage
=
redisplayWelcomeMessage
;
state
.
setShouldRedisplayWelcomeMessage
(
redisplayWelcomeMessage
)
;
}
if
(
test
)
{
return
TestFirstRunMessenger
(
state
);
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/general.shard/resident_devtools_handler_test.dart
View file @
989f8644
...
...
@@ -444,9 +444,7 @@ class FakeDevtoolsLauncher extends Fake implements DevtoolsLauncher {
Uri
devToolsUrl
;
@override
Future
<
DevToolsServerAddress
>
serve
()
{
return
null
;
}
Future
<
DevToolsServerAddress
>
serve
()
async
=>
null
;
@override
Future
<
void
>
get
ready
=>
readyCompleter
.
future
;
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/general.shard/resident_web_runner_test.dart
View file @
989f8644
...
...
@@ -494,7 +494,7 @@ void main() {
_setupMocks
();
final
TestChromiumLauncher
chromiumLauncher
=
TestChromiumLauncher
();
final
Chromium
chrome
=
Chromium
(
1
,
chromeConnection
,
chromiumLauncher:
chromiumLauncher
);
chromiumLauncher
.
instance
=
chrome
;
chromiumLauncher
.
setInstance
(
chrome
)
;
flutterDevice
.
device
=
GoogleChromeDevice
(
fileSystem:
fileSystem
,
...
...
@@ -551,7 +551,7 @@ void main() {
_setupMocks
();
final
TestChromiumLauncher
chromiumLauncher
=
TestChromiumLauncher
();
final
Chromium
chrome
=
Chromium
(
1
,
chromeConnection
,
chromiumLauncher:
chromiumLauncher
);
chromiumLauncher
.
instance
=
chrome
;
chromiumLauncher
.
setInstance
(
chrome
)
;
flutterDevice
.
device
=
GoogleChromeDevice
(
fileSystem:
fileSystem
,
...
...
@@ -848,7 +848,7 @@ void main() {
final
FakeChromeConnection
chromeConnection
=
FakeChromeConnection
();
final
TestChromiumLauncher
chromiumLauncher
=
TestChromiumLauncher
();
final
Chromium
chrome
=
Chromium
(
1
,
chromeConnection
,
chromiumLauncher:
chromiumLauncher
);
chromiumLauncher
.
instance
=
chrome
;
chromiumLauncher
.
setInstance
(
chrome
)
;
flutterDevice
.
device
=
GoogleChromeDevice
(
fileSystem:
fileSystem
,
...
...
@@ -1220,11 +1220,11 @@ class FakeWipConnection extends Fake implements WipConnection {
class
TestChromiumLauncher
implements
ChromiumLauncher
{
TestChromiumLauncher
();
set
instance
(
Chromium
chromium
)
{
bool
_hasInstance
=
false
;
void
setInstance
(
Chromium
chromium
)
{
_hasInstance
=
true
;
currentCompleter
.
complete
(
chromium
);
}
bool
_hasInstance
=
false
;
@override
Completer
<
Chromium
>
currentCompleter
=
Completer
<
Chromium
>();
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/src/context.dart
View file @
989f8644
...
...
@@ -312,9 +312,7 @@ class FakeXcodeProjectInterpreter implements XcodeProjectInterpreter {
}
@override
Future
<
void
>
cleanWorkspace
(
String
workspacePath
,
String
scheme
,
{
bool
verbose
=
false
})
{
return
null
;
}
Future
<
void
>
cleanWorkspace
(
String
workspacePath
,
String
scheme
,
{
bool
verbose
=
false
})
async
{
}
@override
Future
<
XcodeProjectInfo
>
getInfo
(
String
projectPath
,
{
String
projectFilename
})
async
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/src/fake_http_client.dart
View file @
989f8644
...
...
@@ -161,19 +161,13 @@ class FakeHttpClient implements HttpClient {
}
@override
set
authenticate
(
Future
<
bool
>
Function
(
Uri
url
,
String
scheme
,
String
realm
)?
f
)
{
throw
UnimplementedError
();
}
Future
<
bool
>
Function
(
Uri
url
,
String
scheme
,
String
realm
)?
authenticate
;
@override
set
authenticateProxy
(
Future
<
bool
>
Function
(
String
host
,
int
port
,
String
scheme
,
String
realm
)?
f
)
{
throw
UnimplementedError
();
}
Future
<
bool
>
Function
(
String
host
,
int
port
,
String
scheme
,
String
realm
)?
authenticateProxy
;
@override
set
badCertificateCallback
(
bool
Function
(
X509Certificate
cert
,
String
host
,
int
port
)?
callback
)
{
throw
UnimplementedError
();
}
bool
Function
(
X509Certificate
cert
,
String
host
,
int
port
)?
badCertificateCallback
;
@override
void
close
({
bool
force
=
false
})
{
}
...
...
@@ -190,7 +184,7 @@ class FakeHttpClient implements HttpClient {
}
@override
set
findProxy
(
String
Function
(
Uri
url
)?
f
)
{
}
String
Function
(
Uri
url
)?
findProxy
;
@override
Future
<
HttpClientRequest
>
get
(
String
host
,
int
port
,
String
path
)
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_web_plugins/lib/src/plugin_event_channel.dart
View file @
989f8644
...
...
@@ -71,7 +71,7 @@ class PluginEventChannel<T> {
'Replace calls to the "controller" setter with calls to the "setController" method. '
'This feature was deprecated after v1.23.0-7.0.pre.'
)
set
controller
(
StreamController
<
T
>
controller
)
{
set
controller
(
StreamController
<
T
>
controller
)
{
// ignore: avoid_setters_without_getters
setController
(
controller
);
}
...
...
This diff is collapsed.
Click to expand it.
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