Add info strings to code blocks. (#146085)
In preparation to add the lint `missing_code_block_language_in_doc_comment`, added info strings to a bunch of fenced code blocks. Related to issue: https://github.com/dart-lang/linter/issues/4904 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat [Data Driven Fixes]: https://github.com/flutter/flutter/wiki/Data-driven-Fixes
This commit is contained in:
@@ -31,7 +31,7 @@ import 'dart:async';
|
||||
/// Rationale:
|
||||
///
|
||||
/// Consider the following snippet:
|
||||
/// ```
|
||||
/// ```dart
|
||||
/// try {
|
||||
/// await foo();
|
||||
/// ...
|
||||
@@ -55,7 +55,7 @@ import 'dart:async';
|
||||
/// [asyncGuard] is intended to wrap awaited expressions occurring in a `try`
|
||||
/// block. The behavior described above gives the behavior that users
|
||||
/// intuitively expect from `await`. Consider the snippet:
|
||||
/// ```
|
||||
/// ```dart
|
||||
/// try {
|
||||
/// await asyncGuard(() async {
|
||||
/// var c = Completer();
|
||||
|
||||
@@ -40,19 +40,19 @@ import '../vmservice.dart';
|
||||
///
|
||||
/// With an application already running, a HotRunner can be attached to it
|
||||
/// with:
|
||||
/// ```
|
||||
/// ```bash
|
||||
/// $ flutter attach --debug-url http://127.0.0.1:12345/QqL7EFEDNG0=/
|
||||
/// ```
|
||||
///
|
||||
/// If `--disable-service-auth-codes` was provided to the application at startup
|
||||
/// time, a HotRunner can be attached with just a port:
|
||||
/// ```
|
||||
/// ```bash
|
||||
/// $ flutter attach --debug-port 12345
|
||||
/// ```
|
||||
///
|
||||
/// Alternatively, the attach command can start listening and scan for new
|
||||
/// programs that become active:
|
||||
/// ```
|
||||
/// ```bash
|
||||
/// $ flutter attach
|
||||
/// ```
|
||||
/// As soon as a new VM Service is detected the command attaches to it and
|
||||
|
||||
@@ -692,7 +692,7 @@ class LocalizationsGenerator {
|
||||
/// Whether to generate the Dart localization methods with named parameters.
|
||||
///
|
||||
/// If this sets to true, the generated Dart localization methods will be:
|
||||
/// ```
|
||||
/// ```dart
|
||||
/// String helloWorld({required String name});
|
||||
/// ```
|
||||
final bool useNamedParameters;
|
||||
|
||||
Reference in New Issue
Block a user