summaryrefslogtreecommitdiffstats
path: root/lib/Buttons
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Buttons')
-rw-r--r--lib/Buttons/auto.dart33
1 files changed, 13 insertions, 20 deletions
diff --git a/lib/Buttons/auto.dart b/lib/Buttons/auto.dart
index 536a117..1bdb045 100644
--- a/lib/Buttons/auto.dart
+++ b/lib/Buttons/auto.dart
@@ -21,7 +21,8 @@ class Auto extends ConsumerStatefulWidget {
_AutoState createState() => _AutoState();
}
-class _AutoState extends ConsumerState<Auto> with SingleTickerProviderStateMixin {
+class _AutoState extends ConsumerState<Auto>
+ with SingleTickerProviderStateMixin {
late AnimationController _controller;
late bool isAutoActive;
late Animation<Color?> _colorAnimation;
@@ -39,11 +40,7 @@ class _AutoState extends ConsumerState<Auto> with SingleTickerProviderStateMixin
ColorTween(begin: Colors.lightBlueAccent, end: Colors.green)
.animate(_controller);
- _controller.addListener(() {
-
- });
-
-
+ _controller.addListener(() {});
}
// dismiss the animation when widget exits screen
@@ -62,33 +59,30 @@ class _AutoState extends ConsumerState<Auto> with SingleTickerProviderStateMixin
return InkWell(
child: AnimatedContainer(
constraints: BoxConstraints(
- maxHeight: SizeConfig.screenHeight*0.10,
- maxWidth: SizeConfig.screenWidth*0.15,
+ maxHeight: SizeConfig.screenHeight * 0.10,
+ maxWidth: SizeConfig.screenWidth * 0.15,
),
-
-
decoration: BoxDecoration(
gradient: isAutoActive
? RadialGradient(
- colors: [Colors.black, Colors.lightBlue],
- radius: 2,
- )
+ colors: [Colors.black, Colors.lightBlue],
+ radius: 2,
+ )
: null,
-
-
border: Border.all(
color: Colors.white,
width: 2,
),
- borderRadius: BorderRadius.circular(SizeConfig.safeBlockVertical*2),
+ borderRadius:
+ BorderRadius.circular(SizeConfig.safeBlockVertical * 2),
),
duration: Duration(seconds: 1),
child: AnimatedContainer(
duration: Duration(milliseconds: 100),
- margin: EdgeInsets.all(SizeConfig.blockSizeVertical*2),
+ margin: EdgeInsets.all(SizeConfig.blockSizeVertical * 2),
child: Container(
- width: SizeConfig.screenWidth*0.15,
- height: SizeConfig.screenHeight*0.10,
+ width: SizeConfig.screenWidth * 0.15,
+ height: SizeConfig.screenHeight * 0.10,
child: FittedBox(
fit: BoxFit.fill,
child: Text(
@@ -110,7 +104,6 @@ class _AutoState extends ConsumerState<Auto> with SingleTickerProviderStateMixin
.update(isAutoActive: !isAutoActive);
},
);
-
});
}
}