More docs and other tweaks (#7026)
This fixes minor issues I ran into while using Flutter.
This commit is contained in:
@@ -28,6 +28,7 @@ export 'src/material/constants.dart';
|
||||
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';
|
||||
|
||||
@@ -21,9 +21,9 @@ import 'theme.dart';
|
||||
///
|
||||
/// 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 @@ class Dialog extends StatelessWidget {
|
||||
///
|
||||
/// 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 @@ class AlertDialog extends StatelessWidget {
|
||||
///
|
||||
/// 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 @@ class _DialogRoute<T> extends PopupRoute<T> {
|
||||
/// [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*/>(
|
||||
|
||||
@@ -333,7 +333,7 @@ class _CircularProgressIndicatorState extends State<CircularProgressIndicator> w
|
||||
return new Container(
|
||||
constraints: new BoxConstraints(
|
||||
minWidth: _kMinCircularProgressIndicatorSize,
|
||||
minHeight: _kMinCircularProgressIndicatorSize
|
||||
minHeight: _kMinCircularProgressIndicatorSize,
|
||||
),
|
||||
child: new CustomPaint(
|
||||
painter: new _CircularProgressIndicatorPainter(
|
||||
|
||||
@@ -11,20 +11,24 @@ import 'framework.dart';
|
||||
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 AnimatedCrossFade extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _AnimatedCrossFadeState extends State<AnimatedCrossFade> with TickerProviderStateMixin {
|
||||
_AnimatedCrossFadeState() : super();
|
||||
|
||||
AnimationController _controller;
|
||||
Animation<double> _firstAnimation;
|
||||
Animation<double> _secondAnimation;
|
||||
|
||||
Reference in New Issue
Block a user