cleanup
This commit is contained in:
@@ -67,10 +67,7 @@ class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
|
|||||||
return InitData(client, prefs);
|
return InitData(client, prefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
void _createAnimations() {
|
||||||
void initState() {
|
|
||||||
timeOfStartMs = DateTime.now().millisecondsSinceEpoch;
|
|
||||||
|
|
||||||
_scaleAnimationController = AnimationController(
|
_scaleAnimationController = AnimationController(
|
||||||
vsync: this,
|
vsync: this,
|
||||||
duration: Duration(
|
duration: Duration(
|
||||||
@@ -105,20 +102,27 @@ class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
|
|||||||
parent: _animationController,
|
parent: _animationController,
|
||||||
curve: Curves.easeInOut,
|
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(
|
_initConnection().then(
|
||||||
(initData) {
|
(initData) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_initData = initData;
|
_initData = initData;
|
||||||
});
|
});
|
||||||
|
|
||||||
_colorAnimation = ColorTween(
|
|
||||||
begin: Color(0xff005FFF),
|
|
||||||
end: Colors.transparent,
|
|
||||||
).animate(CurvedAnimation(
|
|
||||||
parent: _animationController,
|
|
||||||
curve: Curves.easeInOut,
|
|
||||||
));
|
|
||||||
|
|
||||||
var now = DateTime.now().millisecondsSinceEpoch;
|
var now = DateTime.now().millisecondsSinceEpoch;
|
||||||
|
|
||||||
if (now - timeOfStartMs > 1500) {
|
if (now - timeOfStartMs > 1500) {
|
||||||
|
|||||||
Reference in New Issue
Block a user