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
d9cab80c
Commit
d9cab80c
authored
Dec 15, 2015
by
Devon Carew
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #939 from devoncarew/update_service_extensions
remove todos for service extension params
parents
b641d93b
4226b600
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
16 deletions
+5
-16
debug.dart
packages/flutter/lib/src/rendering/debug.dart
+5
-16
No files found.
packages/flutter/lib/src/rendering/debug.dart
View file @
d9cab80c
...
@@ -81,7 +81,7 @@ void initServiceExtensions() {
...
@@ -81,7 +81,7 @@ void initServiceExtensions() {
/// Just respond to the request. Clients can use the existence of this call to
/// Just respond to the request. Clients can use the existence of this call to
/// know that the debug client is a Flutter app.
/// know that the debug client is a Flutter app.
Future
<
developer
.
ServiceExtensionResponse
>
_flutter
(
String
method
,
Map
<
String
,
dynamic
>
parameters
)
{
Future
<
developer
.
ServiceExtensionResponse
>
_flutter
(
String
method
,
Map
<
String
,
String
>
parameters
)
{
return
new
Future
<
developer
.
ServiceExtensionResponse
>.
value
(
return
new
Future
<
developer
.
ServiceExtensionResponse
>.
value
(
new
developer
.
ServiceExtensionResponse
.
result
(
JSON
.
encode
({
new
developer
.
ServiceExtensionResponse
.
result
(
JSON
.
encode
({
'type'
:
'_extensionType'
,
'type'
:
'_extensionType'
,
...
@@ -91,11 +91,9 @@ Future<developer.ServiceExtensionResponse> _flutter(String method, Map<String, d
...
@@ -91,11 +91,9 @@ Future<developer.ServiceExtensionResponse> _flutter(String method, Map<String, d
}
}
/// Toggle the [debugPaintSizeEnabled] setting.
/// Toggle the [debugPaintSizeEnabled] setting.
Future
<
developer
.
ServiceExtensionResponse
>
_debugPaint
(
String
method
,
Map
<
String
,
dynamic
>
parameters
)
{
Future
<
developer
.
ServiceExtensionResponse
>
_debugPaint
(
String
method
,
Map
<
String
,
String
>
parameters
)
{
if
(
parameters
.
containsKey
(
'enabled'
))
{
if
(
parameters
.
containsKey
(
'enabled'
))
{
// TODO(devoncarew): This is a work around for a VM bug: sdk/25208 - all
debugPaintSizeEnabled
=
parameters
[
'enabled'
]
==
'true'
;
// params are coerced to strings.
debugPaintSizeEnabled
=
parameters
[
'enabled'
].
toString
()
==
'true'
;
// Redraw everything - mark the world as dirty.
// Redraw everything - mark the world as dirty.
RenderObjectVisitor
visitor
;
RenderObjectVisitor
visitor
;
...
@@ -116,18 +114,9 @@ Future<developer.ServiceExtensionResponse> _debugPaint(String method, Map<String
...
@@ -116,18 +114,9 @@ Future<developer.ServiceExtensionResponse> _debugPaint(String method, Map<String
}
}
/// Manipulate the scheduler's [timeDilation] field.
/// Manipulate the scheduler's [timeDilation] field.
Future
<
developer
.
ServiceExtensionResponse
>
_timeDilation
(
String
method
,
Map
<
String
,
dynamic
>
parameters
)
{
Future
<
developer
.
ServiceExtensionResponse
>
_timeDilation
(
String
method
,
Map
<
String
,
String
>
parameters
)
{
if
(
parameters
.
containsKey
(
'timeDilation'
))
{
if
(
parameters
.
containsKey
(
'timeDilation'
))
{
// TODO(devoncarew): Workaround for https://github.com/dart-lang/sdk/issues/25208.
timeDilation
=
double
.
parse
(
parameters
[
'timeDilation'
]);
dynamic
param
=
parameters
[
'timeDilation'
];
if
(
param
is
String
)
{
param
=
double
.
parse
(
param
);
}
else
if
(
param
is
num
)
{
param
=
param
.
toDouble
();
}
timeDilation
=
param
;
}
else
{
timeDilation
=
1.0
;
}
}
return
new
Future
<
developer
.
ServiceExtensionResponse
>.
value
(
return
new
Future
<
developer
.
ServiceExtensionResponse
>.
value
(
...
...
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