|
|
@ -19,7 +19,6 @@ import 'package:image_pickers/image_pickers.dart'; |
|
|
|
import 'package:path_provider/path_provider.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'; |
|
|
|
import 'package:thumbnails/thumbnails.dart'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CommunityDynamic extends StatefulWidget { |
|
|
|
class CommunityDynamic extends StatefulWidget { |
|
|
|
final int itemCount; |
|
|
|
final int itemCount; |
|
|
@ -30,6 +29,7 @@ class CommunityDynamic extends StatefulWidget { |
|
|
|
final Function exitFull; |
|
|
|
final Function exitFull; |
|
|
|
final bool isList; |
|
|
|
final bool isList; |
|
|
|
final ComunityComment comment; |
|
|
|
final ComunityComment comment; |
|
|
|
|
|
|
|
final String userId; |
|
|
|
|
|
|
|
|
|
|
|
CommunityDynamic( |
|
|
|
CommunityDynamic( |
|
|
|
this.comment, |
|
|
|
this.comment, |
|
|
@ -40,6 +40,7 @@ class CommunityDynamic extends StatefulWidget { |
|
|
|
this.isDetails = false, |
|
|
|
this.isDetails = false, |
|
|
|
this.removalDynamic, |
|
|
|
this.removalDynamic, |
|
|
|
this.exitFull, |
|
|
|
this.exitFull, |
|
|
|
|
|
|
|
this.userId, |
|
|
|
this.isList = false, |
|
|
|
this.isList = false, |
|
|
|
}) : super(key: key); |
|
|
|
}) : super(key: key); |
|
|
|
|
|
|
|
|
|
|
@ -58,6 +59,7 @@ class _CommunityDynamic extends State<CommunityDynamic> { |
|
|
|
ChewieController chewieAudioController; |
|
|
|
ChewieController chewieAudioController; |
|
|
|
Chewie chewies; |
|
|
|
Chewie chewies; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
void initState() { |
|
|
|
void initState() { |
|
|
|
super.initState(); |
|
|
|
super.initState(); |
|
|
@ -115,6 +117,7 @@ class _CommunityDynamic extends State<CommunityDynamic> { |
|
|
|
_vipFollow(followId) async { |
|
|
|
_vipFollow(followId) async { |
|
|
|
BaseData baseData = await apiService.follow(followId); |
|
|
|
BaseData baseData = await apiService.follow(followId); |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
|
|
|
widget.exitFull(); |
|
|
|
SmartDialog.showToast("关注成功", alignment: Alignment.center); |
|
|
|
SmartDialog.showToast("关注成功", alignment: Alignment.center); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); |
|
|
|
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); |
|
|
@ -184,15 +187,15 @@ class _CommunityDynamic extends State<CommunityDynamic> { |
|
|
|
Text( |
|
|
|
Text( |
|
|
|
widget?.comment?.memberInfo?.nickname ?? "", |
|
|
|
widget?.comment?.memberInfo?.nickname ?? "", |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14.sp, |
|
|
|
fontSize: 15.sp, |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
color: Color(0xFF1A1A1A), |
|
|
|
color: Color(0xFF1A1A1A), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
Text( |
|
|
|
widget?.comment?.createTime ?? "", |
|
|
|
widget?.comment?.createTime ?? "", |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12.sp, |
|
|
|
fontSize: 13.sp, |
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
color: Color(0xFF808080), |
|
|
|
color: Color(0xFF808080), |
|
|
|
), |
|
|
|
), |
|
|
@ -202,6 +205,7 @@ class _CommunityDynamic extends State<CommunityDynamic> { |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
if(widget.comment.memberInfo.mid != widget.userId??"") |
|
|
|
GestureDetector( |
|
|
|
GestureDetector( |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
@ -214,12 +218,17 @@ class _CommunityDynamic extends State<CommunityDynamic> { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
child: (widget.commentType == 0) |
|
|
|
child: (widget.commentType == 0 |
|
|
|
? RoundButton( |
|
|
|
) |
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
? Container( |
|
|
|
horizontal: 8, |
|
|
|
width: 56.w, |
|
|
|
vertical: 3, |
|
|
|
height: 21.h, |
|
|
|
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(11.w), |
|
|
|
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
child: RoundButton( |
|
|
|
backgroup: (widget.comment.selfFollow ?? false) |
|
|
|
backgroup: (widget.comment.selfFollow ?? false) |
|
|
|
? Color(0xFFE6E6E6) |
|
|
|
? Color(0xFFE6E6E6) |
|
|
|
: Color(0xFF32A060), |
|
|
|
: Color(0xFF32A060), |
|
|
@ -237,9 +246,9 @@ class _CommunityDynamic extends State<CommunityDynamic> { |
|
|
|
color: (widget.comment.selfFollow ?? false) |
|
|
|
color: (widget.comment.selfFollow ?? false) |
|
|
|
? Color(0xFF808080) |
|
|
|
? Color(0xFF808080) |
|
|
|
: Colors.white, |
|
|
|
: Colors.white, |
|
|
|
size: 14, |
|
|
|
size: 15, |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
)) |
|
|
|
: Icon( |
|
|
|
: Icon( |
|
|
|
Icons.close, |
|
|
|
Icons.close, |
|
|
|
color: Colors.black, |
|
|
|
color: Colors.black, |
|
|
@ -258,7 +267,7 @@ class _CommunityDynamic extends State<CommunityDynamic> { |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
color: Color(0xFF1A1A1A), |
|
|
|
color: Color(0xFF1A1A1A), |
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
fontSize: 14.sp, |
|
|
|
fontSize: 15.sp, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
buildMedia(widget.comment.subjectInfo), |
|
|
|
buildMedia(widget.comment.subjectInfo), |
|
|
@ -285,12 +294,17 @@ class _CommunityDynamic extends State<CommunityDynamic> { |
|
|
|
leftImage: "assets/svg/pinglun.svg", |
|
|
|
leftImage: "assets/svg/pinglun.svg", |
|
|
|
iconSize: 16, |
|
|
|
iconSize: 16, |
|
|
|
), |
|
|
|
), |
|
|
|
IconText( |
|
|
|
GestureDetector( |
|
|
|
|
|
|
|
onTap: (){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child: IconText( |
|
|
|
"${widget.comment.likes ?? 0}", |
|
|
|
"${widget.comment.likes ?? 0}", |
|
|
|
space: 4.w, |
|
|
|
space: 4.w, |
|
|
|
leftImage: "assets/svg/xihuan.svg", |
|
|
|
leftImage: "assets/svg/xihuan.svg", |
|
|
|
iconSize: 16, |
|
|
|
iconSize: 16, |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|