代码提交

This commit is contained in:
CYH 2025-05-24 14:01:27 +08:00
parent 4284732820
commit ad1cecc56d
29 changed files with 422 additions and 324 deletions

View File

@ -71,8 +71,8 @@ android {
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21 minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion targetSdkVersion flutter.targetSdkVersion
versionCode 111 versionCode 115
versionName "2.6.1" versionName "2.6.5"
manifestPlaceholders = [ manifestPlaceholders = [
vivo_APPID: "105669716", vivo_APPID: "105669716",
vivo_APPKEY:"84f750207787376b310ca5b0d5969122", vivo_APPKEY:"84f750207787376b310ca5b0d5969122",

View File

@ -451,7 +451,7 @@ class _Call_out_detailPageState extends State<Call_out_detailPage> {
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
padding: EdgeInsets.only(left: 5.sp, right: 10.sp), padding: EdgeInsets.only(left: 2.sp, right: 2.sp),
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 10.sp), top: picHeight > 0 ? 5.sp : 5.sp, bottom: 10.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -479,7 +479,7 @@ class _Call_out_detailPageState extends State<Call_out_detailPage> {
)) ))
: Expanded( : Expanded(
child: Text( child: Text(
'赶紧成为第一位私聊ta的人吧', '快成为第一位私聊ta的人',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 13.sp), fontSize: 13.sp),
@ -991,7 +991,7 @@ class _Call_out_detailPageState extends State<Call_out_detailPage> {
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
padding: EdgeInsets.only(left: 5.sp, right: 10.sp), padding: EdgeInsets.only(left: 2.sp, right: 2.sp),
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 10.sp), top: picHeight > 0 ? 5.sp : 5.sp, bottom: 10.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -1019,7 +1019,7 @@ class _Call_out_detailPageState extends State<Call_out_detailPage> {
)) ))
: Expanded( : Expanded(
child: Text( child: Text(
'赶紧成为第一位私聊ta的人吧', '快成为第一位私聊ta的人',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 13.sp), fontSize: 13.sp),

View File

@ -1309,7 +1309,7 @@ class _TIMUIKItHistoryMessageListItemState
)) ))
: Expanded( : Expanded(
child: Text( child: Text(
'赶紧成为第一位私聊ta的人吧', '快成为第一位私聊ta的人',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 13.sp), fontSize: 13.sp),
@ -1714,7 +1714,7 @@ class _TIMUIKItHistoryMessageListItemState
)) ))
: Expanded( : Expanded(
child: Text( child: Text(
'赶紧成为第一位私聊ta的人吧', '快成为第一位私聊ta的人',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 13.sp), fontSize: 13.sp),

View File

@ -266,18 +266,18 @@ class _ChatPageState extends State<ChatPage>
int count = 0; int count = 0;
int otherCount = 0; int otherCount = 0;
currentRecordList?.forEach((element) { currentRecordList?.forEach((element) {
if (element?.isSelf ?? false) { if ((element?.isSelf ?? false) && (element?.status == MessageStatus.V2TIM_MSG_STATUS_SEND_SUCC || element?.status == 1)) {
count++; count++;
} else { } else {
otherCount++; otherCount++;
} }
}); });
// if (count > 1 && otherCount > 0) { if (count >= 3 && otherCount >= 3) {
tipSendVipIdlList.add(con.userID); tipSendVipIdlList.add(con.userID);
Get.bottomSheet(SendVipDialog(con.userID!), Get.bottomSheet(SendVipDialog(con.userID!),
isScrollControlled: true); isScrollControlled: true);
// } }
} }
} }
}); });

View File

@ -16,11 +16,13 @@ class Circie_rowLogic extends GetxController {
List locationDataList = []; List locationDataList = [];
Position? position; Position? position;
var isLoad = true; var isLoad = true;
int chargeFreeNum = 0;
@override @override
void onInit() { void onInit() {
// TODO: implement onInit // TODO: implement onInit
super.onInit(); super.onInit();
loadCircleManagerData(); loadCircleManagerData();
// loadCircleInfo();
// loadCircleUserData(); // loadCircleUserData();
} }
@ -54,6 +56,7 @@ class Circie_rowLogic extends GetxController {
url: Api.queryRecommendInterestUser, url: Api.queryRecommendInterestUser,
params: params); params: params);
if (result['code'] == 200) { if (result['code'] == 200) {
chargeFreeNum = result['data']['chargeFreeNum'];
List dataList = result['data']['lists']; List dataList = result['data']['lists'];
return dataList; return dataList;
} }

View File

