More docs and other tweaks (#7026)
This fixes minor issues I ran into while using Flutter.
diff --git a/packages/flutter/lib/material.dart b/packages/flutter/lib/material.dart
index 4f3af1b..c95a4a0 100644
--- a/packages/flutter/lib/material.dart
+++ b/packages/flutter/lib/material.dart
@@ -28,6 +28,7 @@
export 'src/material/data_table.dart';
export 'src/material/data_table_source.dart';
export 'src/material/date_picker.dart';
+export 'src/material/debug.dart';
export 'src/material/dialog.dart';
export 'src/material/divider.dart';
export 'src/material/drawer.dart';
diff --git a/packages/flutter/lib/src/material/dialog.dart b/packages/flutter/lib/src/material/dialog.dart
index b588390..4b17658 100644
--- a/packages/flutter/lib/src/material/dialog.dart
+++ b/packages/flutter/lib/src/material/dialog.dart
@@ -21,9 +21,9 @@
///
/// See also:
///
-/// * [AlertDialog]
-/// * [SimpleDialog]
-/// * [showDialog]
+/// * [AlertDialog], for dialogs that have a message and some buttons.
+/// * [SimpleDialog], for dialogs that offer a variety of options.
+/// * [showDialog], which actually displays the dialog and returns its result.
/// * <https://material.google.com/components/dialogs.html>
class Dialog extends StatelessWidget {
/// Creates a dialog.
@@ -86,9 +86,9 @@
///
/// See also:
///
-/// * [SimpleDialog]
-/// * [Dialog]
-/// * [showDialog]
+/// * [SimpleDialog], which handles the scrolling of the contents but has no [actions].
+/// * [Dialog], on which [AlertDialog] and [SimpleDialog] are based.
+/// * [showDialog], which actually displays the dialog and returns its result.
/// * <https://material.google.com/components/dialogs.html#dialogs-alerts>
class AlertDialog extends StatelessWidget {
/// Creates an alert dialog.
@@ -196,9 +196,9 @@
///
/// See also:
///
-/// * [AlertDialog]
-/// * [Dialog]
-/// * [showDialog]
+/// * [AlertDialog], for dialogs that have a row of buttons below the body.
+/// * [Dialog], on which [SimpleDialog] and [AlertDialog] are based.
+/// * [showDialog], which actually displays the dialog and returns its result.
/// * <https://material.google.com/components/dialogs.html#dialogs-simple-dialogs>
class SimpleDialog extends StatelessWidget {
/// Creates a simple dialog.
@@ -320,7 +320,9 @@
/// [Navigator.pop] when the dialog was closed.
///
/// See also:
-/// * [Dialog]
+/// * [SimpleDialog], which handles the scrolling of the contents but has no [actions].
+/// * [AlertDialog], for dialogs that have a row of buttons below the body.
+/// * [Dialog], on which [SimpleDialog] and [AlertDialog] are based.
/// * <https://material.google.com/components/dialogs.html>
Future<dynamic/*=T*/> showDialog/*<T>*/({ BuildContext context, Widget child }) {
return Navigator.push(context, new _DialogRoute<dynamic/*=T*/>(
diff --git a/packages/flutter/lib/src/material/progress_indicator.dart b/packages/flutter/lib/src/material/progress_indicator.dart
index 1796a43..c63e0eb 100644
--- a/packages/flutter/lib/src/material/progress_indicator.dart
+++ b/packages/flutter/lib/src/material/progress_indicator.dart
@@ -333,7 +333,7 @@
return new Container(
constraints: new BoxConstraints(
minWidth: _kMinCircularProgressIndicatorSize,
- minHeight: _kMinCircularProgressIndicatorSize
+ minHeight: _kMinCircularProgressIndicatorSize,
),
child: new CustomPaint(
painter: new _CircularProgressIndicatorPainter(
diff --git a/packages/flutter/lib/src/widgets/animated_cross_fade.dart b/packages/flutter/lib/src/widgets/animated_cross_fade.dart
index 4c4dd2c..a6924f1 100644
--- a/packages/flutter/lib/src/widgets/animated_cross_fade.dart
+++ b/packages/flutter/lib/src/widgets/animated_cross_fade.dart
@@ -11,20 +11,24 @@
import 'ticker_provider.dart';
import 'transitions.dart';
-/// Specifies which of the children to show. See [AnimatedCrossFade].
+/// Specifies which of two children to show. See [AnimatedCrossFade].
///
/// The child that is shown will fade in, while the other will fade out.
enum CrossFadeState {
- /// Show the first child and hide the second.
+ /// Show the first child ([AnimatedCrossFade.firstChild]) and hide the second
+ /// ([AnimatedCrossFade.secondChild]]).
showFirst,
- /// Show the second child and hide the first.
- showSecond
+ /// Show the second child ([AnimatedCrossFade.secondChild]) and hide the first
+ /// ([AnimatedCrossFade.firstChild]).
+ showSecond,
}
-/// A widget that cross-fades between two children and animates itself between
-/// their sizes. The animation is controlled through the [crossFadeState]
-/// parameter. [firstCurve] and [secondCurve] represent the opacity curves of
-/// the two children. Note that [firstCurve] is inverted, i.e. it fades out when
+/// A widget that cross-fades between two given children and animates itself
+/// between their sizes.
+///
+/// The animation is controlled through the [crossFadeState] parameter.
+/// [firstCurve] and [secondCurve] represent the opacity curves of the two
+/// children. Note that [firstCurve] is inverted, i.e. it fades out when
/// providing a growing curve like [Curves.linear]. [sizeCurve] is the curve
/// used to animated between the size of the fading out child and the size of
/// the fading in child.
@@ -82,8 +86,6 @@
}
class _AnimatedCrossFadeState extends State<AnimatedCrossFade> with TickerProviderStateMixin {
- _AnimatedCrossFadeState() : super();
-
AnimationController _controller;
Animation<double> _firstAnimation;
Animation<double> _secondAnimation;