This commit is contained in:
Salvatore Giordano
2021-02-16 17:10:49 +01:00
parent 4055669684
commit 02565c85a9
+16 -12
View File
@@ -67,10 +67,7 @@ class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
return InitData(client, prefs);
}
@override
void initState() {
timeOfStartMs = DateTime.now().millisecondsSinceEpoch;
void _createAnimations() {
_scaleAnimationController = AnimationController(
vsync: this,
duration: Duration(
@@ -105,20 +102,27 @@ class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
parent: _animationController,
curve: Curves.easeInOut,
));
_colorAnimation = ColorTween(
begin: Color(0xff005FFF),
end: Colors.transparent,
).animate(CurvedAnimation(
parent: _animationController,
curve: Curves.easeInOut,
));
}
@override
void initState() {
timeOfStartMs = DateTime.now().millisecondsSinceEpoch;
_createAnimations();
_initConnection().then(
(initData) {
setState(() {
_initData = initData;
});
_colorAnimation = ColorTween(
begin: Color(0xff005FFF),
end: Colors.transparent,
).animate(CurvedAnimation(
parent: _animationController,
curve: Curves.easeInOut,
));
var now = DateTime.now().millisecondsSinceEpoch;
if (now - timeOfStartMs > 1500) {