Skip to content

Commit d0658bc

Browse files
committed
- CenterPlayButton padding improved
1 parent 1c1134d commit d0658bc

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

lib/src/center_play_button.dart

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,18 @@ class CenterPlayButton extends StatelessWidget {
3333
color: backgroundColor,
3434
shape: BoxShape.circle,
3535
),
36-
child: Padding(
36+
// Always set the iconSize on the IconButton, not on the Icon itself:
37+
// https://github.com/flutter/flutter/issues/52980
38+
child: IconButton(
39+
iconSize: 32,
3740
padding: const EdgeInsets.all(12.0),
38-
// Always set the iconSize on the IconButton, not on the Icon itself:
39-
// https://github.com/flutter/flutter/issues/52980
40-
child: IconButton(
41-
iconSize: 32,
42-
icon: isFinished
43-
? Icon(Icons.replay, color: iconColor)
44-
: AnimatedPlayPause(
45-
color: iconColor,
46-
playing: isPlaying,
47-
),
48-
onPressed: onPressed,
49-
),
41+
icon: isFinished
42+
? Icon(Icons.replay, color: iconColor)
43+
: AnimatedPlayPause(
44+
color: iconColor,
45+
playing: isPlaying,
46+
),
47+
onPressed: onPressed,
5048
),
5149
),
5250
),

0 commit comments

Comments
 (0)