dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.18k stars 1.57k forks source link

Flutter @tool/@end-tool navigation support #47548

Open jwren opened 2 years ago

jwren commented 2 years ago

In some Flutter code, the following can be found***:

  /// ...
  /// {@tool dartpad}
  /// ...
  /// sends the focus to the preceding text field when the currently focused
  /// field becomes empty.
  ///
  /// ** See code in examples/api/lib/widgets/actions/action.action_overridable.0.dart **
  /// {@end-tool}

The text examples/api/lib/widgets/actions/action.action_overridable.0.dart should be clickable via the usual way, (i.e. _DartNavigationComputerVisitor)

The annotations for @tool and @end-tool can and should be used.

*** https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/actions.dart#L151

jwren commented 2 years ago

@jacob314 @gspencergoog @bwilkerson @scheglov

IJ tracking issue: https://github.com/dart-lang/sdk/issues/47549

jwren commented 2 years ago

Code-Dart issue: https://github.com/Dart-Code/Dart-Code/issues/3629