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
7820641a
Unverified
Commit
7820641a
authored
Feb 12, 2020
by
Jacob Richman
Committed by
GitHub
Feb 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Diagnostics subclasses that had the wrong default value for the named parameter. (#50645)
parent
24f8f799
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
9 deletions
+33
-9
colors.dart
packages/flutter/lib/src/cupertino/colors.dart
+1
-1
assertions.dart
packages/flutter/lib/src/foundation/assertions.dart
+2
-2
diagnostics.dart
packages/flutter/lib/src/foundation/diagnostics.dart
+2
-2
object.dart
packages/flutter/lib/src/rendering/object.dart
+1
-1
diagnostics_test.dart
packages/flutter/test/foundation/diagnostics_test.dart
+24
-0
theme_test.dart
packages/flutter/test/material/theme_test.dart
+1
-1
list_view_test.dart
packages/flutter/test/widgets/list_view_test.dart
+1
-1
widget_inspector_test.dart
packages/flutter/test/widgets/widget_inspector_test.dart
+1
-1
No files found.
packages/flutter/lib/src/cupertino/colors.dart
View file @
7820641a
...
...
@@ -1033,7 +1033,7 @@ class CupertinoDynamicColor extends Color with DiagnosticableMixin implements Di
}
@override
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
debug
})
{
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
info
})
{
String
toString
(
String
name
,
Color
color
)
{
final
String
marker
=
color
==
_effectiveColor
?
'*'
:
''
;
return
'
$marker$name
=
$color$marker
'
;
...
...
packages/flutter/lib/src/foundation/assertions.dart
View file @
7820641a
...
...
@@ -586,7 +586,7 @@ class FlutterErrorDetails extends Diagnosticable {
}
@override
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
debug
})
{
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
info
})
{
return
toDiagnosticsNode
(
style:
DiagnosticsTreeStyle
.
error
).
toStringDeep
(
minLevel:
minLevel
);
}
...
...
@@ -889,7 +889,7 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti
String
toStringShort
()
=>
'FlutterError'
;
@override
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
debug
})
{
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
info
})
{
// Avoid wrapping lines.
final
TextTreeRenderer
renderer
=
TextTreeRenderer
(
wrapWidth:
4000000000
);
return
diagnostics
.
map
((
DiagnosticsNode
node
)
=>
renderer
.
render
(
node
).
trimRight
()).
join
(
'
\n
'
);
...
...
packages/flutter/lib/src/foundation/diagnostics.dart
View file @
7820641a
...
...
@@ -3087,7 +3087,7 @@ mixin DiagnosticableMixin {
String
toStringShort
()
=>
describeIdentity
(
this
);
@override
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
debug
})
{
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
info
})
{
String
fullString
;
assert
(()
{
fullString
=
toDiagnosticsNode
(
style:
DiagnosticsTreeStyle
.
singleLine
).
toString
(
minLevel:
minLevel
);
...
...
@@ -3442,7 +3442,7 @@ abstract class DiagnosticableTree extends Diagnosticable {
/// This mixin is identical to class [DiagnosticableTree].
mixin
DiagnosticableTreeMixin
implements
DiagnosticableTree
{
@override
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
debug
})
{
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
info
})
{
return
toDiagnosticsNode
(
style:
DiagnosticsTreeStyle
.
singleLine
).
toString
(
minLevel:
minLevel
);
}
...
...
packages/flutter/lib/src/rendering/object.dart
View file @
7820641a
...
...
@@ -2774,7 +2774,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
}
@override
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
debug
})
=>
toStringShort
();
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
info
})
=>
toStringShort
();
/// Returns a description of the tree rooted at this node.
/// If the prefix argument is provided, then every line in the output
...
...
packages/flutter/test/foundation/diagnostics_test.dart
View file @
7820641a
...
...
@@ -802,6 +802,30 @@ void main() {
);
});
test
(
'toString test'
,
()
{
final
TestTree
tree
=
TestTree
(
properties:
<
DiagnosticsNode
>[
StringProperty
(
'stringProperty1'
,
'value1'
,
quoted:
false
),
DoubleProperty
(
'doubleProperty1'
,
42.5
),
DoubleProperty
(
'roundedProperty'
,
1.0
/
3.0
),
StringProperty
(
'DO_NOT_SHOW'
,
'DO_NOT_SHOW'
,
level:
DiagnosticLevel
.
hidden
,
quoted:
false
),
StringProperty
(
'DEBUG_ONLY'
,
'DEBUG_ONLY'
,
level:
DiagnosticLevel
.
debug
,
quoted:
false
),
],
// child to verify that children are not included in the toString.
children:
<
TestTree
>[
TestTree
(
name:
'node A'
)],
);
expect
(
tree
.
toString
(),
equalsIgnoringHashCodes
(
'TestTree#00000(stringProperty1: value1, doubleProperty1: 42.5, roundedProperty: 0.3)'
),
);
expect
(
tree
.
toString
(
minLevel:
DiagnosticLevel
.
debug
),
equalsIgnoringHashCodes
(
'TestTree#00000(stringProperty1: value1, doubleProperty1: 42.5, roundedProperty: 0.3, DEBUG_ONLY: DEBUG_ONLY)'
),
);
});
test
(
'transition test'
,
()
{
// Test multiple styles integrating together in the same tree due to using
// transition to go between styles that would otherwise be incompatible.
...
...
packages/flutter/test/material/theme_test.dart
View file @
7820641a
...
...
@@ -747,7 +747,7 @@ class _TextStyleProxy implements TextStyle {
List
<
ui
.
FontFeature
>
get
fontFeatures
=>
_delegate
.
fontFeatures
;
@override
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
debug
})
=>
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
info
})
=>
super
.
toString
();
@override
...
...
packages/flutter/test/widgets/list_view_test.dart
View file @
7820641a
...
...
@@ -27,7 +27,7 @@ class Alive extends StatefulWidget {
AliveState
createState
()
=>
AliveState
();
@override
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
debug
})
=>
'
$index
$alive
'
;
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
info
})
=>
'
$index
$alive
'
;
}
class
AliveState
extends
State
<
Alive
>
with
AutomaticKeepAliveClientMixin
{
...
...
packages/flutter/test/widgets/widget_inspector_test.dart
View file @
7820641a
...
...
@@ -117,7 +117,7 @@ class CyclicDiagnostic extends DiagnosticableTree {
// We have to override toString to avoid the toString call itself triggering a
// stack overflow.
@override
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
debug
})
{
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
info
})
{
return
toStringShort
();
}
...
...
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