Commit 744e89f1 authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

More docs and other tweaks (#7026)

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