Make AnimatedSwitcher example into a dartpad example (#52547)

This commit is contained in:
Greg Spencer 2020-03-16 09:02:08 -07:00 committed by GitHub
parent d444582f3e
commit acd51a726e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,23 +87,20 @@ typedef AnimatedSwitcherLayoutBuilder = Widget Function(Widget currentChild, Lis
/// progress indicator and the image will be fading out while a new progress
/// indicator is fading in.)
///
/// {@tool snippet}
/// The type of transition can be changed from a cross-fade to a custom
/// transition by setting the [transitionBuilder].
///
/// {@tool dartpad --template=stateful_widget_material}
/// This sample shows a counter that animates the scale of a text widget
/// whenever the value changes.
///
/// ```dart
/// class ClickCounter extends StatefulWidget {
/// const ClickCounter({Key key}) : super(key: key);
///
/// @override
/// _ClickCounterState createState() => _ClickCounterState();
/// }
///
/// class _ClickCounterState extends State<ClickCounter> {
/// int _count = 0;
///
/// @override
/// Widget build(BuildContext context) {
/// return MaterialApp(
/// home: Material(
/// return Container(
/// color: Colors.white,
/// child: Column(
/// mainAxisAlignment: MainAxisAlignment.center,
/// children: <Widget>[
@ -131,10 +128,8 @@ typedef AnimatedSwitcherLayoutBuilder = Widget Function(Widget currentChild, Lis
/// ),
/// ],
/// ),
/// ),
/// );
/// }
/// }
/// ```
/// {@end-tool}
///