1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

Samples maintenance (#435)

This commit is contained in:
Brett Morgan
2020-05-13 09:18:26 +10:00
committed by GitHub
parent 941ebebfad
commit baa1f976b2
94 changed files with 492 additions and 349 deletions

View File

@@ -25,6 +25,7 @@ Widget generateContainer(int keyCount) => Container(
class AnimatedSwitcherDemo extends StatefulWidget {
static String routeName = '/basics/10_animated_switcher';
@override
_AnimatedSwitcherDemoState createState() => _AnimatedSwitcherDemoState();
}
@@ -32,12 +33,14 @@ class _AnimatedSwitcherDemoState extends State<AnimatedSwitcherDemo> {
Widget container;
int keyCount;
@override
void initState() {
super.initState();
keyCount = 0;
container = generateContainer(keyCount);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
@@ -47,7 +50,7 @@ class _AnimatedSwitcherDemoState extends State<AnimatedSwitcherDemo> {
() => container = generateContainer(++keyCount),
),
child: Text(
"Change Widget",
'Change Widget',
style: TextStyle(
color: Theme.of(context).buttonTheme.colorScheme.onPrimary),
),