Unverified Commit 868ff428 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

fix doc-comment snippets (#25579)

parent e54e53c1
...@@ -39,5 +39,5 @@ ...@@ -39,5 +39,5 @@
/// new Opacity( /// new Opacity(
/// opacity: _visible ? 1.0 : 0.0, /// opacity: _visible ? 1.0 : 0.0,
/// child: const Text('Poor wandering ones!'), /// child: const Text('Poor wandering ones!'),
/// ), /// )
/// ``` /// ```
...@@ -59,7 +59,7 @@ class RowColumnTraversal extends StatelessWidget { ...@@ -59,7 +59,7 @@ class RowColumnTraversal extends StatelessWidget {
/// This function expresses the sort keys as a hierarchy, but it could just as /// This function expresses the sort keys as a hierarchy, but it could just as
/// easily have been a flat list: /// easily have been a flat list:
/// ///
/// ``` /// ```dart
/// Widget build(BuildContext context) { /// Widget build(BuildContext context) {
/// return new Semantics( /// return new Semantics(
/// sortOrder: new SemanticsSortOrder( /// sortOrder: new SemanticsSortOrder(
......
...@@ -265,6 +265,7 @@ class ButtonThemeData extends Diagnosticable { ...@@ -265,6 +265,7 @@ class ButtonThemeData extends Diagnosticable {
/// Simply a convenience that returns [minWidth] and [height] as a /// Simply a convenience that returns [minWidth] and [height] as a
/// [BoxConstraints] object: /// [BoxConstraints] object:
///
/// ```dart /// ```dart
/// return BoxConstraints( /// return BoxConstraints(
/// minWidth: minWidth, /// minWidth: minWidth,
......
...@@ -151,7 +151,7 @@ class IconButton extends StatelessWidget { ...@@ -151,7 +151,7 @@ class IconButton extends StatelessWidget {
/// color: Colors.blue, /// color: Colors.blue,
/// onPressed: _handleTap, /// onPressed: _handleTap,
/// icon: Icons.widgets, /// icon: Icons.widgets,
/// ), /// )
/// ``` /// ```
final Color color; final Color color;
......
...@@ -68,7 +68,8 @@ enum ScriptCategory { ...@@ -68,7 +68,8 @@ enum ScriptCategory {
/// `Typography(platform: platform)` which uses [englishLike2014], /// `Typography(platform: platform)` which uses [englishLike2014],
/// [dense2014] and [tall2014]. To use the 2018 text theme /// [dense2014] and [tall2014]. To use the 2018 text theme
/// geometries, specify a typography value: /// geometries, specify a typography value:
/// ``` ///
/// ```dart
/// Typography( /// Typography(
/// platorm: platform, /// platorm: platform,
/// englishLike: Typography.englishLike2018, /// englishLike: Typography.englishLike2018,
......
...@@ -82,7 +82,7 @@ class Icon extends StatelessWidget { ...@@ -82,7 +82,7 @@ class Icon extends StatelessWidget {
/// Icon( /// Icon(
/// icon: Icons.widgets, /// icon: Icons.widgets,
/// color: Colors.blue.shade400, /// color: Colors.blue.shade400,
/// ), /// )
/// ``` /// ```
final Color color; final Color color;
......
...@@ -117,6 +117,7 @@ class AndroidView extends StatefulWidget { ...@@ -117,6 +117,7 @@ class AndroidView extends StatefulWidget {
/// ///
/// For example, with the following setup vertical drags will not be dispatched to the Android /// For example, with the following setup vertical drags will not be dispatched to the Android
/// view as the vertical drag gesture is claimed by the parent [GestureDetector]. /// view as the vertical drag gesture is claimed by the parent [GestureDetector].
///
/// ```dart /// ```dart
/// GestureDetector( /// GestureDetector(
/// onVerticalDragStart: (DragStartDetails d) {}, /// onVerticalDragStart: (DragStartDetails d) {},
...@@ -125,8 +126,10 @@ class AndroidView extends StatefulWidget { ...@@ -125,8 +126,10 @@ class AndroidView extends StatefulWidget {
/// ), /// ),
/// ) /// )
/// ``` /// ```
///
/// To get the [AndroidView] to claim the vertical drag gestures we can pass a vertical drag /// To get the [AndroidView] to claim the vertical drag gestures we can pass a vertical drag
/// gesture recognizer factory in [gestureRecognizers] e.g: /// gesture recognizer factory in [gestureRecognizers] e.g:
///
/// ```dart /// ```dart
/// GestureDetector( /// GestureDetector(
/// onVerticalDragStart: (DragStartDetails details) {}, /// onVerticalDragStart: (DragStartDetails details) {},
...@@ -247,6 +250,7 @@ class UiKitView extends StatefulWidget { ...@@ -247,6 +250,7 @@ class UiKitView extends StatefulWidget {
/// ///
/// For example, with the following setup vertical drags will not be dispatched to the UIKit /// For example, with the following setup vertical drags will not be dispatched to the UIKit
/// view as the vertical drag gesture is claimed by the parent [GestureDetector]. /// view as the vertical drag gesture is claimed by the parent [GestureDetector].
///
/// ```dart /// ```dart
/// GestureDetector( /// GestureDetector(
/// onVerticalDragStart: (DragStartDetails details) {}, /// onVerticalDragStart: (DragStartDetails details) {},
...@@ -255,8 +259,10 @@ class UiKitView extends StatefulWidget { ...@@ -255,8 +259,10 @@ class UiKitView extends StatefulWidget {
/// ), /// ),
/// ) /// )
/// ``` /// ```
///
/// To get the [UiKitView] to claim the vertical drag gestures we can pass a vertical drag /// To get the [UiKitView] to claim the vertical drag gestures we can pass a vertical drag
/// gesture recognizer factory in [gestureRecognizers] e.g: /// gesture recognizer factory in [gestureRecognizers] e.g:
///
/// ```dart /// ```dart
/// GestureDetector( /// GestureDetector(
/// onVerticalDragStart: (DragStartDetails details) {}, /// onVerticalDragStart: (DragStartDetails details) {},
......
...@@ -41,6 +41,7 @@ class ScrollPhysics { ...@@ -41,6 +41,7 @@ class ScrollPhysics {
/// ScrollPhysics that has [ancestor] as its parent. /// ScrollPhysics that has [ancestor] as its parent.
/// ///
/// This method is typically used to define [applyTo] methods like: /// This method is typically used to define [applyTo] methods like:
///
/// ```dart /// ```dart
/// FooScrollPhysics applyTo(ScrollPhysics ancestor) { /// FooScrollPhysics applyTo(ScrollPhysics ancestor) {
/// return FooScrollPhysics(parent: buildParent(ancestor)); /// return FooScrollPhysics(parent: buildParent(ancestor));
......
...@@ -337,7 +337,6 @@ class Text extends StatelessWidget { ...@@ -337,7 +337,6 @@ class Text extends StatelessWidget {
/// ///
/// ```dart /// ```dart
/// Text(r'$$', semanticsLabel: 'Double dollars') /// Text(r'$$', semanticsLabel: 'Double dollars')
///
/// ``` /// ```
final String semanticsLabel; final String semanticsLabel;
......
...@@ -495,6 +495,7 @@ class SemanticsTester { ...@@ -495,6 +495,7 @@ class SemanticsTester {
/// )); /// ));
/// semantics.dispose(); /// semantics.dispose();
/// }); /// });
/// ```
/// ///
/// At this point the unit test should automatically pass because it was /// At this point the unit test should automatically pass because it was
/// generated from the actual [SemanticsNode]s. Next time the semantics tree /// generated from the actual [SemanticsNode]s. Next time the semantics tree
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment