Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 44 additions & 14 deletions lib/buttons/simple_round_icon_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,29 @@ class SimpleRoundIconButton extends StatelessWidget {
offset: Offset(-10.0, 0.0),
child: new Container(
padding: const EdgeInsets.all(5.0),
child: FlatButton(
shape: new RoundedRectangleBorder(
borderRadius:
new BorderRadius.circular(28.0)),
splashColor: Colors.white,
color: Colors.white,
child:
// FlatButton(
// shape: new RoundedRectangleBorder(
// borderRadius:
// new BorderRadius.circular(28.0)),
// splashColor: Colors.white,
// color: Colors.white,
// child: Icon(
// icon.icon,
// color: iconColor == null
// ? backgroundColor
// : iconColor,
// ),
// onPressed: () => {},
// ),
TextButton(
onPressed: () {},
child: Icon(
icon.icon,
color: iconColor == null
? backgroundColor
: iconColor,
),
onPressed: () => {},
),
),
)
Expand All @@ -78,19 +88,39 @@ class SimpleRoundIconButton extends StatelessWidget {
offset: Offset(10.0, 0.0),
child: new Container(
padding: const EdgeInsets.all(5.0),
child: FlatButton(
shape: new RoundedRectangleBorder(
borderRadius:
new BorderRadius.circular(28.0)),
splashColor: Colors.white,
color: Colors.white,
child:
// FlatButton(
// shape: new RoundedRectangleBorder(
// borderRadius:
// new BorderRadius.circular(28.0)),
// splashColor: Colors.white,
// color: Colors.white,
// child: Icon(
// icon.icon,
// color: iconColor == null
// ? backgroundColor
// : iconColor,
// ),
// onPressed: () => {},
// ),
TextButton(
style: ButtonStyle(
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius:
new BorderRadius.circular(28.0),
),
),
backgroundColor:
MaterialStateProperty.all(Colors.white),
),
onPressed: () {},
child: Icon(
icon.icon,
color: iconColor == null
? backgroundColor
: iconColor,
),
onPressed: () => {},
),
),
)
Expand Down
36 changes: 26 additions & 10 deletions lib/buttons/simple_round_only_icon_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,33 @@ class SimpleRoundOnlyIconButton extends StatelessWidget {
right: 5.0,
top: 10.0,
bottom: 10.0),
child: FlatButton(
shape: new RoundedRectangleBorder(
borderRadius:
new BorderRadius.circular(28.0)),
splashColor: Colors.white,
color: Colors.white,
child: Icon(
icon!.icon,
color: this.iconColor,
child:
// FlatButton(
// shape: new RoundedRectangleBorder(
// borderRadius:
// new BorderRadius.circular(28.0)),
// splashColor: Colors.white,
// color: Colors.white,
// child: Icon(
// icon!.icon,
// color: this.iconColor,
// ),
// onPressed: () => {},
// ),
TextButton(
style: ButtonStyle(
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius:
new BorderRadius.circular(28.0),
),
),
backgroundColor:
MaterialStateProperty.all(Colors.white),
),
onPressed: () => {},
onPressed: () {},
child:
Icon(icon!.icon, color: this.iconColor),
),
),
)
Expand Down
21 changes: 9 additions & 12 deletions lib/loaders/color_loader_3.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class ColorLoader3 extends StatefulWidget {

class _ColorLoader3State extends State<ColorLoader3>
with SingleTickerProviderStateMixin {
late Animation<double> animation_rotation;
late Animation<double> animation_radius_in;
late Animation<double> animation_radius_out;
late Animation<double> animationRotation;
late Animation<double> animationRadiusIn;
late Animation<double> animationRadiusOut;
late AnimationController controller;

late double radius;
Expand All @@ -36,21 +36,21 @@ class _ColorLoader3State extends State<ColorLoader3>
duration: const Duration(milliseconds: 3000),
vsync: this);

animation_rotation = Tween(begin: 0.0, end: 1.0).animate(
animationRotation = Tween(begin: 0.0, end: 1.0).animate(
CurvedAnimation(
parent: controller,
curve: Interval(0.0, 1.0, curve: Curves.linear),
),
);

animation_radius_in = Tween(begin: 1.0, end: 0.0).animate(
animationRadiusIn = Tween(begin: 1.0, end: 0.0).animate(
CurvedAnimation(
parent: controller,
curve: Interval(0.75, 1.0, curve: Curves.elasticIn),
),
);

animation_radius_out = Tween(begin: 0.0, end: 1.0).animate(
animationRadiusOut = Tween(begin: 0.0, end: 1.0).animate(
CurvedAnimation(
parent: controller,
curve: Interval(0.0, 0.25, curve: Curves.elasticOut),
Expand All @@ -60,9 +60,9 @@ class _ColorLoader3State extends State<ColorLoader3>
controller.addListener(() {
setState(() {
if (controller.value >= 0.75 && controller.value <= 1.0)
radius = widget.radius * animation_radius_in.value;
radius = widget.radius * animationRadiusIn.value;
else if (controller.value >= 0.0 && controller.value <= 0.25)
radius = widget.radius * animation_radius_out.value;
radius = widget.radius * animationRadiusOut.value;
});
});

Expand All @@ -81,8 +81,7 @@ class _ColorLoader3State extends State<ColorLoader3>
//color: Colors.black12,
child: new Center(
child: new RotationTransition(

turns: animation_rotation,
turns: animationRotation,
child: new Container(
//color: Colors.limeAccent,
child: new Center(
Expand Down Expand Up @@ -186,7 +185,6 @@ class _ColorLoader3State extends State<ColorLoader3>

@override
void dispose() {

controller.dispose();
super.dispose();
}
Expand All @@ -205,7 +203,6 @@ class Dot extends StatelessWidget {
width: radius,
height: radius,
decoration: BoxDecoration(color: color, shape: BoxShape.circle),

),
);
}
Expand Down
Loading