22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
44
5+ /// @docImport '../console/widgets/description.dart';
6+ library ;
7+
58import 'dart:async' ;
69
710import 'package:collection/collection.dart' ;
@@ -17,23 +20,19 @@ import 'object_group_api.dart';
1720import 'primitives/instance_ref.dart' ;
1821import 'primitives/source_location.dart' ;
1922
20- /// Defines diagnostics data for a [ value] .
23+ /// Defines diagnostics data for a value.
2124///
2225/// [RemoteDiagnosticsNode] provides a high quality multi-line string dump via
23- /// [toStringDeep] . The core members are the [name] , [toDescription] ,
24- /// [getProperties] , [value] , and [getChildren] . All other members exist
25- /// typically to provide hints for how [toStringDeep] and debugging tools should
26- /// format output.
26+ /// [toStringDeep] .
2727///
2828/// See also:
2929///
30- /// * DiagnosticsNode class defined at https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/foundation/diagnostics.dart
31- /// The difference is the class hierarchy is collapsed here as in
32- /// package:flutter the subclasses exist more to simplify creation
33- /// of Diagnostics than because the class hierarchy of Diagnostics is
34- /// important. If you need to determine the exact Diagnostic class on the
35- /// Dart side you can use the value of type. The raw Dart object value is
36- /// also available via the getValue() method.
30+ /// * [DiagnosticsNode] - The difference is the class hierarchy is collapsed
31+ /// here as in package:flutter the subclasses exist more to simplify creation
32+ /// of Diagnostics than because the class hierarchy of Diagnostics is
33+ /// important. If you need to determine the exact Diagnostic class on the Dart
34+ /// side you can use the value of type. The raw Dart object value is also
35+ /// available via the `getValue()` method.
3736class RemoteDiagnosticsNode extends DiagnosticableTree {
3837 RemoteDiagnosticsNode (
3938 this .json,
@@ -262,7 +261,7 @@ class RemoteDiagnosticsNode extends DiagnosticableTree {
262261
263262 bool get hasIsQuoted => json.containsKey ('quoted' );
264263
265- /// Optional unit the [value ] is measured in.
264+ /// Optional unit the [json ] is measured in.
266265 ///
267266 /// Unit must be acceptable to display immediately after a number with no
268267 /// spaces. For example: 'physical pixels per logical pixel' should be a
@@ -273,16 +272,16 @@ class RemoteDiagnosticsNode extends DiagnosticableTree {
273272
274273 bool get hasUnit => json.containsKey ('unit' );
275274
276- /// String describing just the numeric [value ] without a unit suffix.
275+ /// String describing just the numeric [json ] without a unit suffix.
277276 ///
278277 /// Only specified for Number properties.
279278 String ? get numberToString => getStringMember ('numberToString' );
280279
281280 bool get hasNumberToString => json.containsKey ('numberToString' );
282281
283- /// Description to use if the property [value ] is true.
282+ /// Description to use if the property [json ] is true.
284283 ///
285- /// If not specified and [value ] equals true the property's priority [level]
284+ /// If not specified and [json ] equals true the property's priority [level]
286285 /// will be [DiagnosticLevel.hidden] .
287286 ///
288287 /// Only applies to Flag properties.
@@ -292,7 +291,7 @@ class RemoteDiagnosticsNode extends DiagnosticableTree {
292291
293292 /// Description to use if the property value is false.
294293 ///
295- /// If not specified and [value ] equals false, the property's priority [level]
294+ /// If not specified and [json ] equals false, the property's priority [level]
296295 /// will be [DiagnosticLevel.hidden] .
297296 ///
298297 /// Only applies to Flag properties.
@@ -315,8 +314,8 @@ class RemoteDiagnosticsNode extends DiagnosticableTree {
315314
316315 /// Whether each of the values is itself a primitive value.
317316 ///
318- /// For example, bool| num| string are primitive values. This is useful as for
319- /// non-primitive values, the user may want to view the value with an
317+ /// For example, ` bool` | ` num` | ` string` are primitive values. This is useful as
318+ /// for non-primitive values, the user may want to view the value with an
320319 /// interactive object debugger view to get more information on what the value
321320 /// is.
322321 List <bool >? get primitiveValues {
@@ -329,18 +328,18 @@ class RemoteDiagnosticsNode extends DiagnosticableTree {
329328
330329 bool get hasValues => json.containsKey ('values' );
331330
332- /// Description to use if the property [value ] is not null.
331+ /// Description to use if the property [json ] is not ` null` .
333332 ///
334- /// If the property [value ] is not null and [ifPresent] is null, the
335- /// [level] for the property is [DiagnosticsLevel .hidden] and the description
336- /// from superclass is used.
333+ /// If the property [json ] is not ` null` and [ifPresent] is ` null` , the
334+ /// [level] [level] for the property is [DiagnosticLevel .hidden] and the
335+ /// description from superclass is used.
337336 ///
338- /// Only specified for ObjectFlagProperty.
337+ /// Only specified for [ ObjectFlagProperty] .
339338 String ? get ifPresent => getStringMember ('ifPresent' );
340339
341340 bool get hasIfPresent => json.containsKey ('ifPresent' );
342341
343- /// If the [value ] of the property equals [defaultValue] the priority [level]
342+ /// If the [json ] of the property equals [defaultValue] the priority [level]
344343 /// of the property is downgraded to [DiagnosticLevel.fine] as the property
345344 /// value is uninteresting.
346345 ///
@@ -363,7 +362,7 @@ class RemoteDiagnosticsNode extends DiagnosticableTree {
363362 /// ifEmpty.
364363 String ? get ifEmpty => getStringMember ('ifEmpty' );
365364
366- /// Description if the property [value ] is null.
365+ /// Description if the property [json ] is ` null` .
367366 String ? get ifNull => getStringMember ('ifNull' );
368367
369368 bool get allowWrap => getBooleanMember ('allowWrap' , true );
@@ -378,12 +377,12 @@ class RemoteDiagnosticsNode extends DiagnosticableTree {
378377
379378 bool get hasTooltip => json.containsKey ('tooltip' );
380379
381- /// Whether a [value ] of null causes the property to have [level]
382- /// [DiagnosticLevel.warning] warning that the property is missing a [value ] .
380+ /// Whether a [json ] of null causes the property to have [level]
381+ /// [DiagnosticLevel.warning] warning that the property is missing a [json ] .
383382 bool get missingIfNull => getBooleanMember ('missingIfNull' , false );
384383
385384 /// String representation of exception thrown if accessing the property
386- /// [value ] threw an exception.
385+ /// [json ] threw an exception.
387386 String ? get exception => getStringMember ('exception' );
388387
389388 /// Whether accessing the property throws an exception.
@@ -416,11 +415,11 @@ class RemoteDiagnosticsNode extends DiagnosticableTree {
416415 return _creationLocation;
417416 }
418417
419- /// String representation of the type of the property [value ] .
418+ /// String representation of the type of the property [json ] .
420419 ///
421420 /// This is determined from the type argument `T` used to instantiate the
422421 /// [DiagnosticsProperty] class. This means that the type is available even if
423- /// [value ] is null, but it also means that the [propertyType] is only as
422+ /// [json ] is null, but it also means that the [propertyType] is only as
424423 /// accurate as the type provided when invoking the constructor.
425424 ///
426425 /// Generally, this is only useful for diagnostic tools that should display
@@ -429,11 +428,9 @@ class RemoteDiagnosticsNode extends DiagnosticableTree {
429428 /// the word "null".
430429 String ? get propertyType => getStringMember ('propertyType' );
431430
432- /// If the [value ] of the property equals [defaultValue] the priority [level]
431+ /// If the [json ] of the property equals [defaultValue] the priority [level]
433432 /// of the property is downgraded to [DiagnosticLevel.fine] as the property
434433 /// value is uninteresting.
435- ///
436- /// [defaultValue] has type [T] or is [kNoDefaultValue] .
437434 DiagnosticLevel get defaultLevel {
438435 return getLevelMember ('defaultLevel' , DiagnosticLevel .info);
439436 }
0 commit comments