Loading...
Loading...
How to inject external code examples into Dartdoc using the {@example} directive, and how to filter those files using #hide, #region, and #endregion tags.
npx skill4agent add dart-lang/skills dart-use-doc-examples{@example}.dart{@example}///{@example}{@example}{@example <path>[#<region>] [lang=LANGUAGE] [indent=keep|strip]}<path>/langdartlang=textindentstrip/// Makes a client service request to the backend.
///
/// ```dart
/// final client = Client();
/// client.send();
/// ```/// Makes a client service request to the backend.
///
/// {@example /example/client_request.dart}void main()#<region>{@example}#region#endregion/example/client.dartimport 'package:http/http.dart';
void main() {
// #region request_snippet
final client = Client();
client.send();
// #endregion request_snippet
}/// Connects the client to the server and sends a request.
///
/// {@example /example/client.dart#request_snippet}#hidefinal mockServer = startServer(); // #hide
final data = await fetch(mockServer.url);final data = await fetch(mockServer.url);#hide#hide#region#endregion{@example file.dart#region_name}// #hide# #region<!-- #region -->{@example}///<path>/{@example /test/data/sample.txt}<package_root>/test/data/sample.txt{@example ../utils/demo.dart}..https:///%20dart analyzedart doc