Skip to content

Commit

Permalink
style: 💄播放按钮样式调整
Browse files Browse the repository at this point in the history
  • Loading branch information
xuergo committed Apr 6, 2023
1 parent cedf638 commit 21267aa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
26 changes: 18 additions & 8 deletions lib/components/play_btn.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,27 @@ class PlayBtn extends StatelessWidget {
onTap: onTap,
child: CustomPaint(
painter: CircleProgressBarPainter(
strokeWidth: 4.w,
strokeWidth: 3.w,
value: data.id == state.playData?.id ? state.progressValue : 0,
backgroundColor: AppColors.primaryGreyBackground,
backgroundColor: data.id == state.playData?.id
? AppColors.primaryGreyBackground
: Colors.transparent,
color: AppColors.primaryColor,
),
child: Padding(
padding: EdgeInsets.all(6.w),
child: Icon(
icon,
size: size != null ? size : 28.w,
color: data.id == state.playData?.id ? Colors.black : color,
child: Container(
decoration: BoxDecoration(
color: data.id == state.playData?.id
? Colors.transparent
: color.withOpacity(0.1),
borderRadius: BorderRadius.all(Radius.circular(100.r)),
),
child: Padding(
padding: EdgeInsets.all(6.w),
child: Icon(
icon,
size: size != null ? size : 28.w,
color: data.id == state.playData?.id ? Colors.black : color,
),
),
),
));
Expand Down
1 change: 1 addition & 0 deletions lib/pages/details/details_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ class DetailsPage extends StatelessWidget {
PlayBtn(
size: 35.w,
data: state.details,
isShowDataColor: true,
),
],
),
Expand Down

0 comments on commit 21267aa

Please sign in to comment.