opt: 一键三连样式
This commit is contained in:
@ -561,8 +561,8 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
|
|
||||||
Widget progressWidget(progress) {
|
Widget progressWidget(progress) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: 33,
|
width: const IconThemeData.fallback().size! + 5,
|
||||||
height: 33,
|
height: const IconThemeData.fallback().size! + 5,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
value: progress.value,
|
value: progress.value,
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
@ -577,14 +577,19 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
ColorScheme colorScheme = Theme.of(context).colorScheme;
|
ColorScheme colorScheme = Theme.of(context).colorScheme;
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
Positioned(child: progressWidget(_progress), top: 15, left: 24),
|
Positioned(
|
||||||
|
top: ((Get.size.width - 24) / 5) / 2 -
|
||||||
|
(const IconThemeData.fallback().size!),
|
||||||
|
left: ((Get.size.width - 24) / 5) / 2 -
|
||||||
|
(const IconThemeData.fallback().size! + 5) / 2,
|
||||||
|
child: progressWidget(_progress)),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTapDown: (details) {
|
onTapDown: (details) {
|
||||||
feedBack();
|
feedBack();
|
||||||
// if (videoIntroController.userInfo == null) {
|
if (videoIntroController.userInfo == null) {
|
||||||
// SmartDialog.showToast('账号未登录');
|
SmartDialog.showToast('账号未登录');
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
_controller.forward();
|
_controller.forward();
|
||||||
},
|
},
|
||||||
onTapUp: (TapUpDetails details) {
|
onTapUp: (TapUpDetails details) {
|
||||||
@ -641,7 +646,12 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
'coin': Obx(
|
'coin': Obx(
|
||||||
() => Stack(
|
() => Stack(
|
||||||
children: [
|
children: [
|
||||||
Positioned(child: progressWidget(_progress), top: 15, left: 24),
|
Positioned(
|
||||||
|
top: ((Get.size.width - 24) / 5) / 2 -
|
||||||
|
(const IconThemeData.fallback().size!),
|
||||||
|
left: ((Get.size.width - 24) / 5) / 2 -
|
||||||
|
(const IconThemeData.fallback().size! + 5) / 2,
|
||||||
|
child: progressWidget(_progress)),
|
||||||
ActionItem(
|
ActionItem(
|
||||||
icon: Image.asset('assets/images/coin.png', width: 30),
|
icon: Image.asset('assets/images/coin.png', width: 30),
|
||||||
onTap: handleState(videoIntroController.actionCoinVideo),
|
onTap: handleState(videoIntroController.actionCoinVideo),
|
||||||
@ -654,7 +664,12 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
'collect': Obx(
|
'collect': Obx(
|
||||||
() => Stack(
|
() => Stack(
|
||||||
children: [
|
children: [
|
||||||
Positioned(child: progressWidget(_progress), top: 15, left: 24),
|
Positioned(
|
||||||
|
top: ((Get.size.width - 24) / 5) / 2 -
|
||||||
|
(const IconThemeData.fallback().size!),
|
||||||
|
left: ((Get.size.width - 24) / 5) / 2 -
|
||||||
|
(const IconThemeData.fallback().size! + 5) / 2,
|
||||||
|
child: progressWidget(_progress)),
|
||||||
ActionItem(
|
ActionItem(
|
||||||
icon: const Icon(Icons.star_border),
|
icon: const Icon(Icons.star_border),
|
||||||
selectIcon: const Icon(Icons.star),
|
selectIcon: const Icon(Icons.star),
|
||||||
|
@ -55,7 +55,7 @@ class ActionItem extends StatelessWidget {
|
|||||||
: Image.asset(
|
: Image.asset(
|
||||||
key: ValueKey<bool>(selectStatus),
|
key: ValueKey<bool>(selectStatus),
|
||||||
'assets/images/coin.png',
|
'assets/images/coin.png',
|
||||||
width: 25,
|
width: const IconThemeData.fallback().size,
|
||||||
color: selectStatus
|
color: selectStatus
|
||||||
? Theme.of(context).colorScheme.primary
|
? Theme.of(context).colorScheme.primary
|
||||||
: Theme.of(context).colorScheme.outline,
|
: Theme.of(context).colorScheme.outline,
|
||||||
|
Reference in New Issue
Block a user