@ -1,3 +1,5 @@
import 'dart:convert';
import 'package:circle_app/circle_app/circle/widgets/discover.dart'; import 'package:circle_app/circle_app/circle/widgets/discover.dart';
import 'package:circle_app/utils/cache_img.dart'; import 'package:circle_app/utils/cache_img.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -6,6 +8,7 @@ import 'package:get/get.dart';
import 'package:gradient_borders/box_borders/gradient_box_border.dart'; import 'package:gradient_borders/box_borders/gradient_box_border.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import '../../commons/Widgets/base_tip_widget.dart';
import '../../commons/Widgets/my_app_bar.dart'; import '../../commons/Widgets/my_app_bar.dart';
import '../../commons/Widgets/tag_widget.dart'; import '../../commons/Widgets/tag_widget.dart';
import '../../commons/colors/app_color.dart'; import '../../commons/colors/app_color.dart';
@ -376,6 +379,7 @@ class _CircleUserInfoItemState extends State<CircleUserInfoItem> with AutomaticK
final RefreshController refreshController = RefreshController(); final RefreshController refreshController = RefreshController();
int page = 1; int page = 1;
bool isLoad = true; bool isLoad = true;
int chargeFreeNum = 0;
@override @override
void initState() { void initState() {
// TODO: implement initState // TODO: implement initState
@ -526,6 +530,32 @@ class _CircleUserInfoItemState extends State<CircleUserInfoItem> with AutomaticK
GestureDetector( GestureDetector(
onTap: () { onTap: () {
// if (item.imId.isNotEmpty) { // if (item.imId.isNotEmpty) {
// if (index > logic.chargeFreeNum && item) {
//
// }
if (logic.circleInfo.is_limit && logic.circleInfo.amount > 0 && logic.chargeFreeNum <= index) {
showJoinCiclePiker(logic.circleInfo.id.toString(), logic.circleInfo.amount.toString(),
logic.circleInfo.oldAmount.toString(), 2, (payResult) {
logic.circleInfo.is_limit = false;
if (Get.isRegistered<CircleLogic>()) {
var logic1 = Get.find<CircleLogic>();
for (var element in logic1.circle.lists) {
if (element.id == logic.circleInfo.id) {
element.is_limit = false;
element.isJoin = true;
}
}
logic.circleInfo.is_limit = false;
logic1.update();
logic.update();
}
Get.back();
}, logic.circleInfo.ios_item);
return;
}
pushChatPage( pushChatPage(
userInfo['id'].toString(), userInfo['id'].toString(),
userInfo['imId'].toString(), userInfo['imId'].toString(),

View File

@ -28,10 +28,11 @@ class Lists {
String? at; String? at;
Map? topInteractType; Map? topInteractType;
int? isInteract; int? isInteract;
int? chargeFreeNum;
String? interactedTypeEmote; String? interactedTypeEmote;
Lists( Lists(
{this.album, this.chat, this.content, this.id, this.isQueen, this.user,this.interactedTypeEmote}); {this.album, this.chat, this.content, this.id, this.isQueen, this.user,this.interactedTypeEmote,this.chargeFreeNum});
Lists.fromJson(Map<String, dynamic> json) { Lists.fromJson(Map<String, dynamic> json) {
if (json['album'] != null) { if (json['album'] != null) {
@ -44,6 +45,7 @@ class Lists {
content = json['content']; content = json['content'];
id = json['id']; id = json['id'];
at = json['at'] ?? ''; at = json['at'] ?? '';
chargeFreeNum = json['chargeFreeNum'] ?? 0;
isSystem = json['isSystem']; isSystem = json['isSystem'];
jumpInfo = json['jumpInfo'] != null jumpInfo = json['jumpInfo'] != null
? new JumpInfo.fromJson(json['jumpInfo']) ? new JumpInfo.fromJson(json['jumpInfo'])

View File

@ -68,6 +68,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
double widgetWidth = 0.0; double widgetWidth = 0.0;
Map interestAgentMap = {}; Map interestAgentMap = {};
HomeLogic homeLogic = Get.find<HomeLogic>(); HomeLogic homeLogic = Get.find<HomeLogic>();
int chargeFreeNum = 0;
@override @override
void dispose() { void dispose() {
// TODO: implement dispose // TODO: implement dispose
@ -190,6 +191,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
params: {"page": callOutPage, "page_size": "8"}); params: {"page": callOutPage, "page_size": "8"});
if (data["code"] == 200) { if (data["code"] == 200) {
List dataList = data["data"]["lists"] ?? []; List dataList = data["data"]["lists"] ?? [];
chargeFreeNum = data['data']['chargeFreeNum'] ?? 0;
if (callOutPage == 1) { if (callOutPage == 1) {
if (lists.isNotEmpty) { if (lists.isNotEmpty) {
lists.clear(); lists.clear();
@ -272,11 +274,11 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
} }
} }
pushUserHome(String userId) async { pushUserHome(String userId,bool islimit) async {
if (widget.bean.is_limit && widget.bean.amount > 0) { if (widget.bean.is_limit && widget.bean.amount > 0) {
await refreshCircleData(); await refreshCircleData();
} }
if (widget.bean.is_limit && widget.bean.amount > 0) { if (widget.bean.is_limit && widget.bean.amount > 0 && islimit) {
Get.toNamed(Routes.UserInfoPage, arguments: userId,parameters: {'source':widget.index == 0 ? 'callout_list_hot' : 'callout_list_new','bean':jsonEncode({'id':widget.bean.id.toString(),'amount':widget.bean.amount.toString(),'oldAmount':widget.bean.oldAmount.toString(),'iosItem':widget.bean.ios_item})}); Get.toNamed(Routes.UserInfoPage, arguments: userId,parameters: {'source':widget.index == 0 ? 'callout_list_hot' : 'callout_list_new','bean':jsonEncode({'id':widget.bean.id.toString(),'amount':widget.bean.amount.toString(),'oldAmount':widget.bean.oldAmount.toString(),'iosItem':widget.bean.ios_item})});
} else { } else {
Get.toNamed(Routes.UserInfoPage, arguments: userId,parameters: {'source':widget.index == 0 ? 'callout_list_hot' : 'callout_list_new',}); Get.toNamed(Routes.UserInfoPage, arguments: userId,parameters: {'source':widget.index == 0 ? 'callout_list_hot' : 'callout_list_new',});
@ -295,7 +297,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
return; return;
} }
if (widget.bean.is_limit&&widget.bean.amount>0) { if (widget.bean.is_limit&&widget.bean.amount>0 && lists.indexOf(bean) >= chargeFreeNum) {
showJoinCiclePiker(cicleId,widget.bean.amount.toString(),widget.bean.oldAmount.toString(),2,(payResult){ showJoinCiclePiker(cicleId,widget.bean.amount.toString(),widget.bean.oldAmount.toString(),2,(payResult){
widget.bean.is_limit = false; widget.bean.is_limit = false;
if (Get.isRegistered<CircleLogic>()) { if (Get.isRegistered<CircleLogic>()) {
@ -1017,13 +1019,13 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
} }
/// ///
vipDynamicItem(Lists lists) { vipDynamicItem(Lists list) {
int type = (lists.topInteractType?['type'] ?? 1) - 1; int type = (list.topInteractType?['type'] ?? 1) - 1;
Widget descText = widget.logic.openCallOutIdList.contains(lists.id) ? Text( Widget descText = widget.logic.openCallOutIdList.contains(list.id) ? Text(
lists.content!, list.content!,
style: TextStyle(color: Colors.white, fontSize: 14.sp), style: TextStyle(color: Colors.white, fontSize: 14.sp),
) : HideText(text: lists.content!,maxWidth: Get.currentRoute == Routes.Home ? Get.width - 90.sp : Get.width - 20.sp,additionText: '查看更多',maxLines: 5,style: TextStyle(color: Colors.white, fontSize: 14.sp),additionStyle: TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),onTap: () { ) : HideText(text: list.content!,maxWidth: Get.currentRoute == Routes.Home ? Get.width - 90.sp : Get.width - 20.sp,additionText: '查看更多',maxLines: 5,style: TextStyle(color: Colors.white, fontSize: 14.sp),additionStyle: TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),onTap: () {
widget.logic.openCallOutIdList.add(lists.id); widget.logic.openCallOutIdList.add(list.id);
setState(() { setState(() {
}); });
@ -1033,7 +1035,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
// List<JoinUser> urlList = bean.lastJoinUsers; // List<JoinUser> urlList = bean.lastJoinUsers;
List<Widget> widgets = []; List<Widget> widgets = [];
int index = 0; int index = 0;
for (var element in lists.chat!.users!) { for (var element in list.chat!.users!) {
widgets.add(Positioned( widgets.add(Positioned(
left: 12.sp * index, left: 12.sp * index,
child: circleWidget(element.avatar!,element.id.toString(), width: 24), child: circleWidget(element.avatar!,element.id.toString(), width: 24),
@ -1042,7 +1044,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
} }
if (widgets.isNotEmpty) { if (widgets.isNotEmpty) {
widgets.add(Positioned( widgets.add(Positioned(
left: 12.sp * lists.chat!.users!.length, left: 12.sp * list.chat!.users!.length,
child: Image.asset( child: Image.asset(
getCircleImage('more'), getCircleImage('more'),
width: 24.sp, width: 24.sp,
@ -1053,17 +1055,17 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
double ratio = 0; double ratio = 0;
if (lists.album != null) { if (list.album != null) {
if (lists.album!.isNotEmpty) { if (list.album!.isNotEmpty) {
Album info = lists.album!.first; Album info = list.album!.first;
if (info.type == 1) { if (info.type == 1) {
double picWidth = (widgetWidth - 8.sp)/3 + 45; double picWidth = (widgetWidth - 8.sp)/3 + 45;
ratio = (widgetWidth - 8.sp - 24.sp) / 3 / picWidth; ratio = (widgetWidth - 8.sp - 24.sp) / 3 / picWidth;
if (lists.album!.length > 3) { if (list.album!.length > 3) {
picHeight = picWidth * 2; picHeight = picWidth * 2;
} else { } else {
if (lists.album!.length == 1) { if (list.album!.length == 1) {
picHeight = 250; picHeight = 250;
} else { } else {
picHeight = picWidth; picHeight = picWidth;
@ -1078,8 +1080,8 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
Widget atWidget = Container(); Widget atWidget = Container();
List<Widget> atList = []; List<Widget> atList = [];
if (lists.at!.isNotEmpty) { if (list.at!.isNotEmpty) {
List infoList = jsonDecode(lists.at!); List infoList = jsonDecode(list.at!);
infoList.forEach((element) { infoList.forEach((element) {
atList.add(GestureDetector( atList.add(GestureDetector(
onTap: () { onTap: () {
@ -1145,7 +1147,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
), ),
child:Text( child:Text(
(lists.user!.city ?? '外星').length > 4 ? (lists.user!.city ?? '外星').substring(0,4) + '...' :(lists.user!.city ?? '外星'), (list.user!.city ?? '外星').length > 4 ? (list.user!.city ?? '外星').substring(0,4) + '...' :(list.user!.city ?? '外星'),
style: TextStyle(color: Colors.white, fontSize: 15.sp), style: TextStyle(color: Colors.white, fontSize: 15.sp),
), ),
) )
@ -1168,11 +1170,11 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
var sp = await SharedPreferencesHelper.getInstance(); var sp = await SharedPreferencesHelper.getInstance();
String myUserId = sp.getMyUserId(); String myUserId = sp.getMyUserId();
if(lists.user?.id!.toString() == myUserId){ if(list.user?.id!.toString() == myUserId){
Get.toNamed(Routes.UserInfoPage); Get.toNamed(Routes.UserInfoPage);
return; return;
} }
pushUserHome(lists.user!.id!.toString()); pushUserHome(list.user!.id!.toString(),lists.indexOf(list) >= chargeFreeNum);
}, },
child: Stack( child: Stack(
@ -1184,7 +1186,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
), ),
ClipOval( ClipOval(
child: CachedImg( child: CachedImg(
imageUrl:lists.user!.avatar_thumb!, imageUrl:list.user!.avatar_thumb!,
width: 40.sp, width: 40.sp,
height: 40.sp, height: 40.sp,
fit: BoxFit.cover, fit: BoxFit.cover,
@ -1202,7 +1204,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
Row( Row(
children: [ children: [
Text( Text(
lists.user!.nickname!, list.user!.nickname!,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 18.sp, fontSize: 18.sp,
@ -1211,7 +1213,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
SizedBox( SizedBox(
width: 8.sp, width: 8.sp,
), ),
UserTagWidget(lists.user!.mark!), UserTagWidget(list.user!.mark!),
], ],
), ),
SizedBox( SizedBox(
@ -1226,13 +1228,13 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
EdgeInsets.only(left: 6.sp, right: 6.sp), EdgeInsets.only(left: 6.sp, right: 6.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(9.sp), borderRadius: BorderRadius.circular(9.sp),
gradient: sexBgGradient(lists.user!.gender ?? 0,)), gradient: sexBgGradient(list.user!.gender ?? 0,)),
child: Text( child: Text(
getAgeCOntent(lists.user!.gender??0, lists.user!.age??0, getAgeCOntent(list.user!.gender??0, list.user!.age??0,
lists.user!.role??0, lists.user!.orientation??0), list.user!.role??0, list.user!.orientation??0),
// '${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}', // '${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}',
style: TextStyle( style: TextStyle(
color: sexBgColor(lists.user!.gender ?? 0,), color: sexBgColor(list.user!.gender ?? 0,),
fontSize: 12.sp, fontSize: 12.sp,
), ),
), ),
@ -1258,18 +1260,18 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
child: picHeight == 200.sp child: picHeight == 200.sp
? ClipRRect( ? ClipRRect(
borderRadius: BorderRadius.circular(6.sp), borderRadius: BorderRadius.circular(6.sp),
child: VideoItemWidget(lists.album![0].url!,lists.id!.toString(),lists.user!.id.toString())) child: VideoItemWidget(list.album![0].url!,list.id!.toString(),list.user!.id.toString()))
: picHeight == 250 ? GestureDetector( : picHeight == 250 ? GestureDetector(
onTap: () async { onTap: () async {
var imgList = <String>[]; var imgList = <String>[];
for (var element in lists.album!) { for (var element in list.album!) {
imgList.add(element.url!); imgList.add(element.url!);
} }
Map<String, String> params = {}; Map<String, String> params = {};
if (widget.bean.is_limit && widget.bean.amount > 0) { if (widget.bean.is_limit && widget.bean.amount > 0) {
await refreshCircleData(); await refreshCircleData();
} }
if (widget.bean.is_limit && widget.bean.amount > 0) { if (widget.bean.is_limit && widget.bean.amount > 0 && lists.indexOf(list) >= chargeFreeNum) {
params = {'source':widget.index == 0 ? 'callout_list_hot' : 'callout_list_new','bean':jsonEncode({'id':widget.bean.id.toString(),'amount':widget.bean.amount.toString(),'oldAmount':widget.bean.oldAmount.toString(),'iosItem':widget.bean.ios_item})}; params = {'source':widget.index == 0 ? 'callout_list_hot' : 'callout_list_new','bean':jsonEncode({'id':widget.bean.id.toString(),'amount':widget.bean.amount.toString(),'oldAmount':widget.bean.oldAmount.toString(),'iosItem':widget.bean.ios_item})};
// return; // return;
@ -1282,19 +1284,19 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
arguments: { arguments: {
'imaglist': imgList, 'imaglist': imgList,
'index': 0, 'index': 0,
'userId':lists.user?.id!.toString() 'userId':list.user?.id!.toString()
},parameters: params); },parameters: params);
}, },
child: ClipRRect( child: ClipRRect(
borderRadius: borderRadius:
BorderRadius.circular(6.sp), BorderRadius.circular(6.sp),
child: CachedImg( child: CachedImg(
imageUrl: lists.album!.first.url!, imageUrl: list.album!.first.url!,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
) : GridView.builder( ) : GridView.builder(
itemCount: lists.album!.length, itemCount: list.album!.length,
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
gridDelegate: gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount( SliverGridDelegateWithFixedCrossAxisCount(
@ -1304,18 +1306,18 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
childAspectRatio: ratio //1widget childAspectRatio: ratio //1widget
), ),
itemBuilder: (contentxt, currentIndex) { itemBuilder: (contentxt, currentIndex) {
Album album = lists.album![currentIndex]; Album album = list.album![currentIndex];
return GestureDetector( return GestureDetector(
onTap: () async { onTap: () async {
var imgList = <String>[]; var imgList = <String>[];
for (var element in lists.album!) { for (var element in list.album!) {
imgList.add(element.url!); imgList.add(element.url!);
} }
if (widget.bean.is_limit && widget.bean.amount > 0) { if (widget.bean.is_limit && widget.bean.amount > 0) {
await refreshCircleData(); await refreshCircleData();
} }
Map<String, String>? params; Map<String, String>? params;
if (widget.bean.is_limit && widget.bean.amount > 0) { if (widget.bean.is_limit && widget.bean.amount > 0 && lists.indexOf(list) >= chargeFreeNum) {
params = {'source':widget.index == 0 ? 'callout_list_hot' : 'callout_list_new','bean':jsonEncode({'id':widget.bean.id.toString(),'amount':widget.bean.amount.toString(),'oldAmount':widget.bean.oldAmount.toString(),'iosItem':widget.bean.ios_item})}; params = {'source':widget.index == 0 ? 'callout_list_hot' : 'callout_list_new','bean':jsonEncode({'id':widget.bean.id.toString(),'amount':widget.bean.amount.toString(),'oldAmount':widget.bean.oldAmount.toString(),'iosItem':widget.bean.ios_item})};
// return; // return;
@ -1328,7 +1330,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
arguments: { arguments: {
'imaglist': imgList, 'imaglist': imgList,
'index': currentIndex, 'index': currentIndex,
'userId':lists.user?.id!.toString() 'userId':list.user?.id!.toString()
},parameters: params); },parameters: params);
}, },
child: ClipRRect( child: ClipRRect(
@ -1346,7 +1348,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
InkWell( InkWell(
onTap: () { onTap: () {
Get.bottomSheet( Get.bottomSheet(
CallOutShareDialog('','',lists), isScrollControlled: true, CallOutShareDialog('','',list), isScrollControlled: true,
enableDrag: false enableDrag: false
); );
@ -1362,7 +1364,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
padding: EdgeInsets.only(left: 5.sp, right: 10.sp), padding: EdgeInsets.only(left: 2.sp, right: 2.sp),
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 5.sp), top: picHeight > 0 ? 5.sp : 5.sp, bottom: 5.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -1383,14 +1385,14 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
widgets.isNotEmpty widgets.isNotEmpty
? Expanded( ? Expanded(
child: Text( child: Text(
'${lists.chat!.count!}位圈友已私聊', '${list.chat!.count!}位圈友已私聊',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 13.sp), fontSize: 13.sp),
)) ))
: Expanded( : Expanded(
child: Text( child: Text(
'赶紧成为第一位私聊ta的人吧', '快成为第一位私聊ta的人',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 13.sp), fontSize: 13.sp),
@ -1398,7 +1400,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
GestureDetector( GestureDetector(
onTap: () { onTap: () {
pushMsgPage( pushMsgPage(
lists, list,
widget.bean.id.toString(), widget.bean.id.toString(),
); );
}, },
@ -1413,16 +1415,16 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
), ),
GestureDetector( GestureDetector(
onTapUp: (TapUpDetails details) { onTapUp: (TapUpDetails details) {
if (lists.isInteract! > 0) { if (list.isInteract! > 0) {
showOKToast('这个喊话已经点过了哦'); showOKToast('这个喊话已经点过了哦');
return; return;
} }
_showEmojiPicker(lists,lists.id!,context, details.globalPosition); _showEmojiPicker(list,list.id!,context, details.globalPosition);
}, },
child: Container( child: Container(
margin: EdgeInsets.only(left: 10.sp, bottom: (lists.topInteractType!['userCount'] ?? 0) > 0 ? 10.sp : 5.sp), margin: EdgeInsets.only(left: 10.sp, bottom: (list.topInteractType!['userCount'] ?? 0) > 0 ? 10.sp : 5.sp),
// height: 40.sp, // height: 40.sp,
alignment: Alignment.center, alignment: Alignment.center,
child: Stack( child: Stack(
@ -1432,15 +1434,15 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
height: 43.sp, height: 43.sp,
), ),
Text( Text(
lists.interactedTypeEmote ?? '', list.interactedTypeEmote ?? '',
style: style:
TextStyle(color: Colors.white, fontSize: 20.sp), TextStyle(color: Colors.white, fontSize: 20.sp),
), ),
if ((lists.topInteractType!['userCount'] ?? 0) > 0) if ((list.topInteractType!['userCount'] ?? 0) > 0)
Positioned( Positioned(
bottom: 0, bottom: 0,
child: Text( child: Text(
'${lists.topInteractType!['userCount']}', '${list.topInteractType!['userCount']}',
style: style:
TextStyle(color: Colors.white, fontSize: 10.sp), TextStyle(color: Colors.white, fontSize: 10.sp),
), ),
@ -1458,13 +1460,13 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
} }
/// ///
normalDynamicItem(Lists lists) { normalDynamicItem(Lists list) {
int type = (lists.topInteractType?['type'] ?? 1) - 1; int type = (list.topInteractType?['type'] ?? 1) - 1;
Widget descText = widget.logic.openCallOutIdList.contains(lists.id) ? Text( Widget descText = widget.logic.openCallOutIdList.contains(list.id) ? Text(
lists.content!, list.content!,
style: TextStyle(color: Colors.white, fontSize: 14.sp), style: TextStyle(color: Colors.white, fontSize: 14.sp),
) : HideText(text: lists.content!,maxWidth: Get.currentRoute == Routes.Home ? Get.width - 90.sp : Get.width - 20.sp,additionText: '查看更多',maxLines: 5,style: TextStyle(color: Colors.white, fontSize: 14.sp),additionStyle: TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),onTap: () { ) : HideText(text: list.content!,maxWidth: Get.currentRoute == Routes.Home ? Get.width - 90.sp : Get.width - 20.sp,additionText: '查看更多',maxLines: 5,style: TextStyle(color: Colors.white, fontSize: 14.sp),additionStyle: TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),onTap: () {
widget.logic.openCallOutIdList.add(lists.id); widget.logic.openCallOutIdList.add(list.id);
setState(() { setState(() {
}); });
@ -1474,16 +1476,16 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
double picHeight = 0.0; double picHeight = 0.0;
double ratio = 0.0; double ratio = 0.0;
double picWidth = (widgetWidth - 8.sp )/3 + 45; double picWidth = (widgetWidth - 8.sp )/3 + 45;
if (lists.album != null) { if (list.album != null) {
if (lists.album!.isNotEmpty) { if (list.album!.isNotEmpty) {
Album info = lists.album!.first; Album info = list.album!.first;
if (info.type == 1) { if (info.type == 1) {
ratio = (widgetWidth - 8.sp - 24.sp) / 3 / picWidth; ratio = (widgetWidth - 8.sp - 24.sp) / 3 / picWidth;
if (lists.album!.length > 3) { if (list.album!.length > 3) {
picHeight = picWidth * 2; picHeight = picWidth * 2;
} else { } else {
if (lists.album!.length == 1) { if (list.album!.length == 1) {
picHeight = 250; picHeight = 250;
} else { } else {
picHeight = picWidth; picHeight = picWidth;
@ -1497,7 +1499,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
List<Widget> widgets = []; List<Widget> widgets = [];
int index = 0; int index = 0;
lists.chat!.users!.forEach((element) { list.chat!.users!.forEach((element) {
widgets.add(Positioned( widgets.add(Positioned(
left: 12.sp * index, left: 12.sp * index,
child: circleWidget(element.avatar!,element.id.toString(), width: 24), child: circleWidget(element.avatar!,element.id.toString(), width: 24),
@ -1506,7 +1508,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
}); });
if (widgets.isNotEmpty) { if (widgets.isNotEmpty) {
widgets.add(Positioned( widgets.add(Positioned(
left: 12.sp * lists.chat!.users!.length, left: 12.sp * list.chat!.users!.length,
child: Image.asset( child: Image.asset(
getCircleImage('more'), getCircleImage('more'),
width: 24.sp, width: 24.sp,
@ -1516,8 +1518,8 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
Widget atWidget = Container(); Widget atWidget = Container();
List<Widget> atList = []; List<Widget> atList = [];
if (lists.at!.isNotEmpty) { if (list.at!.isNotEmpty) {
List infoList = jsonDecode(lists.at!); List infoList = jsonDecode(list.at!);
infoList.forEach((element) { infoList.forEach((element) {
atList.add(GestureDetector( atList.add(GestureDetector(
onTap: () { onTap: () {
@ -1578,7 +1580,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
borderRadius: BorderRadius.only(topLeft: Radius.circular(0),bottomRight: Radius.circular(0),topRight: Radius.circular(12.sp),bottomLeft: Radius.circular(12.sp) ) borderRadius: BorderRadius.only(topLeft: Radius.circular(0),bottomRight: Radius.circular(0),topRight: Radius.circular(12.sp),bottomLeft: Radius.circular(12.sp) )
), ),
child: Text( child: Text(
(lists.user!.city ?? '外星').length > 4 ? (lists.user!.city ?? '外星').substring(0,4) + '...' :(lists.user!.city ?? '外星'), (list.user!.city ?? '外星').length > 4 ? (list.user!.city ?? '外星').substring(0,4) + '...' :(list.user!.city ?? '外星'),
style: TextStyle(color: Colors.white, fontSize: 15.sp), style: TextStyle(color: Colors.white, fontSize: 15.sp),
), ),
) )
@ -1602,11 +1604,11 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
onTap: ()async { onTap: ()async {
var sp = await SharedPreferencesHelper.getInstance(); var sp = await SharedPreferencesHelper.getInstance();
String myUserId = sp.getMyUserId(); String myUserId = sp.getMyUserId();
if(lists.user?.id!.toString() == myUserId){ if(list.user?.id!.toString() == myUserId){
Get.toNamed(Routes.UserInfoPage); Get.toNamed(Routes.UserInfoPage);
return; return;
} }
pushUserHome(lists.user!.id!.toString()); pushUserHome(list.user!.id!.toString(),lists.indexOf(list) >= chargeFreeNum);
}, },
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
@ -1617,7 +1619,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
), ),
ClipOval( ClipOval(
child: CachedImg( child: CachedImg(
imageUrl:lists.user!.avatar_thumb!, imageUrl:list.user!.avatar_thumb!,
width: 40.sp, width: 40.sp,
height: 40.sp, height: 40.sp,
fit: BoxFit.cover, fit: BoxFit.cover,
@ -1637,7 +1639,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
Row( Row(
children: [ children: [
Text( Text(
lists.user!.nickname!, list.user!.nickname!,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 18.sp, fontSize: 18.sp,
@ -1646,7 +1648,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
SizedBox( SizedBox(
width: 8.sp, width: 8.sp,
), ),
UserTagWidget(lists.user!.mark!), UserTagWidget(list.user!.mark!),
], ],
), ),
SizedBox( SizedBox(
@ -1662,12 +1664,12 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius:
BorderRadius.circular(9.sp), BorderRadius.circular(9.sp),
gradient: sexBgGradient(lists.user!.gender ?? 0,)), gradient: sexBgGradient(list.user!.gender ?? 0,)),
child: Text( child: Text(
getAgeCOntent(lists.user!.gender??0, lists.user!.age??0, getAgeCOntent(list.user!.gender??0, list.user!.age??0,
lists.user!.role??0, lists.user!.orientation??0), list.user!.role??0, list.user!.orientation??0),
style: TextStyle( style: TextStyle(
color: sexBgColor(lists.user!.gender ?? 0,), color: sexBgColor(list.user!.gender ?? 0,),
fontSize: 12.sp, fontSize: 12.sp,
), ),
), ),
@ -1693,18 +1695,18 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
child: picHeight == 200.sp child: picHeight == 200.sp
? ClipRRect( ? ClipRRect(
borderRadius: BorderRadius.circular(6.sp), borderRadius: BorderRadius.circular(6.sp),
child: VideoItemWidget(lists.album![0].url!,lists.id!.toString(),lists.user!.id.toString())) child: VideoItemWidget(list.album![0].url!,list.id!.toString(),list.user!.id.toString()))
: picHeight == 250 ? GestureDetector( : picHeight == 250 ? GestureDetector(
onTap: () async { onTap: () async {
var imgList = <String>[]; var imgList = <String>[];
for (var element in lists.album!) { for (var element in list.album!) {
imgList.add(element.url!); imgList.add(element.url!);
} }
Map<String, String> params = {}; Map<String, String> params = {};
if (widget.bean.is_limit && widget.bean.amount > 0) { if (widget.bean.is_limit && widget.bean.amount > 0) {
await refreshCircleData(); await refreshCircleData();
} }
if (widget.bean.is_limit && widget.bean.amount > 0) { if (widget.bean.is_limit && widget.bean.amount > 0 && lists.indexOf(list) >= chargeFreeNum) {
params = {'source':widget.index == 0 ? 'callout_list_hot' : 'callout_list_new','bean':jsonEncode({'id':widget.bean.id.toString(),'amount':widget.bean.amount.toString(),'oldAmount':widget.bean.oldAmount.toString(),'iosItem':widget.bean.ios_item})}; params = {'source':widget.index == 0 ? 'callout_list_hot' : 'callout_list_new','bean':jsonEncode({'id':widget.bean.id.toString(),'amount':widget.bean.amount.toString(),'oldAmount':widget.bean.oldAmount.toString(),'iosItem':widget.bean.ios_item})};
// return; // return;
@ -1717,19 +1719,19 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
arguments: { arguments: {
'imaglist': imgList, 'imaglist': imgList,
'index': 0, 'index': 0,
'userId':lists.user?.id!.toString() 'userId':list.user?.id!.toString()
},parameters: params); },parameters: params);
}, },
child: ClipRRect( child: ClipRRect(
borderRadius: borderRadius:
BorderRadius.circular(6.sp), BorderRadius.circular(6.sp),
child: CachedImg( child: CachedImg(
imageUrl: lists.album!.first.url!, imageUrl: list.album!.first.url!,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
) : GridView.builder( ) : GridView.builder(
itemCount: lists.album!.length, itemCount: list.album!.length,
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
gridDelegate: gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount( SliverGridDelegateWithFixedCrossAxisCount(
@ -1739,18 +1741,18 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
childAspectRatio:ratio //1widget childAspectRatio:ratio //1widget
), ),
itemBuilder: (contentxt, currentIndex) { itemBuilder: (contentxt, currentIndex) {
Album album = lists.album![currentIndex]; Album album = list.album![currentIndex];
return GestureDetector( return GestureDetector(
onTap: () async { onTap: () async {
var imgList = <String>[]; var imgList = <String>[];
for (var element in lists.album!) { for (var element in list.album!) {
imgList.add(element.url!); imgList.add(element.url!);
} }
if (widget.bean.is_limit && widget.bean.amount > 0) { if (widget.bean.is_limit && widget.bean.amount > 0) {
await refreshCircleData(); await refreshCircleData();
} }
Map<String, String>? params; Map<String, String>? params;
if (widget.bean.is_limit && widget.bean.amount > 0) { if (widget.bean.is_limit && widget.bean.amount > 0 && lists.indexOf(list) >= chargeFreeNum) {
params = {'source':widget.index == 0 ? 'callout_list_hot' : 'callout_list_new','bean':jsonEncode({'id':widget.bean.id.toString(),'amount':widget.bean.amount.toString(),'oldAmount':widget.bean.oldAmount.toString(),'iosItem':widget.bean.ios_item})}; params = {'source':widget.index == 0 ? 'callout_list_hot' : 'callout_list_new','bean':jsonEncode({'id':widget.bean.id.toString(),'amount':widget.bean.amount.toString(),'oldAmount':widget.bean.oldAmount.toString(),'iosItem':widget.bean.ios_item})};
// return; // return;
@ -1763,7 +1765,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
arguments: { arguments: {
'imaglist': imgList, 'imaglist': imgList,
'index': currentIndex, 'index': currentIndex,
'userId':lists.user?.id!.toString() 'userId':list.user?.id!.toString()
},parameters: params); },parameters: params);
}, },
child: Container( child: Container(
@ -1784,7 +1786,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
InkWell( InkWell(
onTap: () { onTap: () {
Get.bottomSheet( Get.bottomSheet(
CallOutShareDialog('','',lists), isScrollControlled: true, CallOutShareDialog('','',list), isScrollControlled: true,
enableDrag: false enableDrag: false
); );
@ -1800,7 +1802,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
padding: EdgeInsets.only(left: 5.sp, right: 10.sp), padding: EdgeInsets.only(left: 2.sp, right: 2.sp),
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 5.sp), top: picHeight > 0 ? 5.sp : 5.sp, bottom: 5.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -1821,14 +1823,14 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
widgets.isNotEmpty widgets.isNotEmpty
? Expanded( ? Expanded(
child: Text( child: Text(
'${lists.chat!.count!}位圈友已私聊', '${list.chat!.count!}位圈友已私聊',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 13.sp), fontSize: 13.sp),
)) ))
: Expanded( : Expanded(
child: Text( child: Text(
'赶紧成为第一位私聊ta的人吧', '快成为第一位私聊ta的人',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 13.sp), fontSize: 13.sp),
@ -1836,7 +1838,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
GestureDetector( GestureDetector(
onTap: () { onTap: () {
pushMsgPage( pushMsgPage(
lists, list,
widget.bean.id.toString(), widget.bean.id.toString(),
); );
}, },
@ -1851,15 +1853,15 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
), ),
GestureDetector( GestureDetector(
onTapUp: (TapUpDetails details) { onTapUp: (TapUpDetails details) {
if (lists.isInteract! > 0) { if (list.isInteract! > 0) {
showOKToast('这个喊话已经点过了哦'); showOKToast('这个喊话已经点过了哦');
return; return;
} }
_showEmojiPicker(lists,lists.id!,context, details.globalPosition); _showEmojiPicker(list,list.id!,context, details.globalPosition);
}, },
child: Container( child: Container(
margin: EdgeInsets.only(left: 10.sp, bottom: (lists.topInteractType!['userCount'] ?? 0) > 0 ? 10.sp : 5.sp), margin: EdgeInsets.only(left: 10.sp, bottom: (list.topInteractType!['userCount'] ?? 0) > 0 ? 10.sp : 5.sp),
// height: 40.sp, // height: 40.sp,
alignment: Alignment.center, alignment: Alignment.center,
child: Stack( child: Stack(
@ -1869,15 +1871,15 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
height: 43.sp, height: 43.sp,
), ),
Text( Text(
lists.interactedTypeEmote ?? '', list.interactedTypeEmote ?? '',
style: style:
TextStyle(color: Colors.white, fontSize: 20.sp), TextStyle(color: Colors.white, fontSize: 20.sp),
), ),
if ((lists.topInteractType!['userCount'] ?? 0) > 0) if ((list.topInteractType!['userCount'] ?? 0) > 0)
Positioned( Positioned(
bottom: 0, bottom: 0,
child: Text( child: Text(
'${lists.topInteractType!['userCount']}', '${list.topInteractType!['userCount']}',
style: style:
TextStyle(color: Colors.white, fontSize: 10.sp), TextStyle(color: Colors.white, fontSize: 10.sp),
), ),
@ -2163,7 +2165,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
circleWidget(String url, String userId,{double width = 24}) { circleWidget(String url, String userId,{double width = 24}) {
return GestureDetector( return GestureDetector(
onTap: () async { onTap: () async {
pushUserHome(userId); pushUserHome(userId,false);
}, },
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,

View File

@ -1159,7 +1159,7 @@ class _LikeViewState extends State<LikeView>
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
padding: EdgeInsets.only(left: 5.sp, right: 10.sp), padding: EdgeInsets.only(left: 2.sp, right: 2.sp),
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 0.sp), top: picHeight > 0 ? 5.sp : 5.sp, bottom: 0.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -1187,7 +1187,7 @@ class _LikeViewState extends State<LikeView>
)) ))
: Expanded( : Expanded(
child: Text( child: Text(
'赶紧成为第一位私聊ta的人吧', '快成为第一位私聊ta的人',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 13.sp), fontSize: 13.sp),
@ -1561,7 +1561,7 @@ class _LikeViewState extends State<LikeView>
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
padding: EdgeInsets.only(left: 5.sp, right: 10.sp), padding: EdgeInsets.only(left: 2.sp, right: 2.sp),
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 0.sp), top: picHeight > 0 ? 5.sp : 5.sp, bottom: 0.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -1589,7 +1589,7 @@ class _LikeViewState extends State<LikeView>
)) ))
: Expanded( : Expanded(
child: Text( child: Text(
'赶紧成为第一位私聊ta的人吧', '快成为第一位私聊ta的人',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 13.sp), fontSize: 13.sp),

View File

@ -109,7 +109,7 @@ class _PlayVideoViewState extends State<PlayVideoView>
}); });
userList = [list]; userList = [list];
sendReadRequest();
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);
_pageController.addListener(_pageListener); _pageController.addListener(_pageListener);

View File

@ -389,7 +389,7 @@ class _VideoPlayerWidgetState extends State<VideoPlayerWidget> with RouteAware {
)) ))
: Expanded( : Expanded(
child: Text( child: Text(
'赶紧成为第一位私聊ta的圈友吧', '快成为第一位私聊ta的人',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 14.sp), fontSize: 14.sp),

View File

@ -1112,7 +1112,7 @@ class _AllCircleItemState extends State<AllCircleItem>
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
padding: EdgeInsets.only(left: 5.sp, right: 10.sp), padding: EdgeInsets.only(left: 2.sp, right: 2.sp),
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 10.sp), top: picHeight > 0 ? 5.sp : 5.sp, bottom: 10.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -1140,7 +1140,7 @@ class _AllCircleItemState extends State<AllCircleItem>
)) ))
: Expanded( : Expanded(
child: Text( child: Text(
'赶紧成为第一位私聊ta的人吧', '快成为第一位私聊ta的人',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 13.sp), fontSize: 13.sp),
@ -1609,7 +1609,7 @@ class _AllCircleItemState extends State<AllCircleItem>
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
padding: EdgeInsets.only(left: 5.sp, right: 10.sp), padding: EdgeInsets.only(left: 2.sp, right: 2.sp),
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 10.sp), top: picHeight > 0 ? 5.sp : 5.sp, bottom: 10.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -1637,7 +1637,7 @@ class _AllCircleItemState extends State<AllCircleItem>
)) ))
: Expanded( : Expanded(
child: Text( child: Text(
'赶紧成为第一位私聊ta的人吧', '快成为第一位私聊ta的人',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 13.sp), fontSize: 13.sp),

View File

@ -37,6 +37,8 @@ class _MoreVideoItemState extends State<MoreVideoItem> {
Get.to( Get.to(
PlayVideoView(bean.album!.first.url!, bean.id!.toString(), bean.user!.id!.toString(),bean.chat!.toJson(),bean.user!.imId!,bean.content!,bean.user! PlayVideoView(bean.album!.first.url!, bean.id!.toString(), bean.user!.id!.toString(),bean.chat!.toJson(),bean.user!.imId!,bean.content!,bean.user!
.avatar!,bean.user!.nickname!,bean.interest!.title!)); .avatar!,bean.user!.nickname!,bean.interest!.title!));
loadRecommandVideoData();
} }
}, },
child: Container( child: Container(
@ -75,7 +77,8 @@ class _MoreVideoItemState extends State<MoreVideoItem> {
void loadRecommandVideoData() async { void loadRecommandVideoData() async {
var data = await DioManager.getInstance() var data = await DioManager.getInstance()
.get(url: Api.queryNextVideoStorysByType, params: {'pageIndex':1,'curCalloutId':0});
.get(url: Api.queryNextVideoStorysByType, params: {'pageIndex':1,'curCalloutId':recommandVideoList.isNotEmpty ? recommandVideoList.first.id! : 0});
if (data['code'] == 200) { if (data['code'] == 200) {
recommandVideoList.clear(); recommandVideoList.clear();
List dataList = data['data']['lists']; List dataList = data['data']['lists'];

View File

@ -1522,7 +1522,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
super.dispose(); super.dispose();
} }
int chargeFreeNum = 0;
StreamSubscription? callRefreshCicle = null; StreamSubscription? callRefreshCicle = null;
StreamSubscription? cicleInfoRefresh = null; StreamSubscription? cicleInfoRefresh = null;
StreamSubscription? scroToTop = null; StreamSubscription? scroToTop = null;
@ -1634,6 +1634,8 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
refreshController.refreshCompleted(); refreshController.refreshCompleted();
if (data["code"] == 200) { if (data["code"] == 200) {
List dataList = data["data"]["lists"] ?? []; List dataList = data["data"]["lists"] ?? [];
// "total" -> 0"chargeType" -> 1
chargeFreeNum = data['data']['chargeFreeNum'] ?? 0;
if (callOutPage == 1) { if (callOutPage == 1) {
if (lists.isNotEmpty) { if (lists.isNotEmpty) {
lists.clear(); lists.clear();
@ -1651,6 +1653,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
// ID // ID
if (!existingIds.contains(newItem.id)) { if (!existingIds.contains(newItem.id)) {
lists.add(newItem); lists.add(newItem);
existingIds.add(newItem.id!); // ID existingIds.add(newItem.id!); // ID
} }
@ -1715,12 +1718,9 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
}); });
} }
void pushMsgPage(Lists bean, String cicleId) async { bool checkOpen(Lists bean, String cicleId) {
if (widget.bean.is_limit && widget.bean.amount > 0) {
await refreshCircleData();
}
if (widget.bean.is_limit && widget.bean.amount > 0) { if (widget.bean.is_limit && widget.bean.amount > 0 && (lists.indexOf(bean) >= chargeFreeNum)) {
showJoinCiclePiker(cicleId, widget.bean.amount.toString(), showJoinCiclePiker(cicleId, widget.bean.amount.toString(),
widget.bean.oldAmount.toString(), 2, (payResult) { widget.bean.oldAmount.toString(), 2, (payResult) {
widget.bean.is_limit = false; widget.bean.is_limit = false;
@ -1736,6 +1736,17 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
} }
Get.back(); Get.back();
}, widget.bean.ios_item); }, widget.bean.ios_item);
return false;
}
return true;
}
void pushMsgPage(Lists bean, String cicleId) async {
if (widget.bean.is_limit && widget.bean.amount > 0) {
await refreshCircleData();
}
if (!checkOpen(bean,cicleId)) {
return; return;
} }
@ -1800,7 +1811,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
child: circleWidget( child: circleWidget(
element.avatar! ?? element.avatar! ??
"https://qiniuyun.leyuan666.com/quanzi/avatar/default.png", "https://qiniuyun.leyuan666.com/quanzi/avatar/default.png",
element.id.toString()), element.id.toString(),widget.bean),
)); ));
i++; i++;
}); });
@ -1882,15 +1893,15 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
} }
/// ///
vipDynamicItem(Lists lists) { vipDynamicItem(Lists list) {
int type = (lists.topInteractType?['type'] ?? 1) - 1; int type = (list.topInteractType?['type'] ?? 1) - 1;
Widget descText = widget.logic.openCallOutIdList.contains(lists.id) Widget descText = widget.logic.openCallOutIdList.contains(list.id)
? Text( ? Text(
lists.content!, list.content!,
style: TextStyle(color: Colors.white, fontSize: 15.sp), style: TextStyle(color: Colors.white, fontSize: 15.sp),
) )
: HideText( : HideText(
text: lists.content!, text: list.content!,
maxWidth: Get.currentRoute == Routes.Home maxWidth: Get.currentRoute == Routes.Home
? Get.width - 90.sp ? Get.width - 90.sp
: Get.width - 20.sp, : Get.width - 20.sp,
@ -1900,7 +1911,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
additionStyle: additionStyle:
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 15.sp), TextStyle(color: const Color(0xFFFF4DF6), fontSize: 15.sp),
onTap: () { onTap: () {
widget.logic.openCallOutIdList.add(lists.id); widget.logic.openCallOutIdList.add(list.id);
setState(() {}); setState(() {});
}, },
); );
@ -1908,16 +1919,16 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
// List<JoinUser> urlList = bean.lastJoinUsers; // List<JoinUser> urlList = bean.lastJoinUsers;
List<Widget> widgets = []; List<Widget> widgets = [];
int index = 0; int index = 0;
for (var element in lists.chat!.users!) { for (var element in list.chat!.users!) {
widgets.add(Positioned( widgets.add(Positioned(
left: 12.sp * index, left: 12.sp * index,
child: circleWidget(element.avatar!, element.id.toString(), width: 24), child: circleWidget(element.avatar!, element.id.toString(),list, width: 24),
)); ));
index++; index++;
} }
if (widgets.isNotEmpty) { if (widgets.isNotEmpty) {
widgets.add(Positioned( widgets.add(Positioned(
left: 12.sp * lists.chat!.users!.length, left: 12.sp * list.chat!.users!.length,
child: Image.asset( child: Image.asset(
getCircleImage('more'), getCircleImage('more'),
width: 24.sp, width: 24.sp,
@ -1926,9 +1937,9 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
double picHeight = 0.0; double picHeight = 0.0;
if (lists.album != null) { if (list.album != null) {
if (lists.album!.isNotEmpty) { if (list.album!.isNotEmpty) {
Album info = lists.album!.first; Album info = list.album!.first;
if (info.type == 1) { if (info.type == 1) {
double picWidth = (Get.width - double picWidth = (Get.width -
@ -1937,10 +1948,10 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
: 60.sp)) / : 60.sp)) /
3 + 3 +
45; 45;
if (lists.album!.length > 3) { if (list.album!.length > 3) {
picHeight = picWidth * 2; picHeight = picWidth * 2;
} else { } else {
if (lists.album!.length == 1) { if (list.album!.length == 1) {
picHeight = 250; picHeight = 250;
} else { } else {
picHeight = picWidth; picHeight = picWidth;
@ -1955,8 +1966,8 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
Widget atWidget = Container(); Widget atWidget = Container();
List<Widget> atList = []; List<Widget> atList = [];
if (lists.at!.isNotEmpty) { if (list.at!.isNotEmpty) {
List infoList = jsonDecode(lists.at!); List infoList = jsonDecode(list.at!);
infoList.forEach((element) { infoList.forEach((element) {
atList.add(GestureDetector( atList.add(GestureDetector(
onTap: () { onTap: () {
@ -2022,9 +2033,9 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
topRight: Radius.circular(12.sp), topRight: Radius.circular(12.sp),
bottomLeft: Radius.circular(12.sp))), bottomLeft: Radius.circular(12.sp))),
child: Text( child: Text(
(lists.user!.city ?? '外星').length > 4 (list.user!.city ?? '外星').length > 4
? (lists.user!.city ?? '外星').substring(0, 4) + '...' ? (list.user!.city ?? '外星').substring(0, 4) + '...'
: (lists.user!.city ?? '外星'), : (list.user!.city ?? '外星'),
style: TextStyle(color: Colors.white, fontSize: 14.sp), style: TextStyle(color: Colors.white, fontSize: 14.sp),
), ),
) )
@ -2049,11 +2060,11 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
await SharedPreferencesHelper.getInstance(); await SharedPreferencesHelper.getInstance();
String myUserId = sp.getMyUserId(); String myUserId = sp.getMyUserId();
if (lists.user?.id!.toString() == myUserId) { if (list.user?.id!.toString() == myUserId) {
Get.toNamed(Routes.UserInfoPage); Get.toNamed(Routes.UserInfoPage);
return; return;
} }
pushUserHome(lists.user!.id!.toString()); pushUserHome(list.user!.id!.toString(),list);
}, },
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
@ -2095,13 +2106,13 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(30.sp), borderRadius: BorderRadius.circular(30.sp),
child: Image.network( child: Image.network(
lists.user!.avatar_thumb!, list.user!.avatar_thumb!,
width: 40.sp, width: 40.sp,
height: 40.sp, height: 40.sp,
fit: BoxFit.cover), fit: BoxFit.cover),
), ),
), ),
if ((lists.user!.onlineFlag ?? '').isNotEmpty) if ((list.user!.onlineFlag ?? '').isNotEmpty)
Positioned( Positioned(
bottom: 0, bottom: 0,
child: Container( child: Container(
@ -2120,7 +2131,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
), ),
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
lists.user!.onlineFlag ?? '', list.user!.onlineFlag ?? '',
style: TextStyle( style: TextStyle(
color: const Color.fromRGBO( color: const Color.fromRGBO(
247, 250, 250, 1.0), 247, 250, 250, 1.0),
@ -2139,7 +2150,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
Row( Row(
children: [ children: [
Text( Text(
lists.user!.nickname!, list.user!.nickname!,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 18.sp, fontSize: 18.sp,
@ -2148,7 +2159,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
SizedBox( SizedBox(
width: 8.sp, width: 8.sp,
), ),
UserTagWidget(lists.user!.mark!), UserTagWidget(list.user!.mark!),
], ],
), ),
SizedBox( SizedBox(
@ -2164,18 +2175,18 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(9.sp), borderRadius: BorderRadius.circular(9.sp),
gradient: sexBgGradient( gradient: sexBgGradient(
lists.user!.gender ?? 0, list.user!.gender ?? 0,
)), )),
child: Text( child: Text(
getAgeCOntent( getAgeCOntent(
lists.user!.gender ?? 0, list.user!.gender ?? 0,
lists.user!.age ?? 0, list.user!.age ?? 0,
lists.user!.role ?? 0, list.user!.role ?? 0,
lists.user!.orientation ?? 0), list.user!.orientation ?? 0),
// '${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}', // '${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}',
style: TextStyle( style: TextStyle(
color: sexBgColor( color: sexBgColor(
lists.user!.gender ?? 0, list.user!.gender ?? 0,
), ),
fontSize: 12.sp, fontSize: 12.sp,
), ),
@ -2203,14 +2214,14 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
? ClipRRect( ? ClipRRect(
borderRadius: BorderRadius.circular(6.sp), borderRadius: BorderRadius.circular(6.sp),
child: VideoItemWidget( child: VideoItemWidget(
lists.album![0].url!, list.album![0].url!,
lists.id!.toString(), list.id!.toString(),
lists.user!.id.toString())) list.user!.id.toString()))
: picHeight == 250 : picHeight == 250
? GestureDetector( ? GestureDetector(
onTap: () async { onTap: () async {
var imgList = <String>[]; var imgList = <String>[];
for (var element in lists.album!) { for (var element in list.album!) {
imgList.add(element.url!); imgList.add(element.url!);
} }
Map<String, String> params = {}; Map<String, String> params = {};
@ -2219,7 +2230,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
await refreshCircleData(); await refreshCircleData();
} }
if (widget.bean.is_limit && if (widget.bean.is_limit &&
widget.bean.amount > 0) { widget.bean.amount > 0 && lists.indexOf(list) >= chargeFreeNum) {
params = { params = {
'source': widget.index == 0 'source': widget.index == 0
? 'callout_list_hot' ? 'callout_list_hot'
@ -2246,21 +2257,21 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
arguments: { arguments: {
'imaglist': imgList, 'imaglist': imgList,
'index': 0, 'index': 0,
'userId': lists.user?.id!.toString() 'userId': list.user?.id!.toString()
}, },
parameters: params); parameters: params);
}, },
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(6.sp), borderRadius: BorderRadius.circular(6.sp),
child: CachedImg( child: CachedImg(
imageUrl: lists.album!.first.url!, imageUrl: list.album!.first.url!,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
) )
: GridView.builder( : GridView.builder(
controller: GridScrollController, controller: GridScrollController,
itemCount: lists.album!.length, itemCount: list.album!.length,
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
gridDelegate: gridDelegate:
@ -2271,7 +2282,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
childAspectRatio: 0.6 //1widget childAspectRatio: 0.6 //1widget
), ),
itemBuilder: (contentxt, currentIndex) { itemBuilder: (contentxt, currentIndex) {
Album album = lists.album![currentIndex]; Album album = list.album![currentIndex];
return GestureDetector( return GestureDetector(
onTap: () async { onTap: () async {
if (widget.bean.is_limit && if (widget.bean.is_limit &&
@ -2280,12 +2291,12 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
} }
var imgList = <String>[]; var imgList = <String>[];
for (var element in lists.album!) { for (var element in list.album!) {
imgList.add(element.url!); imgList.add(element.url!);
} }
Map<String, String> params = {}; Map<String, String> params = {};
if (widget.bean.is_limit && if (widget.bean.is_limit &&
widget.bean.amount > 0) { widget.bean.amount > 0 && lists.indexOf(list) >= chargeFreeNum) {
params = { params = {
'source': widget.index == 0 'source': widget.index == 0
? 'callout_list_hot' ? 'callout_list_hot'
@ -2313,7 +2324,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
arguments: { arguments: {
'imaglist': imgList, 'imaglist': imgList,
'index': currentIndex, 'index': currentIndex,
'userId': lists.user?.id!.toString() 'userId': list.user?.id!.toString()
}, },
parameters: params); parameters: params);
}, },
@ -2333,7 +2344,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
InkWell( InkWell(
onTap: () { onTap: () {
Get.bottomSheet( Get.bottomSheet(
CallOutShareDialog('','',lists), isScrollControlled: true, CallOutShareDialog('','',list), isScrollControlled: true,
enableDrag: false enableDrag: false
); );
@ -2349,7 +2360,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
padding: EdgeInsets.only(left: 5.sp, right: 10.sp), padding: EdgeInsets.only(left: 2.sp, right: 2.sp),
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 5.sp), top: picHeight > 0 ? 5.sp : 5.sp, bottom: 5.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -2370,14 +2381,14 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
widgets.isNotEmpty widgets.isNotEmpty
? Expanded( ? Expanded(
child: Text( child: Text(
'${lists.chat!.count!}位圈友已私聊', '${list.chat!.count!}位圈友已私聊',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 14.sp), fontSize: 14.sp),
)) ))
: Expanded( : Expanded(
child: Text( child: Text(
'赶紧成为第一位私聊ta的人吧', '快成为第一位私聊ta的人',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 14.sp), fontSize: 14.sp),
@ -2385,7 +2396,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
GestureDetector( GestureDetector(
onTap: () { onTap: () {
pushMsgPage( pushMsgPage(
lists, list,
widget.bean.id.toString(), widget.bean.id.toString(),
); );
}, },
@ -2400,19 +2411,19 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
), ),
GestureDetector( GestureDetector(
onTapUp: (TapUpDetails details) { onTapUp: (TapUpDetails details) {
if (lists.isInteract! > 0) { if (list.isInteract! > 0) {
showOKToast('这个喊话已经点过了哦'); showOKToast('这个喊话已经点过了哦');
return; return;
} }
_showEmojiPicker( _showEmojiPicker(
lists, lists.id!, context, details.globalPosition); list, list.id!, context, details.globalPosition);
}, },
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 10.sp, left: 10.sp,
bottom: bottom:
(lists.topInteractType!['userCount'] ?? 0) > 0 (list.topInteractType!['userCount'] ?? 0) > 0
? 10.sp ? 10.sp
: 5.sp), : 5.sp),
// height: 40.sp, // height: 40.sp,
@ -2424,15 +2435,15 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
height: 43.sp, height: 43.sp,
), ),
Text( Text(
lists.interactedTypeEmote ?? '❤️', list.interactedTypeEmote ?? '❤️',
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 20.sp), color: Colors.white, fontSize: 20.sp),
), ),
if ((lists.topInteractType!['userCount'] ?? 0) > 0) if ((list.topInteractType!['userCount'] ?? 0) > 0)
Positioned( Positioned(
bottom: 0, bottom: 0,
child: Text( child: Text(
'${lists.topInteractType!['userCount']}', '${list.topInteractType!['userCount']}',
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 10.sp), color: Colors.white, fontSize: 10.sp),
), ),
@ -2450,16 +2461,16 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
} }
/// ///
normalDynamicItem(Lists lists) { normalDynamicItem(Lists list) {
int type = (lists.topInteractType?['type'] ?? 1) - 1; int type = (list.topInteractType?['type'] ?? 1) - 1;
Widget descText = widget.logic.openCallOutIdList.contains(lists.id) Widget descText = widget.logic.openCallOutIdList.contains(list.id)
? Text( ? Text(
lists.content!, list.content!,
style: TextStyle(color: Colors.white, fontSize: 15.sp), style: TextStyle(color: Colors.white, fontSize: 15.sp),
) )
: HideText( : HideText(
text: lists.content!, text: list.content!,
maxWidth: Get.currentRoute == Routes.Home maxWidth: Get.currentRoute == Routes.Home
? Get.width - 90.sp ? Get.width - 90.sp
: Get.width - 20.sp, : Get.width - 20.sp,
@ -2469,7 +2480,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
additionStyle: additionStyle:
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 15.sp), TextStyle(color: const Color(0xFFFF4DF6), fontSize: 15.sp),
onTap: () { onTap: () {
widget.logic.openCallOutIdList.add(lists.id); widget.logic.openCallOutIdList.add(list.id);
setState(() {}); setState(() {});
}, },
); );
@ -2480,18 +2491,18 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
(Get.width - (widget.logic.runtimeType == LikeLogic ? 100.sp : 60.sp)) / (Get.width - (widget.logic.runtimeType == LikeLogic ? 100.sp : 60.sp)) /
3 + 3 +
45; 45;
if (lists.album != null) { if (list.album != null) {
if (lists.album!.isNotEmpty) { if (list.album!.isNotEmpty) {
Album info = lists.album!.first; Album info = list.album!.first;
ratio = ((Get.width - ratio = ((Get.width -
(widget.logic.runtimeType == LikeLogic ? 100.sp : 60.sp)) / (widget.logic.runtimeType == LikeLogic ? 100.sp : 60.sp)) /
3) / 3) /
picWidth; picWidth;
if (info.type == 1) { if (info.type == 1) {
if (lists.album!.length > 3) { if (list.album!.length > 3) {
picHeight = picWidth * 2; picHeight = picWidth * 2;
} else { } else {
if (lists.album!.length == 1) { if (list.album!.length == 1) {
picHeight = 250; picHeight = 250;
} else { } else {
picHeight = picWidth; picHeight = picWidth;
@ -2505,16 +2516,16 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
List<Widget> widgets = []; List<Widget> widgets = [];
int index = 0; int index = 0;
lists.chat!.users!.forEach((element) { list.chat!.users!.forEach((element) {
widgets.add(Positioned( widgets.add(Positioned(
left: 12.sp * index, left: 12.sp * index,
child: circleWidget(element.avatar!, element.id.toString(), width: 24), child: circleWidget(element.avatar!, element.id.toString(),list, width: 24),
)); ));
index++; index++;
}); });
if (widgets.isNotEmpty) { if (widgets.isNotEmpty) {
widgets.add(Positioned( widgets.add(Positioned(
left: 12.sp * lists.chat!.users!.length, left: 12.sp * list.chat!.users!.length,
child: Image.asset( child: Image.asset(
getCircleImage('more'), getCircleImage('more'),
width: 24.sp, width: 24.sp,
@ -2524,8 +2535,8 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
Widget atWidget = Container(); Widget atWidget = Container();
List<Widget> atList = []; List<Widget> atList = [];
if (lists.at!.isNotEmpty) { if (list.at!.isNotEmpty) {
List infoList = jsonDecode(lists.at!); List infoList = jsonDecode(list.at!);
infoList.forEach((element) { infoList.forEach((element) {
atList.add(GestureDetector( atList.add(GestureDetector(
onTap: () { onTap: () {
@ -2588,9 +2599,9 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
topRight: Radius.circular(12.sp), topRight: Radius.circular(12.sp),
bottomLeft: Radius.circular(12.sp))), bottomLeft: Radius.circular(12.sp))),
child: Text( child: Text(
(lists.user!.city ?? '外星').length > 4 (list.user!.city ?? '外星').length > 4
? (lists.user!.city ?? '外星').substring(0, 4) + '...' ? (list.user!.city ?? '外星').substring(0, 4) + '...'
: (lists.user!.city ?? '外星'), : (list.user!.city ?? '外星'),
style: TextStyle(color: Colors.white, fontSize: 14.sp), style: TextStyle(color: Colors.white, fontSize: 14.sp),
), ),
) )
@ -2613,7 +2624,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
var sp = var sp =
await SharedPreferencesHelper.getInstance(); await SharedPreferencesHelper.getInstance();
String myUserId = sp.getMyUserId(); String myUserId = sp.getMyUserId();
if (lists.user?.id!.toString() == myUserId) { if (list.user?.id!.toString() == myUserId) {
Get.toNamed(Routes.UserInfoPage); Get.toNamed(Routes.UserInfoPage);
return; return;
} }
@ -2621,7 +2632,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
widget.bean.amount > 0) { widget.bean.amount > 0) {
await refreshCircleData(); await refreshCircleData();
} }
pushUserHome(lists.user!.id!.toString()!); pushUserHome(list.user!.id!.toString()!,list);
// if (widget.bean.is_limit && // if (widget.bean.is_limit &&
// widget.bean.amount > 0) { // widget.bean.amount > 0) {
// showJoinCiclePiker( // showJoinCiclePiker(
@ -2674,13 +2685,13 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(30.sp), borderRadius: BorderRadius.circular(30.sp),
child: Image.network( child: Image.network(
lists.user!.avatar_thumb!, list.user!.avatar_thumb!,
width: 40.sp, width: 40.sp,
height: 40.sp, height: 40.sp,
fit: BoxFit.cover), fit: BoxFit.cover),
), ),
), ),
if ((lists.user!.onlineFlag ?? '').isNotEmpty) if ((list.user!.onlineFlag ?? '').isNotEmpty)
Positioned( Positioned(
bottom: 0, bottom: 0,
child: Container( child: Container(
@ -2699,7 +2710,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
), ),
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
lists.user!.onlineFlag ?? '', list.user!.onlineFlag ?? '',
style: TextStyle( style: TextStyle(
color: const Color.fromRGBO( color: const Color.fromRGBO(
247, 250, 250, 1.0), 247, 250, 250, 1.0),
@ -2718,7 +2729,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
Row( Row(
children: [ children: [
Text( Text(
lists.user!.nickname!, list.user!.nickname!,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 18.sp, fontSize: 18.sp,
@ -2727,7 +2738,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
SizedBox( SizedBox(
width: 8.sp, width: 8.sp,
), ),
UserTagWidget(lists.user!.mark!), UserTagWidget(list.user!.mark!),
], ],
), ),
SizedBox( SizedBox(
@ -2744,17 +2755,17 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
borderRadius: borderRadius:
BorderRadius.circular(9.sp), BorderRadius.circular(9.sp),
gradient: sexBgGradient( gradient: sexBgGradient(
lists.user!.gender ?? 0, list.user!.gender ?? 0,
)), )),
child: Text( child: Text(
getAgeCOntent( getAgeCOntent(
lists.user!.gender ?? 0, list.user!.gender ?? 0,
lists.user!.age ?? 0, list.user!.age ?? 0,
lists.user!.role ?? 0, list.user!.role ?? 0,
lists.user!.orientation ?? 0), list.user!.orientation ?? 0),
style: TextStyle( style: TextStyle(
color: sexBgColor( color: sexBgColor(
lists.user!.gender ?? 0, list.user!.gender ?? 0,
), ),
fontSize: 12.sp, fontSize: 12.sp,
), ),
@ -2783,14 +2794,14 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
? ClipRRect( ? ClipRRect(
borderRadius: BorderRadius.circular(6.sp), borderRadius: BorderRadius.circular(6.sp),
child: VideoItemWidget( child: VideoItemWidget(
lists.album![0].url!, list.album![0].url!,
lists.id!.toString(), list.id!.toString(),
lists.user!.id.toString())) list.user!.id.toString()))
: picHeight == 250 : picHeight == 250
? GestureDetector( ? GestureDetector(
onTap: () async { onTap: () async {
var imgList = <String>[]; var imgList = <String>[];
for (var element in lists.album!) { for (var element in list.album!) {
imgList.add(element.url!); imgList.add(element.url!);
} }
Map<String, String> params = {}; Map<String, String> params = {};
@ -2799,7 +2810,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
await refreshCircleData(); await refreshCircleData();
} }
if (widget.bean.is_limit && if (widget.bean.is_limit &&
widget.bean.amount > 0) { widget.bean.amount > 0 && lists.indexOf(list) >= chargeFreeNum) {
params = { params = {
'source': widget.index == 0 'source': widget.index == 0
? 'callout_list_hot' ? 'callout_list_hot'
@ -2828,7 +2839,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
'imaglist': imgList, 'imaglist': imgList,
'index': 0, 'index': 0,
'userId': 'userId':
lists.user?.id!.toString() list.user?.id!.toString()
}, },
parameters: params); parameters: params);
}, },
@ -2836,14 +2847,14 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
borderRadius: borderRadius:
BorderRadius.circular(6.sp), BorderRadius.circular(6.sp),
child: CachedImg( child: CachedImg(
imageUrl: lists.album!.first.url!, imageUrl: list.album!.first.url!,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
) )
: GridView.builder( : GridView.builder(
controller: GridScrollController, controller: GridScrollController,
itemCount: lists.album!.length, itemCount: list.album!.length,
physics: physics:
const NeverScrollableScrollPhysics(), const NeverScrollableScrollPhysics(),
gridDelegate: gridDelegate:
@ -2856,11 +2867,11 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
), ),
itemBuilder: (contentxt, currentIndex) { itemBuilder: (contentxt, currentIndex) {
Album album = Album album =
lists.album![currentIndex]; list.album![currentIndex];
return GestureDetector( return GestureDetector(
onTap: () async { onTap: () async {
var imgList = <String>[]; var imgList = <String>[];
for (var element in lists.album!) { for (var element in list.album!) {
imgList.add(element.url!); imgList.add(element.url!);
} }
Map<String, String> params = {}; Map<String, String> params = {};
@ -2901,7 +2912,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
'imaglist': imgList, 'imaglist': imgList,
'index': currentIndex, 'index': currentIndex,
'userId': 'userId':
lists.user?.id!.toString() list.user?.id!.toString()
}, },
parameters: params); parameters: params);
}, },
@ -2921,7 +2932,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
InkWell( InkWell(
onTap: () { onTap: () {
Get.bottomSheet( Get.bottomSheet(
CallOutShareDialog('','',lists), isScrollControlled: true, CallOutShareDialog('','',list), isScrollControlled: true,
enableDrag: false enableDrag: false
); );
@ -2937,7 +2948,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
padding: EdgeInsets.only(left: 5.sp, right: 10.sp), padding: EdgeInsets.only(left: 2.sp, right: 2.sp),
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 5.sp), top: picHeight > 0 ? 5.sp : 5.sp, bottom: 5.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -2958,14 +2969,14 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
widgets.isNotEmpty widgets.isNotEmpty
? Expanded( ? Expanded(
child: Text( child: Text(
'${lists.chat!.count!}位圈友已私聊', '${list.chat!.count!}位圈友已私聊',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 13.sp), fontSize: 13.sp),
)) ))
: Expanded( : Expanded(
child: Text( child: Text(
'赶紧成为第一位私聊ta的人吧', '快成为第一位私聊ta的人',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 13.sp), fontSize: 13.sp),
@ -2973,7 +2984,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
GestureDetector( GestureDetector(
onTap: () { onTap: () {
pushMsgPage( pushMsgPage(
lists, list,
widget.bean.id.toString(), widget.bean.id.toString(),
); );
}, },
@ -2988,19 +2999,19 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
), ),
GestureDetector( GestureDetector(
onTapUp: (TapUpDetails details) { onTapUp: (TapUpDetails details) {
if (lists.isInteract! > 0) { if (list.isInteract! > 0) {
showOKToast('这个喊话已经点过了哦'); showOKToast('这个喊话已经点过了哦');
return; return;
} }
_showEmojiPicker(lists, lists.id!, context, _showEmojiPicker(list, list.id!, context,
details.globalPosition); details.globalPosition);
}, },
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 10.sp, left: 10.sp,
bottom: bottom:
(lists.topInteractType!['userCount'] ?? 0) > 0 (list.topInteractType!['userCount'] ?? 0) > 0
? 10.sp ? 10.sp
: 5.sp), : 5.sp),
// height: 40.sp, // height: 40.sp,
@ -3012,16 +3023,16 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
height: 43.sp, height: 43.sp,
), ),
Text( Text(
lists.interactedTypeEmote ?? '❤️', list.interactedTypeEmote ?? '❤️',
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 20.sp), color: Colors.white, fontSize: 20.sp),
), ),
if ((lists.topInteractType!['userCount'] ?? 0) > if ((list.topInteractType!['userCount'] ?? 0) >
0) 0)
Positioned( Positioned(
bottom: 0, bottom: 0,
child: Text( child: Text(
'${lists.topInteractType!['userCount']}', '${list.topInteractType!['userCount']}',
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 10.sp), color: Colors.white, fontSize: 10.sp),
), ),
@ -3293,11 +3304,11 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
_overlayEntry = null; _overlayEntry = null;
} }
pushUserHome(String userId) async { pushUserHome(String userId,Lists list) async {
if (widget.bean.is_limit && widget.bean.amount > 0) { if (widget.bean.is_limit && widget.bean.amount > 0) {
await refreshCircleData(); await refreshCircleData();
} }
if (widget.bean.is_limit && widget.bean.amount > 0) { if (widget.bean.is_limit && widget.bean.amount > 0 && lists.indexOf(list) >= chargeFreeNum) {
Get.toNamed(Routes.UserInfoPage, arguments: userId, parameters: { Get.toNamed(Routes.UserInfoPage, arguments: userId, parameters: {
'source': widget.index == 0 ? 'callout_list_hot' : 'callout_list_new', 'source': widget.index == 0 ? 'callout_list_hot' : 'callout_list_new',
'bean': jsonEncode({ 'bean': jsonEncode({
@ -3316,10 +3327,10 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
} }
} }
circleWidget(String url, String userId, {double width = 24}) { circleWidget(String url, String userId,list, {double width = 24}) {
return GestureDetector( return GestureDetector(
onTap: () async { onTap: () async {
pushUserHome(userId); pushUserHome(userId,list);
}, },
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,

View File

@ -20,6 +20,7 @@ import 'package:connectivity/connectivity.dart';
import 'package:event_bus/event_bus.dart'; import 'package:event_bus/event_bus.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_bugly/flutter_bugly.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart'; import 'package:flutter_native_splash/flutter_native_splash.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -642,6 +643,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
loginIM( loginIM(
data['data']['account_id'].toString(), data['data']['user_sig']); data['data']['account_id'].toString(), data['data']['user_sig']);
accountId = data['data']['account_id'].toString(); accountId = data['data']['account_id'].toString();
await FlutterBugly.setUserId(accountId);
} else { } else {
if (Get.currentRoute != Routes.Login && data['code'] >= 500 && count < 5) { if (Get.currentRoute != Routes.Login && data['code'] >= 500 && count < 5) {
getIMData(count: count++); getIMData(count: count++);
@ -757,7 +759,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
} }
} }
loadMyInfoData() async { Future loadMyInfoData() async {
var data = await DioManager.instance.get(url: Api.getUserMine,params: {'1':1}); var data = await DioManager.instance.get(url: Api.getUserMine,params: {'1':1});
var bean = BaseResponse<MineResponseBean>.fromJson( var bean = BaseResponse<MineResponseBean>.fromJson(
data, (data) => MineResponseBean.fromJson(data)); data, (data) => MineResponseBean.fromJson(data));
@ -790,6 +792,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
// update(); // update();
// } // }
} }
return true;
} }
bool isDifferenceGreaterThan30Days(String dateString) { bool isDifferenceGreaterThan30Days(String dateString) {

View File

@ -463,8 +463,9 @@ class _ShareState extends State<Share> {
String filePath = ''; String filePath = '';
if (byteData != null) { if (byteData != null) {
Uint8List pngBytes = byteData!.buffer.asUint8List(); Uint8List pngBytes = byteData!.buffer.asUint8List();
Directory directory = await getApplicationDocumentsDirectory(); Directory? directory = await getExternalStorageDirectory();
filePath = '${directory.path}/widget_image.png'; String fileName = 'widget_image_${DateTime.now().millisecondsSinceEpoch}.png';
filePath = '${directory!.path}/$fileName';
File imageFile = File(filePath); File imageFile = File(filePath);
imageFile.writeAsBytesSync(pngBytes); imageFile.writeAsBytesSync(pngBytes);
} }

View File

@ -525,7 +525,7 @@ class _LikelistPageState extends State<LikelistPage> with RouteAware {
showOKToast('已为你增加10倍曝光啦'); showOKToast('已为你增加10倍曝光啦');
} else { } else {
showOKToast('开通年VIP可以增加10倍曝光哦'); showOKToast('开通年VIP可以增加10倍曝光哦');
await showOepnVipDialog('ten_push'); await showOepnVipDialog('ten_push',isYear:true);
logic.loadMyInfo(); logic.loadMyInfo();
} }
} }

View File

@ -47,9 +47,9 @@ class LoginLogic extends GetxController {
// TODO: implement onInit // TODO: implement onInit
super.onInit(); super.onInit();
if (!kDebugMode) { // if (!kDebugMode) {
checkNetworkUrl(); // checkNetworkUrl();
} // }
SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
loginPhone = loginPhone =
await sharedPreferences.getString(SharedPreferencesHelper.LOGINPHONE) ?? await sharedPreferences.getString(SharedPreferencesHelper.LOGINPHONE) ??

View File

@ -278,7 +278,7 @@ class MinefragmentLogic extends GetxController {
} }
} }
getMode() async { Future getMode() async {
var data = var data =
await DioManager.instance.get(url: Api.getUserMine, params: {'2': 2}); await DioManager.instance.get(url: Api.getUserMine, params: {'2': 2});
var bean = BaseResponse<MineResponseBean>.fromJson( var bean = BaseResponse<MineResponseBean>.fromJson(

View File

@ -78,6 +78,7 @@ class MsgLogic extends GetxController {
var bean = BaseResponse<UserList>.fromJson( var bean = BaseResponse<UserList>.fromJson(
data, (data) => UserList.fromJson(data)); data, (data) => UserList.fromJson(data));
if (bean.isSuccess()) { if (bean.isSuccess()) {
lists.clear();
lists.addAll(bean.data.lists); lists.addAll(bean.data.lists);
} }
if (isFresh) { if (isFresh) {

View File

@ -400,7 +400,7 @@ class _SwiperPageState extends State<SwiperPage> {
RenderRepaintBoundary boundary = RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary; _globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = ui.Image image =
await boundary.toImage(pixelRatio: 1.0); await boundary.toImage(pixelRatio: 3.0);
ByteData? byteData = ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png)); await (image.toByteData(format: ui.ImageByteFormat.png));
if (byteData != null) { if (byteData != null) {

View File

@ -396,10 +396,7 @@ class UserinfoLogic extends GetxController {
} }
setLike() async { setLike() async {
// if (isBlack || isDestroy) {
// showOKToast("喜欢失败,存在拉黑关系或者该账户已注销");
// return;
// }
var data = await DioManager.instance.post( var data = await DioManager.instance.post(
url: "${Api.setLike + userId}/follow", url: "${Api.setLike + userId}/follow",
@ -432,6 +429,7 @@ class UserinfoLogic extends GetxController {
serviceLocator<FriendshipServices>(); serviceLocator<FriendshipServices>();
isBlack = status == "1"; isBlack = status == "1";
isLike = false;
try { try {
if (isBlack) { if (isBlack) {
Navigator.pop(Get.context!); Navigator.pop(Get.context!);

View File

@ -26,6 +26,7 @@ import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
import '../../circle_app/circle/state.dart'; import '../../circle_app/circle/state.dart';
import '../../circle_app/circle/widgets/video_item.dart'; import '../../circle_app/circle/widgets/video_item.dart';
import '../../circle_app/home/logic.dart';
import '../../circle_app/likelist/logic.dart'; import '../../circle_app/likelist/logic.dart';
import '../../router/routers.dart'; import '../../router/routers.dart';
import '../../utils/cache_img.dart'; import '../../utils/cache_img.dart';
@ -46,19 +47,38 @@ class _CircleShareState extends State<CircleShare> {
// TODO: add state variables and methods // TODO: add state variables and methods
GlobalKey _globalKey = GlobalKey(); GlobalKey _globalKey = GlobalKey();
List<UserListItem> lists = []; List<UserListItem> lists = [];
late MinefragmentLogic logic; late HomeLogic logic;
List<V2TimUserFullInfo> conList = []; List<V2TimUserFullInfo> conList = [];
@override @override
void initState() { void initState() {
// TODO: implement initState // TODO: implement initState
super.initState(); super.initState();
Get.lazyPut(() => MinefragmentLogic()); // Get.lazyPut(() => MinefragmentLogic());
logic = Get.find<MinefragmentLogic>(); logic = Get.find<HomeLogic>();
loadMyInfoData();
loadFollowMeData(); loadFollowMeData();
loadInviteData(); loadInviteData();
} }
Future loadMyInfoData() async {
var data = await DioManager.instance.get(url: Api.getUserMine,params: {'1':1});
var bean = BaseResponse<MineResponseBean>.fromJson(
data, (data) => MineResponseBean.fromJson(data));
if (bean.isSuccess()) {
logic.model = bean.data.user;
var result = await DioManager.instance.get(url: Api.inviteMainPage);
if (result['code'] == 200) {
Autogenerated info = Autogenerated.fromJson(result);
logic.inviteCode = info.data!.inviteCode!;
logic.link = info.data!.link!;
setState(() {
});
}
}
}
loadInviteData() async { loadInviteData() async {
var data = await DioManager.instance.get(url: Api.inviteMainPage); var data = await DioManager.instance.get(url: Api.inviteMainPage);
if (data['code'] == 200) { if (data['code'] == 200) {
@ -75,14 +95,18 @@ class _CircleShareState extends State<CircleShare> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// TODO: add widget build method // TODO: add widget build method
return Scaffold( return Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
body: Container( body: Container(
child: Column( child: Column(
children: [ children: [
Expanded(child: Container()), Spacer(),
Container( Container(
width: Get.width - 40.sp, width: Get.width - 40.sp,
margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
color: Colors.red,
// height: Get.height - Get.bottomBarHeight - 164.sp - 10.sp, // height: Get.height - Get.bottomBarHeight - 164.sp - 10.sp,
child: SingleChildScrollView( child: SingleChildScrollView(
child: RepaintBoundary( child: RepaintBoundary(
@ -393,7 +417,7 @@ class _CircleShareState extends State<CircleShare> {
shareWxData(2); shareWxData(2);
}), }),
shareAction('save', '复制邀请链接', () { shareAction('save', '复制邀请链接', () {
copyInviteText(logic.name); copyInviteText(logic.model!.nickname!);
}), }),
shareAction('hb', '保存邀请海报', () { shareAction('hb', '保存邀请海报', () {
_saveLocalImage(); _saveLocalImage();
@ -428,13 +452,13 @@ class _CircleShareState extends State<CircleShare> {
); );
} }
Widget _buildAvatar1(MinefragmentLogic logic) { Widget _buildAvatar1(HomeLogic logic) {
return ClipOval( return ClipOval(
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
if (logic.userInfoBean != null) { if (logic.model != null) {
var imgList = <String>[]; var imgList = <String>[];
imgList.add(logic.userInfoBean!.avatar); imgList.add(logic.model!.avatar);
// Get.toNamed(AppRoutes.Swiper,arguments:imgList); // Get.toNamed(AppRoutes.Swiper,arguments:imgList);
// Get.toNamed(AppRoutes.Swiper, arguments: { // Get.toNamed(AppRoutes.Swiper, arguments: {
// 'imaglist': imgList, // 'imaglist': imgList,
@ -442,14 +466,14 @@ class _CircleShareState extends State<CircleShare> {
// }); // });
} }
}, },
child: logic.userInfoBean == null child: logic.model == null
? SizedBox( ? SizedBox(
width: 63.sp, width: 63.sp,
height: 63.sp, height: 63.sp,
) )
: CachedImg( : CachedImg(
fit: BoxFit.cover, fit: BoxFit.cover,
imageUrl: logic.avatar, imageUrl: logic.model!.avatar!,
width: 63.sp, width: 63.sp,
height: 63.sp, height: 63.sp,
), ),
@ -457,14 +481,14 @@ class _CircleShareState extends State<CircleShare> {
); );
} }
Widget _buildNameRow(MinefragmentLogic logic) { Widget _buildNameRow(HomeLogic logic) {
return Container( return Container(
margin: EdgeInsets.only(top: 6.sp), margin: EdgeInsets.only(top: 6.sp),
child: Row( child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text( Text(
logic.name, logic.model!.nickname!,
style: TextStyle( style: TextStyle(
color: const Color.fromRGBO(247, 250, 250, 1.0), color: const Color.fromRGBO(247, 250, 250, 1.0),
fontSize: 16.sp, fontSize: 16.sp,
@ -476,14 +500,14 @@ class _CircleShareState extends State<CircleShare> {
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17), borderRadius: BorderRadius.circular(17),
gradient: sexBgGradient(logic.userInfoBean?.gender ?? 0), gradient: sexBgGradient(logic.model?.gender ?? 0),
), ),
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp), top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp),
child: Text( child: Text(
logic.ageMsg, getAgeCOntent(logic.model!.gender, logic.model!.age, logic.model!.role, logic.model!.orientation),
style: TextStyle( style: TextStyle(
color: sexBgColor(logic.userInfoBean?.gender ?? 0), color: sexBgColor(logic.model?.gender ?? 0),
fontSize: 10.sp, fontSize: 10.sp,
), ),
), ),
@ -493,7 +517,7 @@ class _CircleShareState extends State<CircleShare> {
); );
} }
Widget _buildInfoRow(MinefragmentLogic logic) { Widget _buildInfoRow(HomeLogic logic) {
return Row( return Row(
children: [ children: [
Text('邀请您加入', Text('邀请您加入',
@ -756,7 +780,7 @@ class _CircleShareState extends State<CircleShare> {
RenderRepaintBoundary boundary = RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary; _globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = ui.Image image =
await boundary.toImage(pixelRatio: 1.0); await boundary.toImage(pixelRatio: 3.0);
ByteData? byteData = ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png)); await (image.toByteData(format: ui.ImageByteFormat.png));
if (byteData != null) { if (byteData != null) {
@ -794,14 +818,15 @@ class _CircleShareState extends State<CircleShare> {
RenderRepaintBoundary boundary = RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary; _globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = ui.Image image =
await boundary.toImage(pixelRatio: 1.0); await boundary.toImage(pixelRatio: 3.0);
ByteData? byteData = ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png)); await (image.toByteData(format: ui.ImageByteFormat.png));
String filePath = ''; String filePath = '';
if (byteData != null) { if (byteData != null) {
Uint8List pngBytes = byteData!.buffer.asUint8List(); Uint8List pngBytes = byteData!.buffer.asUint8List();
Directory directory = await getApplicationDocumentsDirectory(); Directory? directory = await getExternalStorageDirectory();
filePath = '${directory.path}/widget_image.png'; String fileName = 'widget_image_${DateTime.now().millisecondsSinceEpoch}.png';
filePath = '${directory!.path}/$fileName';
File imageFile = File(filePath); File imageFile = File(filePath);
imageFile.writeAsBytesSync(pngBytes); imageFile.writeAsBytesSync(pngBytes);
} }
@ -881,7 +906,7 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
// TODO: add state variables and methods // TODO: add state variables and methods
GlobalKey _globalKey = GlobalKey(); GlobalKey _globalKey = GlobalKey();
List<UserListItem> lists = []; List<UserListItem> lists = [];
late MinefragmentLogic logic; late HomeLogic logic;
List<V2TimUserFullInfo> conList = []; List<V2TimUserFullInfo> conList = [];
final ScrollController GridScrollController = ScrollController(); final ScrollController GridScrollController = ScrollController();
@ -890,7 +915,14 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
// TODO: implement initState // TODO: implement initState
super.initState(); super.initState();
Get.lazyPut(() => MinefragmentLogic()); Get.lazyPut(() => MinefragmentLogic());
logic = Get.find<MinefragmentLogic>(); logic = Get.find<HomeLogic>();
if (logic.model == null) {
logic.loadMyInfoData().then((value) {
setState(() {
});
});
}
loadFollowMeData(); loadFollowMeData();
loadInviteData(); loadInviteData();
} }
@ -920,8 +952,9 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
height: Get.height, height: Get.height,
child: Column( child: Column(
children: [ children: [
Container(height: MediaQuery.of(context).padding.top,), Container(height: MediaQuery.of(context).padding.top,),
Spacer(),
Container( Container(
width: Get.width - 40.sp, width: Get.width - 40.sp,
child: SingleChildScrollView( child: SingleChildScrollView(
@ -1127,10 +1160,11 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
), ),
))), ))),
), ),
SizedBox( Spacer(),
height: 10.sp,
), Container(
Spacer() height: lists.isNotEmpty || conList.isNotEmpty ? 264.sp : 164.sp,
)
], ],
), ),
), ),
@ -1248,7 +1282,7 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
shareWxData(2); shareWxData(2);
}), }),
shareAction('save', '复制邀请链接', () { shareAction('save', '复制邀请链接', () {
copyInviteText(logic.name); copyInviteText(logic.model?.nickname ?? '');
}), }),
shareAction('hb', '保存邀请海报', () { shareAction('hb', '保存邀请海报', () {
_saveLocalImage(); _saveLocalImage();
@ -1633,7 +1667,7 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
padding: EdgeInsets.only(left: 5.sp, right: 10.sp), padding: EdgeInsets.only(left: 5.sp, right: 0.sp),
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 10.sp), top: picHeight > 0 ? 5.sp : 5.sp, bottom: 10.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -1661,7 +1695,7 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
)) ))
: Expanded( : Expanded(
child: Text( child: Text(
'赶紧成为第一位私聊ta的人吧', '快成为第一位私聊ta的人',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 13.sp), fontSize: 13.sp),
@ -2048,7 +2082,7 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
padding: EdgeInsets.only(left: 5.sp, right: 10.sp), padding: EdgeInsets.only(left: 5.sp, right: 2.sp),
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: picHeight > 0 ? 5.sp : 5.sp, bottom: 10.sp), top: picHeight > 0 ? 5.sp : 5.sp, bottom: 10.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -2076,7 +2110,7 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
)) ))
: Expanded( : Expanded(
child: Text( child: Text(
'赶紧成为第一位私聊ta的人吧', '快成为第一位私聊ta的人',
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.75),
fontSize: 13.sp), fontSize: 13.sp),
@ -2288,13 +2322,13 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
)); ));
} }
Widget _buildAvatar1(MinefragmentLogic logic) { Widget _buildAvatar1(HomeLogic logic) {
return ClipOval( return ClipOval(
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
if (logic.userInfoBean != null) { if (logic.model != null) {
var imgList = <String>[]; var imgList = <String>[];
imgList.add(logic.userInfoBean!.avatar); imgList.add(logic.model!.avatar);
// Get.toNamed(AppRoutes.Swiper,arguments:imgList); // Get.toNamed(AppRoutes.Swiper,arguments:imgList);
// Get.toNamed(AppRoutes.Swiper, arguments: { // Get.toNamed(AppRoutes.Swiper, arguments: {
// 'imaglist': imgList, // 'imaglist': imgList,
@ -2302,14 +2336,14 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
// }); // });
} }
}, },
child: logic.userInfoBean == null child: logic.model == null
? SizedBox( ? SizedBox(
width: 63.sp, width: 63.sp,
height: 63.sp, height: 63.sp,
) )
: CachedImg( : CachedImg(
fit: BoxFit.cover, fit: BoxFit.cover,
imageUrl: logic.avatar, imageUrl: logic.model!.avatar!,
width: 63.sp, width: 63.sp,
height: 63.sp, height: 63.sp,
), ),
@ -2317,14 +2351,14 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
); );
} }
Widget _buildNameRow(MinefragmentLogic logic) { Widget _buildNameRow(HomeLogic logic) {
return Container( return Container(
margin: EdgeInsets.only(top: 6.sp), margin: EdgeInsets.only(top: 6.sp),
child: Row( child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text( Text(
logic.name, logic.model?.nickname ?? '',
style: TextStyle( style: TextStyle(
color: const Color.fromRGBO(247, 250, 250, 1.0), color: const Color.fromRGBO(247, 250, 250, 1.0),
fontSize: 16.sp, fontSize: 16.sp,
@ -2336,14 +2370,14 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17), borderRadius: BorderRadius.circular(17),
gradient: sexBgGradient(logic.userInfoBean?.gender ?? 0), gradient: sexBgGradient(logic.model?.gender ?? 0),
), ),
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp), top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp),
child: Text( child: Text(
logic.ageMsg, getAgeCOntent(logic.model!.gender, logic.model!.age, logic.model!.role, logic.model!.orientation),
style: TextStyle( style: TextStyle(
color: sexBgColor(logic.userInfoBean?.gender ?? 0), color: sexBgColor(logic.model?.gender ?? 0),
fontSize: 10.sp, fontSize: 10.sp,
), ),
), ),
@ -2353,7 +2387,7 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
); );
} }
Widget _buildInfoRow(MinefragmentLogic logic) { Widget _buildInfoRow(var logic) {
return Row( return Row(
children: [ children: [
Text('邀请您加入', Text('邀请您加入',
@ -2418,7 +2452,7 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
RenderRepaintBoundary boundary = RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary; _globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = ui.Image image =
await boundary.toImage(pixelRatio: 1.0); await boundary.toImage(pixelRatio: 3.0);
ByteData? byteData = ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png)); await (image.toByteData(format: ui.ImageByteFormat.png));
if (byteData != null) { if (byteData != null) {
@ -2456,14 +2490,15 @@ class _CallOutShareDialogState extends State<CallOutShareDialog> {
RenderRepaintBoundary boundary = RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary; _globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = ui.Image image =
await boundary.toImage(pixelRatio: 1.0); await boundary.toImage(pixelRatio: 3.0);
ByteData? byteData = ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png)); await (image.toByteData(format: ui.ImageByteFormat.png));
String filePath = ''; String filePath = '';
if (byteData != null) { if (byteData != null) {
Uint8List pngBytes = byteData!.buffer.asUint8List(); Uint8List pngBytes = byteData!.buffer.asUint8List();
Directory directory = await getApplicationDocumentsDirectory(); Directory? directory = await getExternalStorageDirectory();
filePath = '${directory.path}/widget_image.png'; String fileName = 'widget_image_${DateTime.now().millisecondsSinceEpoch}.png';
filePath = '${directory!.path}/$fileName';
File imageFile = File(filePath); File imageFile = File(filePath);
imageFile.writeAsBytesSync(pngBytes); imageFile.writeAsBytesSync(pngBytes);
} }

View File

@ -369,8 +369,9 @@ class _SignInDialogState extends State<SignInDialog> {
var result = await DioManager.instance.post(url: Api.daySignIn); var result = await DioManager.instance.post(url: Api.daySignIn);
isSign = false; isSign = false;
if (result['code'] == 200) { if (result['code'] == 200) {
showOKToast('签到成功'); showOKToast(result['msg']);
loadWeekCofigData(); Get.back();
// loadWeekCofigData();
} }
} }

View File

@ -1,7 +1,6 @@
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:characters/characters.dart';
import 'package:get/get.dart';
///"...查看更多详情" ///"...查看更多详情"
class HideText extends StatefulWidget { class HideText extends StatefulWidget {
@ -32,6 +31,12 @@ class HideText extends StatefulWidget {
} }
class _HideTextState extends State<HideText> { class _HideTextState extends State<HideText> {
String safeSubstring(String input, int start, int end) {
final chars = input.characters;
return chars.getRange(start, end).toString();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
@ -82,7 +87,7 @@ class _HideTextState extends State<HideText> {
int num = 0; int num = 0;
int skip = 1; int skip = 1;
while(true){ while(true){
bool isExceed = widget.text.length < num + skip || _textPaint([TextSpan(text: widget.text.substring(0, num + skip) + "...", style: widget.style), bool isExceed = widget.text.length < num + skip || _textPaint([TextSpan(text: "${safeSubstring(widget.text,0, num + skip)}...", style: widget.style),
TextSpan(text: widget.additionText, style: widget.additionStyle)]).didExceedMaxLines; TextSpan(text: widget.additionText, style: widget.additionStyle)]).didExceedMaxLines;
if(!isExceed) { if(!isExceed) {
num = num + skip; num = num + skip;

View File

@ -582,7 +582,7 @@ class _UserShareState extends State<UserShare> {
RenderRepaintBoundary boundary = RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary; _globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = ui.Image image =
await boundary.toImage(pixelRatio: 1.0); await boundary.toImage(pixelRatio: 3.0);
ByteData? byteData = ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png)); await (image.toByteData(format: ui.ImageByteFormat.png));
if (byteData != null) { if (byteData != null) {
@ -623,14 +623,15 @@ class _UserShareState extends State<UserShare> {
RenderRepaintBoundary boundary = RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary; _globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = ui.Image image =
await boundary.toImage(pixelRatio: 1.0); await boundary.toImage(pixelRatio: 3.0);
ByteData? byteData = ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png)); await (image.toByteData(format: ui.ImageByteFormat.png));
String filePath = ''; String filePath = '';
if (byteData != null) { if (byteData != null) {
Uint8List pngBytes = byteData!.buffer.asUint8List(); Uint8List pngBytes = byteData!.buffer.asUint8List();
Directory directory = await getApplicationDocumentsDirectory(); Directory? directory = await getExternalStorageDirectory();
filePath = '${directory.path}/widget_image.png'; String fileName = 'widget_image_${DateTime.now().millisecondsSinceEpoch}.png';
filePath = '${directory!.path}/$fileName';
File imageFile = File(filePath); File imageFile = File(filePath);
imageFile.writeAsBytesSync(pngBytes); imageFile.writeAsBytesSync(pngBytes);
} }

View File

@ -411,7 +411,7 @@ class _VideoShareDialogState extends State<VideoShareDialog> {
RenderRepaintBoundary boundary = RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary; _globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = ui.Image image =
await boundary.toImage(pixelRatio: 1.0); await boundary.toImage(pixelRatio: 3.0);
ByteData? byteData = ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png)); await (image.toByteData(format: ui.ImageByteFormat.png));
if (byteData != null) { if (byteData != null) {
@ -452,14 +452,15 @@ class _VideoShareDialogState extends State<VideoShareDialog> {
RenderRepaintBoundary boundary = RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary; _globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = ui.Image image =
await boundary.toImage(pixelRatio: 1.0); await boundary.toImage(pixelRatio: 3.0);
ByteData? byteData = ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png)); await (image.toByteData(format: ui.ImageByteFormat.png));
String filePath = ''; String filePath = '';
if (byteData != null) { if (byteData != null) {
Uint8List pngBytes = byteData!.buffer.asUint8List(); Uint8List pngBytes = byteData!.buffer.asUint8List();
Directory directory = await getApplicationDocumentsDirectory(); Directory? directory = await getExternalStorageDirectory();
filePath = '${directory.path}/widget_image.png'; String fileName = 'widget_image_${DateTime.now().millisecondsSinceEpoch}.png';
filePath = '${directory!.path}/$fileName';
File imageFile = File(filePath); File imageFile = File(filePath);
imageFile.writeAsBytesSync(pngBytes); imageFile.writeAsBytesSync(pngBytes);
} }

View File

@ -226,7 +226,7 @@ packages:
source: hosted source: hosted
version: "4.2.1" version: "4.2.1"
characters: characters:
dependency: transitive dependency: "direct main"
description: description:
name: characters name: characters
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c

View File

@ -132,6 +132,7 @@ dependencies:
quickpass_yidun_flutter: ^1.5.6 quickpass_yidun_flutter: ^1.5.6
#视频播放器 #视频播放器
fijkplayer: ^0.11.0 fijkplayer: ^0.11.0
characters: ^1.2.1
dev_dependencies: dev_dependencies:
flutter_test: flutter_test: