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
2163731c
Unverified
Commit
2163731c
authored
Jun 16, 2020
by
Greg Spencer
Committed by
GitHub
Jun 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove DiagnosticableMixin in favor of Diagnosticable (#58635)
parent
73560d4b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
48 deletions
+6
-48
actions.dart
dev/manual_tests/lib/actions.dart
+1
-1
diagnostics.dart
packages/flutter/lib/src/foundation/diagnostics.dart
+4
-46
ticker.dart
packages/flutter/lib/src/scheduler/ticker.dart
+1
-1
No files found.
dev/manual_tests/lib/actions.dart
View file @
2163731c
...
...
@@ -22,7 +22,7 @@ void main() {
///
/// Instances of this class are returned from [UndoableAction]s and placed on
/// the undo stack when they are invoked.
class
Memento
extends
Object
with
Diagnosticable
Mixin
implements
Diagnosticable
{
class
Memento
extends
Object
with
Diagnosticable
{
const
Memento
({
@required
this
.
name
,
@required
this
.
undo
,
...
...
packages/flutter/lib/src/foundation/diagnostics.dart
View file @
2163731c
...
...
@@ -2913,7 +2913,7 @@ class DiagnosticsProperty<T> extends DiagnosticsNode {
/// [DiagnosticsNode] that lazily calls the associated [Diagnosticable] [value]
/// to implement [getChildren] and [getProperties].
class
DiagnosticableNode
<
T
extends
Diagnosticable
>
extends
DiagnosticsNode
{
/// Create a diagnostics describing a [Diagnosticable
Mixin
] value.
/// Create a diagnostics describing a [Diagnosticable] value.
///
/// The [value] argument must not be null.
DiagnosticableNode
({
...
...
@@ -3040,7 +3040,7 @@ String describeEnum(Object enumEntry) {
}
/// Builder to accumulate properties and configuration used to assemble a
/// [DiagnosticsNode] from a [Diagnosticable
Mixin
] object.
/// [DiagnosticsNode] from a [Diagnosticable] object.
class
DiagnosticPropertiesBuilder
{
/// Creates a [DiagnosticPropertiesBuilder] with [properties] initialize to
/// an empty array.
...
...
@@ -3067,48 +3067,6 @@ class DiagnosticPropertiesBuilder {
String
emptyBodyDescription
;
}
// TODO(gspencergoog): Remove DiagnosticableMixin once the mixin Diagnosticable is in stable.
// https://github.com/flutter/flutter/issues/50498
/// A mixin class implementing the [Diagnosticable] interface that provides
/// string and [DiagnosticsNode] debug representations describing the properties
/// of an object.
///
/// _This mixin exists only to support plugins and packages that require older
/// Flutter versions: Use the identical mixin [Diagnosticable] instead for all
/// new code. If you are authoring code that needs to work on the stable branch
/// as well as master (in a package, for instance), mix this in instead of
/// extending [Diagnosticable]. Once [Diagnosticable] as a mixin reaches the
/// stable channel, this class will be deprecated._
mixin
DiagnosticableMixin
implements
Diagnosticable
{
@override
String
toStringShort
()
=>
describeIdentity
(
this
);
@override
String
toString
({
DiagnosticLevel
minLevel
=
DiagnosticLevel
.
info
})
{
String
fullString
;
assert
(()
{
fullString
=
toDiagnosticsNode
(
style:
DiagnosticsTreeStyle
.
singleLine
).
toString
(
minLevel:
minLevel
);
return
true
;
}());
return
fullString
??
toStringShort
();
}
@override
DiagnosticsNode
toDiagnosticsNode
({
String
name
,
DiagnosticsTreeStyle
style
})
{
return
DiagnosticableNode
<
Diagnosticable
>(
name:
name
,
value:
this
,
style:
style
,
);
}
@override
@protected
@mustCallSuper
void
debugFillProperties
(
DiagnosticPropertiesBuilder
properties
)
{
}
}
// Examples can assume:
// class ExampleSuperclass with Diagnosticable { String message; double stepWidth; double scale; double paintExtent; double hitTestExtent; double paintExtend; double maxWidth; bool primary; double progress; int maxLines; Duration duration; int depth; dynamic boxShadow; dynamic style; bool hasSize; Matrix4 transform; Map<Listenable, VoidCallback> handles; Color color; bool obscureText; ImageRepeat repeat; Size size; Widget widget; bool isCurrent; bool keepAlive; TextAlign textAlign; }
...
...
@@ -3395,7 +3353,7 @@ mixin Diagnosticable {
/// See also:
///
/// * [DiagnosticableTreeMixin], a mixin that implements this class.
/// * [Diagnosticable
Mixin
], which should be used instead of this class to
/// * [Diagnosticable], which should be used instead of this class to
/// provide diagnostics for objects without children.
abstract
class
DiagnosticableTree
with
Diagnosticable
{
/// Abstract const constructor. This constructor enables subclasses to provide
...
...
@@ -3712,7 +3670,7 @@ abstract class DiagnosticsSerializationDelegate {
/// will be included.
bool
get
includeProperties
;
/// Whether properties that have a [Diagnosticable
Mixin
] as value should be
/// Whether properties that have a [Diagnosticable] as value should be
/// expanded.
bool
get
expandPropertyValues
;
...
...
packages/flutter/lib/src/scheduler/ticker.dart
View file @
2163731c
...
...
@@ -41,7 +41,7 @@ abstract class TickerProvider {
Ticker
createTicker
(
TickerCallback
onTick
);
}
// TODO(jacobr): make Ticker use Diagnosticable
Mixin
to simplify reporting errors
// TODO(jacobr): make Ticker use Diagnosticable to simplify reporting errors
// related to a ticker.
/// Calls its callback once per animation frame.
///
...
...
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