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 @@
/// new Opacity(
/// opacity: _visible ? 1.0 : 0.0,
/// child: const Text('Poor wandering ones!'),
/// ),
/// )
/// ```
......@@ -59,7 +59,7 @@ class RowColumnTraversal extends StatelessWidget {
/// This function expresses the sort keys as a hierarchy, but it could just as
/// easily have been a flat list:
///
/// ```
/// ```dart
/// Widget build(BuildContext context) {
/// return new Semantics(
/// sortOrder: new SemanticsSortOrder(
......
......@@ -265,6 +265,7 @@ class ButtonThemeData extends Diagnosticable {
/// Simply a convenience that returns [minWidth] and [height] as a
/// [BoxConstraints] object:
///
/// ```dart
/// return BoxConstraints(
/// minWidth: minWidth,
......
......@@ -151,7 +151,7 @@ class IconButton extends StatelessWidget {
/// color: Colors.blue,
/// onPressed: _handleTap,
/// icon: Icons.widgets,
/// ),
/// )
/// ```
final Color color;
......
......@@ -68,7 +68,8 @@ enum ScriptCategory {
/// `Typography(platform: platform)` which uses [englishLike2014],
/// [dense2014] and [tall2014]. To use the 2018 text theme
/// geometries, specify a typography value:
/// ```
///
/// ```dart
/// Typography(
/// platorm: platform,
/// englishLike: Typography.englishLike2018,
......
......@@ -82,7 +82,7 @@ class Icon extends StatelessWidget {
/// Icon(
/// icon: Icons.widgets,
/// color: Colors.blue.shade400,
/// ),
/// )
/// ```
final Color color;
......
......@@ -117,6 +117,7 @@ class AndroidView extends StatefulWidget {
///
/// 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].
///
/// ```dart
/// GestureDetector(
/// onVerticalDragStart: (DragStartDetails d) {},
......@@ -125,8 +126,10 @@ class AndroidView extends StatefulWidget {
/// ),
/// )
/// ```
///
/// To get the [AndroidView] to claim the vertical drag gestures we can pass a vertical drag
/// gesture recognizer factory in [gestureRecognizers] e.g:
///
/// ```dart
/// GestureDetector(
/// onVerticalDragStart: (DragStartDetails details) {},
......@@ -247,6 +250,7 @@ class UiKitView extends StatefulWidget {
///
/// 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].
///
/// ```dart
/// GestureDetector(
/// onVerticalDragStart: (DragStartDetails details) {},
......@@ -255,8 +259,10 @@ class UiKitView extends StatefulWidget {
/// ),
/// )
/// ```
///
/// To get the [UiKitView] to claim the vertical drag gestures we can pass a vertical drag
/// gesture recognizer factory in [gestureRecognizers] e.g:
///
/// ```dart
/// GestureDetector(
/// onVerticalDragStart: (DragStartDetails details) {},
......
......@@ -41,6 +41,7 @@ class ScrollPhysics {
/// ScrollPhysics that has [ancestor] as its parent.
///
/// This method is typically used to define [applyTo] methods like:
///
/// ```dart
/// FooScrollPhysics applyTo(ScrollPhysics ancestor) {
/// return FooScrollPhysics(parent: buildParent(ancestor));
......
......@@ -337,7 +337,6 @@ class Text extends StatelessWidget {
///
/// ```dart
/// Text(r'$$', semanticsLabel: 'Double dollars')
///
/// ```
final String semanticsLabel;
......
......@@ -495,6 +495,7 @@ class SemanticsTester {
/// ));
/// semantics.dispose();
/// });
/// ```
///
/// At this point the unit test should automatically pass because it was
/// 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