1
0
mirror of https://github.com/flutter/samples.git synced 2026-04-07 04:02:13 +00:00

Landing beta changes in master for the new stable release (#747)

This commit is contained in:
Andrew Brogdon
2021-03-03 11:44:35 -08:00
committed by GitHub
parent 6c81510d6e
commit 8c1cd0b049
101 changed files with 1006 additions and 1040 deletions

View File

@@ -14,8 +14,8 @@ class TweenSequenceDemo extends StatefulWidget {
class _TweenSequenceDemoState extends State<TweenSequenceDemo>
with SingleTickerProviderStateMixin {
static const Duration duration = Duration(seconds: 3);
AnimationController controller;
Animation<Color> animation;
late final AnimationController controller;
late final Animation<Color?> animation;
static final colors = [
Colors.red,
@@ -31,7 +31,7 @@ class _TweenSequenceDemoState extends State<TweenSequenceDemo>
void initState() {
super.initState();
final sequenceItems = <TweenSequenceItem<Color>>[];
final sequenceItems = <TweenSequenceItem<Color?>>[];
for (var i = 0; i < colors.length; i++) {
final beginColor = colors[i];
@@ -39,7 +39,7 @@ class _TweenSequenceDemoState extends State<TweenSequenceDemo>
final weight = 1 / colors.length;
sequenceItems.add(
TweenSequenceItem<Color>(
TweenSequenceItem<Color?>(
tween: ColorTween(begin: beginColor, end: endColor),
weight: weight,
),
@@ -47,7 +47,7 @@ class _TweenSequenceDemoState extends State<TweenSequenceDemo>
}
controller = AnimationController(duration: duration, vsync: this);
animation = TweenSequence<Color>(sequenceItems).animate(controller);
animation = TweenSequence<Color?>(sequenceItems).animate(controller);
}
@override