mirror of
https://github.com/flutter/samples.git
synced 2026-05-14 02:47:42 +00:00
Landing beta changes in master for the new stable release (#747)
This commit is contained in:
@@ -5,13 +5,13 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TypewriterTween extends Tween<String> {
|
||||
TypewriterTween({String begin = '', String end})
|
||||
TypewriterTween({String begin = '', String end = ''})
|
||||
: super(begin: begin, end: end);
|
||||
|
||||
@override
|
||||
String lerp(double t) {
|
||||
var cutoff = (end.length * t).round();
|
||||
return end.substring(0, cutoff);
|
||||
var cutoff = (end!.length * t).round();
|
||||
return end!.substring(0, cutoff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@ class _CustomTweenDemoState extends State<CustomTweenDemo>
|
||||
with SingleTickerProviderStateMixin {
|
||||
static const Duration _duration = Duration(seconds: 3);
|
||||
static const String message = loremIpsum;
|
||||
AnimationController controller;
|
||||
Animation<String> animation;
|
||||
late final AnimationController controller;
|
||||
late final Animation<String> animation;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
||||
Reference in New Issue
Block a user