1
0
mirror of https://github.com/flutter/samples.git synced 2026-04-01 01:03:30 +00:00
This commit is contained in:
Brett Morgan
2022-05-11 12:48:11 -07:00
committed by GitHub
parent fb00d0a102
commit ccd68f34e2
242 changed files with 1719 additions and 1430 deletions

View File

@@ -9,7 +9,7 @@ class AnimatedListDemo extends StatefulWidget {
static String routeName = '/misc/animated_list';
@override
_AnimatedListDemoState createState() => _AnimatedListDemoState();
State<AnimatedListDemo> createState() => _AnimatedListDemoState();
}
class _AnimatedListDemoState extends State<AnimatedListDemo> {

View File

@@ -11,7 +11,7 @@ class AnimatedPositionedDemo extends StatefulWidget {
static String routeName = '/basics/09_animated_positioned';
@override
_AnimatedPositionedDemoState createState() => _AnimatedPositionedDemoState();
State<AnimatedPositionedDemo> createState() => _AnimatedPositionedDemoState();
}
class _AnimatedPositionedDemoState extends State<AnimatedPositionedDemo> {
@@ -62,6 +62,7 @@ class _AnimatedPositionedDemoState extends State<AnimatedPositionedDemo> {
alignment: Alignment.center,
width: 150,
height: 50,
color: Theme.of(context).primaryColor,
child: Text(
'Click Me',
style: TextStyle(
@@ -69,7 +70,6 @@ class _AnimatedPositionedDemoState extends State<AnimatedPositionedDemo> {
Theme.of(context).buttonTheme.colorScheme!.onPrimary,
),
),
color: Theme.of(context).primaryColor,
),
),
),

View File

@@ -27,7 +27,7 @@ class AnimatedSwitcherDemo extends StatefulWidget {
static String routeName = '/basics/10_animated_switcher';
@override
_AnimatedSwitcherDemoState createState() => _AnimatedSwitcherDemoState();
State<AnimatedSwitcherDemo> createState() => _AnimatedSwitcherDemoState();
}
class _AnimatedSwitcherDemoState extends State<AnimatedSwitcherDemo> {
@@ -67,8 +67,8 @@ class _AnimatedSwitcherDemoState extends State<AnimatedSwitcherDemo> {
duration: const Duration(seconds: 1),
child: container,
transitionBuilder: (child, animation) => ScaleTransition(
child: child,
scale: animation,
child: child,
),
),
),

View File

@@ -10,7 +10,7 @@ class CardSwipeDemo extends StatefulWidget {
static String routeName = '/misc/card_swipe';
@override
_CardSwipeDemoState createState() => _CardSwipeDemoState();
State<CardSwipeDemo> createState() => _CardSwipeDemoState();
}
class _CardSwipeDemoState extends State<CardSwipeDemo> {
@@ -105,7 +105,7 @@ class SwipeableCard extends StatefulWidget {
: super(key: key);
@override
_SwipeableCardState createState() => _SwipeableCardState();
State<SwipeableCard> createState() => _SwipeableCardState();
}
class _SwipeableCardState extends State<SwipeableCard>

View File

@@ -49,7 +49,7 @@ class Carousel extends StatefulWidget {
const Carousel({Key? key, required this.itemBuilder}) : super(key: key);
@override
_CarouselState createState() => _CarouselState();
State<Carousel> createState() => _CarouselState();
}
class _CarouselState extends State<Carousel> {

View File

@@ -10,7 +10,7 @@ class CurvedAnimationDemo extends StatefulWidget {
static const String routeName = '/misc/curved_animation';
@override
_CurvedAnimationDemoState createState() => _CurvedAnimationDemoState();
State<CurvedAnimationDemo> createState() => _CurvedAnimationDemoState();
}
class CurveChoice {

View File

@@ -24,7 +24,7 @@ class ExpandCardDemo extends StatelessWidget {
class ExpandCard extends StatefulWidget {
const ExpandCard({Key? key}) : super(key: key);
@override
_ExpandCardState createState() => _ExpandCardState();
State<ExpandCard> createState() => _ExpandCardState();
}
class _ExpandCardState extends State<ExpandCard>

View File

@@ -31,7 +31,7 @@ class DraggableCard extends StatefulWidget {
final Widget child;
@override
_DraggableCardState createState() => _DraggableCardState();
State<DraggableCard> createState() => _DraggableCardState();
}
class _DraggableCardState extends State<DraggableCard>

View File

@@ -9,10 +9,10 @@ class RepeatingAnimationDemo extends StatefulWidget {
static String routeName = '/misc/repeating_animation';
@override
RepeatingAnimationDemoState createState() => RepeatingAnimationDemoState();
State<RepeatingAnimationDemo> createState() => _RepeatingAnimationDemoState();
}
class RepeatingAnimationDemoState extends State<RepeatingAnimationDemo>
class _RepeatingAnimationDemoState extends State<RepeatingAnimationDemo>
with SingleTickerProviderStateMixin {
late final AnimationController _controller;
late final Animation<BorderRadius?> _borderRadius;