|
|
@ -1,6 +1,4 @@ |
|
|
|
import 'dart:io'; |
|
|
|
|
|
|
|
import 'dart:ui'; |
|
|
|
import 'dart:ui'; |
|
|
|
|
|
|
|
|
|
|
|
import 'package:chewie/chewie.dart'; |
|
|
|
import 'package:chewie/chewie.dart'; |
|
|
|
import 'package:dio/dio.dart'; |
|
|
|
import 'package:dio/dio.dart'; |
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
import 'package:flutter/material.dart'; |
|
|
@ -16,7 +14,6 @@ import 'package:huixiang/view_widget/icon_text.dart'; |
|
|
|
import 'package:huixiang/view_widget/round_button.dart'; |
|
|
|
import 'package:huixiang/view_widget/round_button.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:image_pickers/image_pickers.dart'; |
|
|
|
import 'package:image_pickers/image_pickers.dart'; |
|
|
|
import 'package:path_provider/path_provider.dart'; |
|
|
|
|
|
|
|
import 'package:shared_preferences/shared_preferences.dart'; |
|
|
|
import 'package:shared_preferences/shared_preferences.dart'; |
|
|
|
import 'package:video_player/video_player.dart'; |
|
|
|
import 'package:video_player/video_player.dart'; |
|
|
|
|
|
|
|
|
|
|
@ -59,7 +56,6 @@ class _CommunityDynamic extends State<CommunityDynamic> { |
|
|
|
ChewieController chewieAudioController; |
|
|
|
ChewieController chewieAudioController; |
|
|
|
Chewie chewies; |
|
|
|
Chewie chewies; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
void initState() { |
|
|
|
void initState() { |
|
|
|
super.initState(); |
|
|
|
super.initState(); |
|
|
@ -119,6 +115,7 @@ class _CommunityDynamic extends State<CommunityDynamic> { |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
widget.exitFull(); |
|
|
|
widget.exitFull(); |
|
|
|
SmartDialog.showToast("关注成功", alignment: Alignment.center); |
|
|
|
SmartDialog.showToast("关注成功", alignment: Alignment.center); |
|
|
|
|
|
|
|
setState(() {}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// SmartDialog.showToast(baseData.msg, alignment: Alignment.center); |
|
|
|
// SmartDialog.showToast(baseData.msg, alignment: Alignment.center); |
|
|
|
} |
|
|
|
} |
|
|
@ -130,6 +127,7 @@ class _CommunityDynamic extends State<CommunityDynamic> { |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
widget.exitFull(); |
|
|
|
widget.exitFull(); |
|
|
|
SmartDialog.showToast("删除成功", alignment: Alignment.center); |
|
|
|
SmartDialog.showToast("删除成功", alignment: Alignment.center); |
|
|
|
|
|
|
|
setState(() {}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// SmartDialog.showToast(baseData.msg, alignment: Alignment.center); |
|
|
|
// SmartDialog.showToast(baseData.msg, alignment: Alignment.center); |
|
|
|
} |
|
|
|
} |
|
|
@ -205,14 +203,14 @@ class _CommunityDynamic extends State<CommunityDynamic> { |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
if(widget?.comment?.memberInfo?.mid != widget.userId??"") |
|
|
|
if (widget?.comment?.memberInfo?.mid != widget.userId ?? "") |
|
|
|
GestureDetector( |
|
|
|
GestureDetector( |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
|
if (widget.commentType == 0) { |
|
|
|
if (widget.commentType == 0) { |
|
|
|
widget.comment.selfFollow = |
|
|
|
widget.comment.selfFollow = |
|
|
|
!(widget.comment.selfFollow ?? false); |
|
|
|
!(widget.comment.selfFollow ?? false); |
|
|
|
_vipFollow(widget.comment.memberInfo.mid); |
|
|
|
_vipFollow(widget.comment.memberInfo?.mid); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
showDeleteDialog(); |
|
|
|
showDeleteDialog(); |
|
|
|
} |
|
|
|
} |
|
|
@ -294,9 +292,7 @@ class _CommunityDynamic extends State<CommunityDynamic> { |
|
|
|
iconSize: 16, |
|
|
|
iconSize: 16, |
|
|
|
), |
|
|
|
), |
|
|
|
GestureDetector( |
|
|
|
GestureDetector( |
|
|
|
onTap: (){ |
|
|
|
onTap: () {}, |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child: IconText( |
|
|
|
child: IconText( |
|
|
|
"${widget.comment.likes ?? 0}", |
|
|
|
"${widget.comment.likes ?? 0}", |
|
|
|
space: 4.w, |
|
|
|
space: 4.w, |
|
|
|