opt: 一键三连
This commit is contained in:
@ -185,7 +185,8 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
);
|
);
|
||||||
_scaleTransition = Tween<double>(begin: 0.5, end: 1.5).animate(_controller)
|
_scaleTransition = Tween<double>(begin: 0.5, end: 1.5).animate(_controller)
|
||||||
..addListener(() async {
|
..addListener(() async {
|
||||||
_progress.value = _scaleTransition.value - 0.5;
|
_progress.value =
|
||||||
|
double.parse((_scaleTransition.value - 0.5).toStringAsFixed(3));
|
||||||
if (_progress.value == 1) {
|
if (_progress.value == 1) {
|
||||||
if (_controller.status == AnimationStatus.completed) {
|
if (_controller.status == AnimationStatus.completed) {
|
||||||
await videoIntroController.actionOneThree();
|
await videoIntroController.actionOneThree();
|
||||||
@ -570,8 +571,8 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
|
|
||||||
Widget progressWidget(progress) {
|
Widget progressWidget(progress) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: 68,
|
width: 33,
|
||||||
height: 68,
|
height: 33,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
value: progress.value,
|
value: progress.value,
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
@ -585,16 +586,15 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
bool likeStatus = videoIntroController.hasLike.value;
|
bool likeStatus = videoIntroController.hasLike.value;
|
||||||
ColorScheme colorScheme = Theme.of(context).colorScheme;
|
ColorScheme colorScheme = Theme.of(context).colorScheme;
|
||||||
return Stack(
|
return Stack(
|
||||||
alignment: Alignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
progressWidget(_progress),
|
Positioned(child: progressWidget(_progress), top: 15, left: 24),
|
||||||
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) {
|
||||||
@ -650,9 +650,8 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
),
|
),
|
||||||
'coin': Obx(
|
'coin': Obx(
|
||||||
() => Stack(
|
() => Stack(
|
||||||
alignment: Alignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
progressWidget(_progress),
|
Positioned(child: progressWidget(_progress), top: 15, left: 24),
|
||||||
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),
|
||||||
@ -664,9 +663,8 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
),
|
),
|
||||||
'collect': Obx(
|
'collect': Obx(
|
||||||
() => Stack(
|
() => Stack(
|
||||||
alignment: Alignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
progressWidget(_progress),
|
Positioned(child: progressWidget(_progress), top: 15, left: 24),
|
||||||
ActionItem(
|
ActionItem(
|
||||||
icon: const Icon(Icons.star_border),
|
icon: const Icon(Icons.star_border),
|
||||||
selectIcon: const Icon(Icons.star),
|
selectIcon: const Icon(Icons.star),
|
||||||
|
|||||||
Reference in New Issue
Block a user