format code

This commit is contained in:
Evgeny Poberezkin
2021-10-09 17:21:10 +01:00
parent 44892e5b03
commit d6b6fde480
3 changed files with 14 additions and 14 deletions
@@ -6,7 +6,7 @@ class Animator extends StatefulWidget {
final Widget child;
final Duration time;
const Animator(this.child, this.time, {Key? key}): super(key: key);
const Animator(this.child, this.time, {Key? key}) : super(key: key);
@override
_AnimatorState createState() => _AnimatorState();
@@ -21,8 +21,8 @@ class _AnimatorState extends State<Animator>
@override
void initState() {
super.initState();
animationController =
AnimationController(duration: const Duration(milliseconds: 290), vsync: this);
animationController = AnimationController(
duration: const Duration(milliseconds: 290), vsync: this);
animation =
CurvedAnimation(parent: animationController!, curve: Curves.easeInOut);
timer = Timer(widget.time, animationController!.forward);
@@ -69,7 +69,7 @@ Duration wait() {
class WidgetAnimator extends StatelessWidget {
final Widget? child;
const WidgetAnimator({this.child, Key? key}): super(key: key);
const WidgetAnimator({this.child, Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
@@ -27,8 +27,8 @@ class _HomeViewState extends State<HomeView> with TickerProviderStateMixin {
@override
void initState() {
super.initState();
animationController =
AnimationController(vsync: this, duration: const Duration(milliseconds: 250));
animationController = AnimationController(
vsync: this, duration: const Duration(milliseconds: 250));
}
@override
@@ -1,14 +1,14 @@
import 'package:flutter/material.dart';
class CustomButton extends StatelessWidget {
const CustomButton({
@required this.width,
@required this.height,
@required this.onPressed,
@required this.color,
@required this.child,
Key? key
}): super(key: key);
const CustomButton(
{@required this.width,
@required this.height,
@required this.onPressed,
@required this.color,
@required this.child,
Key? key})
: super(key: key);
final double? width;
final double? height;
final void Function()? onPressed;