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:
@@ -164,7 +164,7 @@ abstract class Recorder {
|
||||
///
|
||||
/// Example:
|
||||
///
|
||||
/// ```
|
||||
/// ```dart
|
||||
/// class BenchForLoop extends RawRecorder {
|
||||
/// BenchForLoop() : super(name: benchmarkName);
|
||||
///
|
||||
@@ -219,7 +219,7 @@ abstract class RawRecorder extends Recorder {
|
||||
///
|
||||
/// Example:
|
||||
///
|
||||
/// ```
|
||||
/// ```dart
|
||||
/// class BenchDrawCircle extends SceneBuilderRecorder {
|
||||
/// BenchDrawCircle() : super(name: benchmarkName);
|
||||
///
|
||||
@@ -311,7 +311,7 @@ abstract class SceneBuilderRecorder extends Recorder {
|
||||
///
|
||||
/// Example:
|
||||
///
|
||||
/// ```
|
||||
/// ```dart
|
||||
/// class BenchListView extends WidgetRecorder {
|
||||
/// BenchListView() : super(name: benchmarkName);
|
||||
///
|
||||
|
||||
@@ -21,7 +21,7 @@ import 'stock_strings_es.dart';
|
||||
/// localizationDelegates list, and the locales they support in the app's
|
||||
/// supportedLocales list. For example:
|
||||
///
|
||||
/// ```
|
||||
/// ```dart
|
||||
/// import 'i18n/stock_strings.dart';
|
||||
///
|
||||
/// return MaterialApp(
|
||||
@@ -36,7 +36,7 @@ import 'stock_strings_es.dart';
|
||||
/// Please make sure to update your pubspec.yaml to include the following
|
||||
/// packages:
|
||||
///
|
||||
/// ```
|
||||
/// ```yaml
|
||||
/// dependencies:
|
||||
/// # Internationalization support.
|
||||
/// flutter_localizations:
|
||||
|
||||
@@ -426,7 +426,7 @@ class BlinkTraceEvent {
|
||||
///
|
||||
/// Sample event encoded as JSON (the data is bogus, this just shows the format):
|
||||
///
|
||||
/// ```
|
||||
/// ```json
|
||||
/// {
|
||||
/// "name": "myName",
|
||||
/// "cat": "category,list",
|
||||
|
||||
@@ -41,7 +41,7 @@ const List<String> dartdocDirectiveCanaryFiles = <String>[
|
||||
/// sample code where the sequence is perfectly legal, e.g. for required named
|
||||
/// parameters of a method:
|
||||
///
|
||||
/// ```
|
||||
/// ```dart
|
||||
/// void foo({@required int bar});
|
||||
/// ```
|
||||
void checkForUnresolvedDirectives(Directory dartDocDir) {
|
||||
|
||||
@@ -31,14 +31,14 @@ String? currentLocale;
|
||||
///
|
||||
/// The following outputs the generated Dart code to the console as a dry run:
|
||||
///
|
||||
/// ```
|
||||
/// ```bash
|
||||
/// dart dev/tools/localization/bin/gen_date_localizations.dart
|
||||
/// ```
|
||||
///
|
||||
/// If the data looks good, use the `--overwrite` option to overwrite the
|
||||
/// lib/src/l10n/date_localizations.dart file:
|
||||
///
|
||||
/// ```
|
||||
/// ```bash
|
||||
/// dart dev/tools/localization/bin/gen_date_localizations.dart --overwrite
|
||||
/// ```
|
||||
Future<void> main(List<String> rawArgs) async {
|
||||
|
||||
Reference in New Issue
Block a user