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
ffc56026
Unverified
Commit
ffc56026
authored
May 31, 2020
by
Ian Hickson
Committed by
GitHub
May 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dedupe (and update) the --track-widget-creation documentation (#58206)
parent
54524a7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
23 deletions
+9
-23
widget_inspector.dart
packages/flutter/lib/src/widgets/widget_inspector.dart
+9
-23
No files found.
packages/flutter/lib/src/widgets/widget_inspector.dart
View file @
ffc56026
...
...
@@ -1519,9 +1519,11 @@ mixin WidgetInspectorService {
/// object that `diagnosticsNodeId` references only including children that
/// were created directly by user code.
///
/// {@template widgets.inspector.trackCreation}
/// Requires [Widget] creation locations which are only available for debug
/// mode builds when the `--track-widget-creation` flag is passed to
/// `flutter_tool`.
/// mode builds when the `--track-widget-creation` flag is enabled on the call
/// to the `flutter` tool. This flag is enabled by default in debug builds.
/// {@endtemplate}
///
/// See also:
///
...
...
@@ -1803,10 +1805,7 @@ mixin WidgetInspectorService {
/// Returns whether [Widget] creation locations are available.
///
/// [Widget] creation locations are only available for debug mode builds when
/// the `--track-widget-creation` flag is passed to `flutter_tool`. Dart 2.0
/// is required as injecting creation locations requires a
/// [Dart Kernel Transformer](https://github.com/dart-lang/sdk/wiki/Kernel-Documentation).
/// {@macro widgets.inspector.trackCreation}
bool
isWidgetCreationTracked
()
{
_widgetCreationTracked
??=
_WidgetForTypeTests
()
is
_HasCreationLocation
;
return
_widgetCreationTracked
;
...
...
@@ -2704,11 +2703,7 @@ const TextStyle _messageStyle = TextStyle(
/// Interface for classes that track the source code location the their
/// constructor was called from.
///
/// A [Dart Kernel Transformer](https://github.com/dart-lang/sdk/wiki/Kernel-Documentation).
/// adds this interface to the [Widget] class when the
/// `--track-widget-creation` flag is passed to `flutter_tool`. Dart 2.0 is
/// required as injecting creation locations requires a
/// [Dart Kernel Transformer](https://github.com/dart-lang/sdk/wiki/Kernel-Documentation).
/// {@macro widgets.inspector.trackCreation}
// ignore: unused_element
abstract
class
_HasCreationLocation
{
_Location
get
_location
;
...
...
@@ -2841,10 +2836,7 @@ Iterable<DiagnosticsNode> _describeRelevantUserCode(Element element) {
/// Returns if an object is user created.
///
/// This function will only work in debug mode builds when
/// the `--track-widget-creation` flag is passed to `flutter_tool`. Dart 2.0 is
/// required as injecting creation locations requires a
/// [Dart Kernel Transformer](https://github.com/dart-lang/sdk/wiki/Kernel-Documentation).
/// {@macro widgets.inspector.trackCreation}
///
/// Currently is local creation locations are only available for
/// [Widget] and [Element].
...
...
@@ -2859,10 +2851,7 @@ bool _isLocalCreationLocation(Object object) {
///
/// ex: "file:///path/to/main.dart:4:3"
///
/// Creation locations are only available for debug mode builds when
/// the `--track-widget-creation` flag is passed to `flutter_tool`. Dart 2.0 is
/// required as injecting creation locations requires a
/// [Dart Kernel Transformer](https://github.com/dart-lang/sdk/wiki/Kernel-Documentation).
/// {@macro widgets.inspector.trackCreation}
///
/// Currently creation locations are only available for [Widget] and [Element].
String
_describeCreationLocation
(
Object
object
)
{
...
...
@@ -2872,10 +2861,7 @@ String _describeCreationLocation(Object object) {
/// Returns the creation location of an object if one is available.
///
/// Creation locations are only available for debug mode builds when
/// the `--track-widget-creation` flag is passed to `flutter_tool`. Dart 2.0 is
/// required as injecting creation locations requires a
/// [Dart Kernel Transformer](https://github.com/dart-lang/sdk/wiki/Kernel-Documentation).
/// {@macro widgets.inspector.trackCreation}
///
/// Currently creation locations are only available for [Widget] and [Element].
_Location
_getCreationLocation
(
Object
object
)
{
...
...
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