修改安卓版本号1.2.0,iOS1.2.1线上代码提交
This commit is contained in:
parent
85bc065c71
commit
2a84997430
@ -72,7 +72,7 @@ android {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode 14
|
||||
versionName "1.1.4"
|
||||
versionName "1.2.0"
|
||||
manifestPlaceholders = [
|
||||
vivo_APPID: "105669716",
|
||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||
|
||||
@ -363,11 +363,11 @@
|
||||
DEVELOPMENT_TEAM = C39VUKAY2Z;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "跨友Trans";
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "微乐园";
|
||||
INFOPLIST_KEY_NSCameraUsageDescription = "App会在上传头像时,需要访问您的相机权限";
|
||||
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料";
|
||||
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "App需要使用您的位置信息,寻找附近用户";
|
||||
INFOPLIST_KEY_NSMicrophoneUsageDescription = "$(PRODUCT_NAME)需要您同意,才能使用麦克风,用来发送语音";
|
||||
INFOPLIST_KEY_NSMicrophoneUsageDescription = "Runner需要您同意,才能使用麦克风,用来发送语音";
|
||||
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "是否同意应用将图片保存到相册中?";
|
||||
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "App会在上传头像时,需要访问您的相册权限";
|
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||
@ -381,7 +381,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.2.0;
|
||||
MARKETING_VERSION = 1.2.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
@ -512,11 +512,11 @@
|
||||
DEVELOPMENT_TEAM = C39VUKAY2Z;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "跨友Trans";
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "微乐园";
|
||||
INFOPLIST_KEY_NSCameraUsageDescription = "App会在上传头像时,需要访问您的相机权限";
|
||||
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料";
|
||||
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "App需要使用您的位置信息,寻找附近用户";
|
||||
INFOPLIST_KEY_NSMicrophoneUsageDescription = "$(PRODUCT_NAME)需要您同意,才能使用麦克风,用来发送语音";
|
||||
INFOPLIST_KEY_NSMicrophoneUsageDescription = "Runner需要您同意,才能使用麦克风,用来发送语音";
|
||||
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "是否同意应用将图片保存到相册中?";
|
||||
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "App会在上传头像时,需要访问您的相册权限";
|
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||
@ -530,7 +530,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.2.0;
|
||||
MARKETING_VERSION = 1.2.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
@ -555,11 +555,11 @@
|
||||
DEVELOPMENT_TEAM = C39VUKAY2Z;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "跨友Trans";
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "微乐园";
|
||||
INFOPLIST_KEY_NSCameraUsageDescription = "App会在上传头像时,需要访问您的相机权限";
|
||||
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料";
|
||||
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "App需要使用您的位置信息,寻找附近用户";
|
||||
INFOPLIST_KEY_NSMicrophoneUsageDescription = "$(PRODUCT_NAME)需要您同意,才能使用麦克风,用来发送语音";
|
||||
INFOPLIST_KEY_NSMicrophoneUsageDescription = "Runner需要您同意,才能使用麦克风,用来发送语音";
|
||||
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "是否同意应用将图片保存到相册中?";
|
||||
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "App会在上传头像时,需要访问您的相册权限";
|
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||
@ -573,7 +573,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.2.0;
|
||||
MARKETING_VERSION = 1.2.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
|
||||
@ -32,5 +32,7 @@
|
||||
<false/>
|
||||
<key>io.flutter.embedded_views_preview</key>
|
||||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// import 'package:flutter_install_app/flutter_install_app.dart';
|
||||
import 'package:flutter_install_app/flutter_install_app.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@ -32,7 +32,7 @@ class AboutappLogic extends GetxController {
|
||||
_updateInfo = bean.data;
|
||||
version = bean.data.version;
|
||||
update();
|
||||
// showReportDialog(Get.context!, bean.data.constraint == 0, bean.data);
|
||||
showReportDialog(Get.context!, bean.data.constraint == 0, bean.data);
|
||||
}
|
||||
|
||||
//getVersion();
|
||||
@ -41,7 +41,7 @@ class AboutappLogic extends GetxController {
|
||||
|
||||
getVersion() async {
|
||||
final info = await PackageInfo.fromPlatform();
|
||||
currentVersion = "V:${info.version}";
|
||||
currentVersion = "V${info.version}";
|
||||
//version = info.version;
|
||||
update();
|
||||
return version;
|
||||
|
||||
@ -412,14 +412,17 @@ bool isSendLoging = false;
|
||||
focusNode.requestFocus();
|
||||
_addDeleteTag();
|
||||
} else {}
|
||||
if (widget.model.editRevokedMsg != "") {
|
||||
if (widget.model.editRevokedMsg.isNotEmpty) {
|
||||
narrowTextFieldKey.currentState?.showKeyboard = true;
|
||||
focusNode.requestFocus();
|
||||
|
||||
textEditingController.text = widget.model.editRevokedMsg;
|
||||
textEditingController.selection = TextSelection.fromPosition(TextPosition(
|
||||
affinity: TextAffinity.downstream,
|
||||
offset: widget.model.editRevokedMsg.length));
|
||||
widget.model.editRevokedMsg = "";
|
||||
Future.delayed(Duration(milliseconds: 300),() {
|
||||
focusNode.requestFocus();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -320,12 +320,12 @@ class _TIMTextFieldLayoutNarrowState
|
||||
final height = originHeight != 0 ? originHeight : currentKeyboardHeight;
|
||||
return height;
|
||||
} else if (showMore || showEmojiPanel) {
|
||||
return 200.0 + (bottomPadding ?? 0.0);
|
||||
return 240.0 + (bottomPadding ?? 0.0);
|
||||
} else if (widget.textEditingController.text.length >= 46 &&
|
||||
showKeyboard == false) {
|
||||
return 15 + (bottomPadding ?? 0.0);
|
||||
} else {
|
||||
return bottomPadding ?? 0;
|
||||
return bottomPadding == 0 ? 10.sp : bottomPadding ?? 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -677,7 +677,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
Container(
|
||||
height: 40.sp,
|
||||
width: Get.width,
|
||||
margin: EdgeInsets.only(bottom: showEmojiPanel ? 40.sp : 0),
|
||||
margin: EdgeInsets.only(bottom: showEmojiPanel ? Platform.isIOS ? 40.sp : 10.sp : 0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
|
||||
@ -43,25 +43,25 @@ class CircleLogic extends GetxController {
|
||||
|
||||
List<BannerItem> bannerList = [];
|
||||
|
||||
List<MyConfigData> genderList = [];
|
||||
|
||||
List<MyConfigData> orientationList = [];
|
||||
|
||||
List<MyConfigData> roleList = [];
|
||||
|
||||
List<MyConfigData> dis_genderList = [];
|
||||
|
||||
List<MyConfigData> dis_orientationList = [];
|
||||
|
||||
List<MyConfigData> dis_roleList = [];
|
||||
|
||||
AutoScrollController scrollController = AutoScrollController();
|
||||
ScrollController listScrollController = ScrollController();
|
||||
|
||||
@override
|
||||
void onInit() async {
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
var data = await DioManager.instance.get(
|
||||
url: Api.getCircleInterests, params: {"page": page, 'page_size': 20});
|
||||
var bean = BaseResponse<InterestsBean>.fromJson(
|
||||
data, (data) => InterestsBean.fromJson(data));
|
||||
if (bean.data is InterestsBean && bean.isSuccess()) {
|
||||
circle = bean.data!;
|
||||
if (circle.lists.length < 20) {
|
||||
isMore = false;
|
||||
}
|
||||
|
||||
update();
|
||||
}
|
||||
// myVip = await getVip();
|
||||
loadCircleListData();
|
||||
loadCirclePeopleData();
|
||||
initGerder();
|
||||
getCityList();
|
||||
@ -75,18 +75,21 @@ class CircleLogic extends GetxController {
|
||||
});
|
||||
}
|
||||
|
||||
List<MyConfigData> genderList = [];
|
||||
|
||||
List<MyConfigData> orientationList = [];
|
||||
loadCircleListData() async {
|
||||
var data = await DioManager.instance.get(
|
||||
url: Api.getCircleInterests, params: {"page": page, 'page_size': 20});
|
||||
var bean = BaseResponse<InterestsBean>.fromJson(
|
||||
data, (data) => InterestsBean.fromJson(data));
|
||||
if (bean.data is InterestsBean && bean.isSuccess()) {
|
||||
circle = bean.data!;
|
||||
if (circle.lists.length < 20) {
|
||||
isMore = false;
|
||||
}
|
||||
|
||||
List<MyConfigData> roleList = [];
|
||||
|
||||
|
||||
List<MyConfigData> dis_genderList = [];
|
||||
|
||||
List<MyConfigData> dis_orientationList = [];
|
||||
|
||||
List<MyConfigData> dis_roleList = [];
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
void initGerder() async {
|
||||
var data1 =
|
||||
@ -108,7 +111,6 @@ class CircleLogic extends GetxController {
|
||||
configBean.roleMap.forEach((key, value) {
|
||||
roleList.add(MyConfigData(key, value, false));
|
||||
dis_roleList.add(MyConfigData(key, value, false));
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@ -131,7 +133,6 @@ class CircleLogic extends GetxController {
|
||||
}
|
||||
cityMap[provinceList[i].name] = areaMap;
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
print('Error loading JSON file: $e');
|
||||
}
|
||||
@ -238,7 +239,6 @@ class CircleLogic extends GetxController {
|
||||
}
|
||||
|
||||
void getBanner() async {
|
||||
|
||||
var data =
|
||||
await DioManager.instance.get(url: Api.getNearbyBeanner, params: {});
|
||||
var bean = BaseResponse<BannerList>.fromJson(
|
||||
@ -268,7 +268,7 @@ class CircleLogic extends GetxController {
|
||||
orientationList.forEach((element) {
|
||||
if (element.isSelect) orientations.add(element.id);
|
||||
});
|
||||
if(offset==0){
|
||||
if (offset == 0) {
|
||||
getBanner();
|
||||
}
|
||||
|
||||
@ -295,19 +295,16 @@ class CircleLogic extends GetxController {
|
||||
vicinityList.clear();
|
||||
}
|
||||
|
||||
|
||||
if (vicinityPage == 1) {
|
||||
refreshController.refreshCompleted();
|
||||
} else {
|
||||
refreshController.loadComplete();
|
||||
}
|
||||
|
||||
try{
|
||||
|
||||
try {
|
||||
vicinityList.addAll(bean.data.users);
|
||||
vicinityPage = vicinityPage + 1;
|
||||
} on Exception{}
|
||||
|
||||
} on Exception {}
|
||||
} else if (bean.code == 21201) {
|
||||
myVip = 0;
|
||||
refreshController.loadComplete();
|
||||
|
||||
@ -535,6 +535,8 @@ class _CirclePageState extends State<CirclePage>
|
||||
if (!logic.isMore) {
|
||||
showOKToast('小主,换个方向滑动呗~');
|
||||
}
|
||||
} else if (index == 0) {
|
||||
showOKToast('小主,换个方向滑动呗~');
|
||||
}
|
||||
|
||||
print(index.toString());
|
||||
@ -609,25 +611,17 @@ class _CirclePageState extends State<CirclePage>
|
||||
),
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(0.6.sp),
|
||||
padding: EdgeInsets.only(left: 6.sp,right: 6.sp,top: 4.sp,bottom: 4.sp),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17.0),
|
||||
color: const Color(0xFF392D53),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 5.sp,
|
||||
bottom: 4.sp,
|
||||
left: 8.sp,
|
||||
right: 8.sp,
|
||||
),
|
||||
child: const Center(
|
||||
child: Text(
|
||||
"邀请得会员",
|
||||
style: TextStyle(
|
||||
fontSize: 11,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
"邀请得会员",
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@ -59,11 +59,7 @@ class _DiscoverState extends State<Discover>
|
||||
double nextOffset = 0;
|
||||
int lastPage = 0;
|
||||
|
||||
double screenHeight = Platform.isAndroid ? Get.height -
|
||||
Get.statusBarHeight - Get.bottomBarHeight : Get.height -
|
||||
Get.bottomBarHeight -
|
||||
Get.statusBarHeight -
|
||||
((Get.height > 750 ? 115.sp : 155.sp) - Get.statusBarHeight);
|
||||
double screenHeight = 0;
|
||||
|
||||
|
||||
void animateToOffset(ScrollController controller, double offset,
|
||||
@ -143,6 +139,9 @@ class _DiscoverState extends State<Discover>
|
||||
|
||||
|
||||
sub = EventBusManager.on<DiscovrScrollTap>().listen((event) {
|
||||
pointerStart = Offset.zero;
|
||||
pointerEnd = Offset.zero;
|
||||
lastPage = 0;
|
||||
_scrollController.animateTo(0,
|
||||
duration: const Duration(milliseconds: 300), curve: Curves.easeInOut);
|
||||
});
|
||||
@ -259,383 +258,398 @@ class _DiscoverState extends State<Discover>
|
||||
Widget build(BuildContext context) {
|
||||
// TODO: add widget build method
|
||||
|
||||
screenHeight = Platform.isAndroid ? Get.height - (widget.unlockWxNum == 1 ? 10.sp : Get.bottomBarHeight + 49.sp + 2.sp) -
|
||||
Get.statusBarHeight : Get.height -
|
||||
Get.bottomBarHeight -
|
||||
Get.statusBarHeight -
|
||||
((Get.height > 750 ? 100.sp : 140.sp) - Get.statusBarHeight);
|
||||
/// 延时一下,需要等state layout结束之后才能获取size
|
||||
Future.delayed(Duration(milliseconds: 100), () {
|
||||
if (!mounted) return;
|
||||
if (screenHeight == 0 && list.isNotEmpty) {
|
||||
var size = context?.findRenderObject()?.paintBounds?.size;
|
||||
screenHeight = size!.height - 20.sp;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
print(size.toString());
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return list.isEmpty
|
||||
? isMore
|
||||
? loaddingWidget(true)
|
||||
: noResultWidget(tip: '已解锁微信的圈友会展示在这里哦~')
|
||||
: Listener(
|
||||
onPointerDown: getPointDownListenerInHorizontal(),
|
||||
onPointerUp: getPointUpListenerInHorizontal(),
|
||||
child: SmartRefresher(
|
||||
onRefresh: refreshData,
|
||||
controller: refreshController,
|
||||
onLoading: _onLoading,
|
||||
enablePullUp: true,
|
||||
child: ListView.builder(
|
||||
itemBuilder: (context, index) {
|
||||
var user = Users.fromJson(list[index]);
|
||||
: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
Container(color: Colors.transparent),
|
||||
Listener(
|
||||
onPointerDown: getPointDownListenerInHorizontal(),
|
||||
onPointerUp: getPointUpListenerInHorizontal(),
|
||||
child: SmartRefresher(
|
||||
onRefresh: refreshData,
|
||||
controller: refreshController,
|
||||
onLoading: _onLoading,
|
||||
enablePullUp: true,
|
||||
child: ListView.builder(
|
||||
|
||||
String onLineStr = '';
|
||||
if (user.online! ?? false) {
|
||||
onLineStr = '当前在线';
|
||||
if (user.distance != null) {
|
||||
if (user.distance! < 100) {
|
||||
onLineStr = '当前在线 · ${user.distance!}km';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (user.distance != null) {
|
||||
if ((user.distance! ?? 10) < 100) {
|
||||
onLineStr = '${user.distance!}km';
|
||||
}
|
||||
}
|
||||
}
|
||||
itemBuilder: (context, index) {
|
||||
var user = Users.fromJson(list[index]);
|
||||
|
||||
return Container(
|
||||
height: screenHeight,
|
||||
width: Get.width,
|
||||
margin: EdgeInsets.only(
|
||||
top: 5.sp, left: 16.sp, right: 16.sp),
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(10.sp),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
image: AssetImage(
|
||||
getCircleImage('open_vip_bg'),
|
||||
))),
|
||||
height: screenHeight,
|
||||
width: Get.width,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(18),
|
||||
String onLineStr = '';
|
||||
if (user.online! ?? false) {
|
||||
onLineStr = '当前在线';
|
||||
if (user.distance != null) {
|
||||
if (user.distance! < 100) {
|
||||
onLineStr = '当前在线 · ${user.distance!.toInt()}km';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (user.distance != null) {
|
||||
if ((user.distance! ?? 10) < 100) {
|
||||
onLineStr = '${user.distance!.toInt()}km';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Container(
|
||||
height: screenHeight,
|
||||
width: Get.width,
|
||||
margin: EdgeInsets.only(
|
||||
top: 5.sp, left: 16.sp, right: 16.sp),
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(2.sp),
|
||||
child: Swiper(
|
||||
autoplay:
|
||||
user.images!.length == 1 ? false : true,
|
||||
loop: user.images!.length == 1 ? false : true,
|
||||
itemBuilder:
|
||||
(BuildContext context, int index) {
|
||||
// print(index);
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
List<String> imgList = [];
|
||||
user.images!.forEach((element) {
|
||||
imgList.add(element);
|
||||
});
|
||||
|
||||
Get.toNamed(AppRoutes.Swiper,
|
||||
arguments: {
|
||||
'imaglist': imgList,
|
||||
'index': index
|
||||
});
|
||||
},
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: user.images![index],
|
||||
fit: BoxFit.cover,
|
||||
width: Get.width,
|
||||
height: screenHeight,
|
||||
));
|
||||
},
|
||||
itemCount: user.images!.length,
|
||||
),
|
||||
)),
|
||||
),
|
||||
Positioned(
|
||||
left: 16.sp,
|
||||
top: 20.sp,
|
||||
child: Container(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (user.both_cities!.isNotEmpty)
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 6.sp,
|
||||
height: 6.sp,
|
||||
margin:
|
||||
EdgeInsets.only(right: 4.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(3.sp),
|
||||
color: const Color(0xFFCE51FF),
|
||||
),
|
||||
),
|
||||
// if (logic.online)
|
||||
Text(
|
||||
"你们都来过${user.both_cities!.first}",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (user.both_interests!.isNotEmpty)
|
||||
SizedBox(
|
||||
height: 8.sp,
|
||||
),
|
||||
if (user.both_interests!.isNotEmpty)
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 6.sp,
|
||||
height: 6.sp,
|
||||
margin:
|
||||
EdgeInsets.only(right: 4.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(3.sp),
|
||||
color: const Color(0xFFCE51FF),
|
||||
),
|
||||
),
|
||||
// if (logic.online)
|
||||
Text(
|
||||
"你们有共同的圈子:${user.both_interests!.first['title']}",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (user.both_cities!.isNotEmpty)
|
||||
SizedBox(
|
||||
height: 8.sp,
|
||||
),
|
||||
if (onLineStr.isNotEmpty)
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 6.sp,
|
||||
height: 6.sp,
|
||||
margin:
|
||||
EdgeInsets.only(right: 4.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(3.sp),
|
||||
color: const Color(0xFFCE51FF),
|
||||
),
|
||||
),
|
||||
// if (logic.online)
|
||||
Text(
|
||||
onLineStr,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
right: 16.sp,
|
||||
top: 16.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.UserInfoActivity,
|
||||
arguments: user.userId!.toString());
|
||||
},
|
||||
child: Container(
|
||||
width: 73.sp,
|
||||
height: 25.sp,
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.5.sp)),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 5.sp),
|
||||
child: Text(
|
||||
'查看主页',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 10.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
Image(
|
||||
width: 15.sp,
|
||||
decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(10.sp),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
image: AssetImage(
|
||||
getDisCoverImage("right_icon")),
|
||||
// width: 44.sp,
|
||||
getCircleImage('open_vip_bg'),
|
||||
))),
|
||||
height: screenHeight,
|
||||
width: Get.width,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(18),
|
||||
clipBehavior: Clip.hardEdge,
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(2.sp),
|
||||
child: Swiper(
|
||||
autoplay:
|
||||
user.images!.length == 1 ? false : true,
|
||||
loop: user.images!.length == 1 ? false : true,
|
||||
itemBuilder:
|
||||
(BuildContext context, int index) {
|
||||
// print(index);
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
List<String> imgList = [];
|
||||
user.images!.forEach((element) {
|
||||
imgList.add(element);
|
||||
});
|
||||
|
||||
Get.toNamed(AppRoutes.Swiper,
|
||||
arguments: {
|
||||
'imaglist': imgList,
|
||||
'index': index
|
||||
});
|
||||
},
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: user.images![index],
|
||||
fit: BoxFit.cover,
|
||||
width: Get.width,
|
||||
height: screenHeight,
|
||||
));
|
||||
},
|
||||
itemCount: user.images!.length,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
left: 6.sp,
|
||||
bottom: 6.sp,
|
||||
child: Container(
|
||||
width: Get.width - 32.sp,
|
||||
padding: EdgeInsets.only(right: 0.sp),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (user.wxNum != null)
|
||||
wxStatusWidget(
|
||||
user.unLockWxNum == 1,
|
||||
user.wxNum!,
|
||||
user.userId.toString(),
|
||||
user.avatarUrl!, () {
|
||||
loadSignDiscoverData(
|
||||
user.userId.toString());
|
||||
}),
|
||||
SizedBox(
|
||||
height: 10.sp,
|
||||
),
|
||||
Row(
|
||||
)),
|
||||
),
|
||||
Positioned(
|
||||
left: 16.sp,
|
||||
top: 20.sp,
|
||||
child: Container(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
user.nickname ?? '',
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp,
|
||||
color: Color(0XFFF7FAFA),
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 5.sp),
|
||||
alignment: Alignment.center,
|
||||
height: 18.sp,
|
||||
padding: EdgeInsets.only(
|
||||
left: 6.sp, right: 6.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(9.sp),
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment(0.25, 0.5),
|
||||
end: Alignment(0.75, 0.5),
|
||||
colors: [
|
||||
Color(0xff8DFFF8),
|
||||
Color(0xffB5D3FF)
|
||||
])),
|
||||
child: Text(
|
||||
getAgeCOntent(
|
||||
user!.gender ?? 0,
|
||||
user!.age ?? 0,
|
||||
user!.role ?? 0,
|
||||
user!.orientation ?? 0),
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12.sp,
|
||||
),
|
||||
if (user.both_cities!.isNotEmpty)
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 6.sp,
|
||||
height: 6.sp,
|
||||
margin:
|
||||
EdgeInsets.only(right: 4.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(3.sp),
|
||||
color: const Color(0xFFCE51FF),
|
||||
),
|
||||
),
|
||||
// if (logic.online)
|
||||
Text(
|
||||
"你们都来过${user.both_cities!.first}",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (user.both_interests!.isNotEmpty)
|
||||
SizedBox(
|
||||
height: 8.sp,
|
||||
),
|
||||
if (user.both_interests!.isNotEmpty)
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 6.sp,
|
||||
height: 6.sp,
|
||||
margin:
|
||||
EdgeInsets.only(right: 4.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(3.sp),
|
||||
color: const Color(0xFFCE51FF),
|
||||
),
|
||||
),
|
||||
// if (logic.online)
|
||||
Text(
|
||||
"你们有共同的圈子:${user.both_interests!.first['title']}",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (user.both_cities!.isNotEmpty)
|
||||
SizedBox(
|
||||
height: 8.sp,
|
||||
),
|
||||
if (user.vip! > 0)
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 4.sp,
|
||||
),
|
||||
child: Image.asset(
|
||||
getCircleImage(user!.vip == 1
|
||||
? 'vip'
|
||||
: 'year_vip'),
|
||||
width: 36.sp,
|
||||
),
|
||||
if (onLineStr.isNotEmpty)
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 6.sp,
|
||||
height: 6.sp,
|
||||
margin:
|
||||
EdgeInsets.only(right: 4.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(3.sp),
|
||||
color: const Color(0xFFCE51FF),
|
||||
),
|
||||
),
|
||||
// if (logic.online)
|
||||
Text(
|
||||
onLineStr,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
width: Get.width - 120.sp,
|
||||
margin: EdgeInsets.only(top: 5.sp),
|
||||
child: Text(
|
||||
user.signature! ?? '',
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
style: TextStyle(
|
||||
fontSize: 15.sp,
|
||||
color: const Color(0XFFF7FAFA)),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: Get.width - 110.sp,
|
||||
height: 35.sp,
|
||||
child: tagItem(user.interests!),
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
bottom: 5.sp,
|
||||
right: 15.sp,
|
||||
child: Container(
|
||||
child: Column(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
pushChatPage(
|
||||
user.userId.toString(),
|
||||
user.imAccid!.toString(),
|
||||
user.nickname!);
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage(
|
||||
'chat_icon',
|
||||
),
|
||||
width: 50.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
)),
|
||||
Positioned(
|
||||
right: 16.sp,
|
||||
top: 16.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.UserInfoActivity,
|
||||
arguments: user.userId!.toString());
|
||||
},
|
||||
child: Container(
|
||||
width: 73.sp,
|
||||
height: 25.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setLike(user.userId!.toString(),
|
||||
user.is_follow!, () {
|
||||
list[index]['is_follow'] =
|
||||
!user.is_follow!;
|
||||
setState(() {});
|
||||
});
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage(
|
||||
user.is_follow!
|
||||
? 'like_icon'
|
||||
: 'nor_like_icon',
|
||||
),
|
||||
width: 50.sp,
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.5.sp)),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 5.sp),
|
||||
child: Text(
|
||||
'查看主页',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 10.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
Image(
|
||||
width: 15.sp,
|
||||
image: AssetImage(
|
||||
getDisCoverImage("right_icon")),
|
||||
// width: 44.sp,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 20.sp,
|
||||
)),
|
||||
Positioned(
|
||||
left: 6.sp,
|
||||
bottom: 6.sp,
|
||||
child: Container(
|
||||
width: Get.width - 32.sp,
|
||||
padding: EdgeInsets.only(right: 0.sp),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (user.wxNum != null)
|
||||
wxStatusWidget(
|
||||
user.unLockWxNum == 1,
|
||||
user.wxNum!,
|
||||
user.userId.toString(),
|
||||
user.avatarUrl!, () {
|
||||
loadSignDiscoverData(
|
||||
user.userId.toString());
|
||||
}),
|
||||
SizedBox(
|
||||
height: 10.sp,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
user.nickname ?? '',
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp,
|
||||
color: Color(0XFFF7FAFA),
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 5.sp),
|
||||
alignment: Alignment.center,
|
||||
height: 18.sp,
|
||||
padding: EdgeInsets.only(
|
||||
left: 6.sp, right: 6.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(9.sp),
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment(0.25, 0.5),
|
||||
end: Alignment(0.75, 0.5),
|
||||
colors: [
|
||||
Color(0xff8DFFF8),
|
||||
Color(0xffB5D3FF)
|
||||
])),
|
||||
child: Text(
|
||||
getAgeCOntent(
|
||||
user!.gender ?? 0,
|
||||
user!.age ?? 0,
|
||||
user!.role ?? 0,
|
||||
user!.orientation ?? 0),
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (user.vip! > 0)
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 4.sp,
|
||||
),
|
||||
child: Image.asset(
|
||||
getCircleImage(user!.vip == 1
|
||||
? 'vip'
|
||||
: 'year_vip'),
|
||||
width: 36.sp,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
width: Get.width - 120.sp,
|
||||
margin: EdgeInsets.only(top: 5.sp),
|
||||
child: Text(
|
||||
user.signature! ?? '',
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
style: TextStyle(
|
||||
fontSize: 15.sp,
|
||||
color: const Color(0XFFF7FAFA)),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: Get.width - 110.sp,
|
||||
height: 35.sp,
|
||||
child: tagItem(user.interests!),
|
||||
),
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
_showReportDialog(context,user.userId!.toString(),index);
|
||||
)),
|
||||
Positioned(
|
||||
bottom: 5.sp,
|
||||
right: 15.sp,
|
||||
child: Container(
|
||||
child: Column(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
pushChatPage(
|
||||
user.userId.toString(),
|
||||
user.imAccid!.toString(),
|
||||
user.nickname!);
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage(
|
||||
'chat_icon',
|
||||
),
|
||||
width: 50.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 25.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setLike(user.userId!.toString(),
|
||||
user.is_follow!, () {
|
||||
list[index]['is_follow'] =
|
||||
!user.is_follow!;
|
||||
setState(() {});
|
||||
});
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage(
|
||||
user.is_follow!
|
||||
? 'like_icon'
|
||||
: 'nor_like_icon',
|
||||
),
|
||||
width: 50.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 20.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
_showReportDialog(context,user.userId!.toString(),index);
|
||||
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage(
|
||||
'no_look_icon',
|
||||
),
|
||||
width: 50.sp,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
))
|
||||
],
|
||||
));
|
||||
},
|
||||
itemCount: list.length,
|
||||
physics: BouncingScrollPhysics(),
|
||||
controller: _scrollController,
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage(
|
||||
'no_look_icon',
|
||||
),
|
||||
width: 50.sp,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
))
|
||||
],
|
||||
));
|
||||
},
|
||||
itemCount: list.length,
|
||||
physics: BouncingScrollPhysics(),
|
||||
controller: _scrollController,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
tagItem(List item) {
|
||||
|
||||
@ -34,17 +34,17 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
sub = EventBusManager.on<NearScrollTap>().listen((event) {
|
||||
if (widget.logic.myVip > 0) {
|
||||
// if (widget.logic.myVip > 0) {
|
||||
_scrollController.animateTo(0,
|
||||
duration: const Duration(milliseconds: 300), curve: Curves.easeInOut);
|
||||
}
|
||||
// }
|
||||
});
|
||||
|
||||
_scrollController.addListener(() {
|
||||
if (maxOff > 0 && widget.logic.myVip == 0 && _scrollController.offset >= maxOff) {
|
||||
_scrollController.jumpTo(maxOff);
|
||||
}
|
||||
});
|
||||
// _scrollController.addListener(() {
|
||||
// if (maxOff > 0 && widget.logic.myVip == 0 && _scrollController.offset >= maxOff) {
|
||||
// _scrollController.jumpTo(maxOff);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
@override
|
||||
@ -59,9 +59,7 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// TODO: add widget build method
|
||||
if (widget.logic.myVip == 0 && _scrollController.offset > Get.height) {
|
||||
_scrollController.jumpTo(_scrollController.offset - 150.sp);
|
||||
}
|
||||
|
||||
return widget.logic.vicinityList.isNotEmpty ? Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
@ -69,24 +67,34 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
||||
controller: widget.logic.refreshController,
|
||||
onRefresh: _onRefresh,
|
||||
onLoading: _onLoading,
|
||||
enablePullUp: true,
|
||||
enablePullUp: widget.logic.myVip == 0 ? false : true,
|
||||
child: ListView.builder(
|
||||
controller: _scrollController,
|
||||
padding: EdgeInsets.all(10.sp),
|
||||
itemCount: widget.logic.vicinityList.length + 1,
|
||||
itemCount:widget.logic.vicinityList.length + 1,
|
||||
itemBuilder: (context, index) {
|
||||
if (index == 0) {
|
||||
return bannerView(widget.logic);
|
||||
} else {
|
||||
if (widget.logic.myVip == 0 && index == widget.logic.vicinityList.length) {
|
||||
// return;
|
||||
return Stack(
|
||||
children: [
|
||||
ListItem(widget.logic.vicinityList[index - 1], index - 1),
|
||||
showVipView()
|
||||
],
|
||||
);
|
||||
} else {
|
||||
return ListItem(widget.logic.vicinityList[index - 1], index - 1);
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
if (widget.logic.myVip == 0)
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
child: showVipView())
|
||||
// if (widget.logic.myVip == 0)
|
||||
// Positioned(
|
||||
// bottom: 0,
|
||||
// child: showVipView())
|
||||
],
|
||||
) : loaddingWidget(true);
|
||||
}
|
||||
@ -162,58 +170,73 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
||||
|
||||
Widget showVipView() {
|
||||
return Container(
|
||||
width: Get.width,
|
||||
// margin: EdgeInsets.only(top: 10.sp),
|
||||
color: Colors.black87,
|
||||
padding: EdgeInsets.symmetric(vertical: 14.sp, horizontal: 20.sp),
|
||||
child: Column(
|
||||
children: [
|
||||
Center(
|
||||
child: Text(
|
||||
"VIP特权",
|
||||
style: TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 18.sp),
|
||||
child: Text(
|
||||
"开通VIP后,才能查看更多附近的圈友,也可以根据您的喜好、属性、角色、取向等筛选出想要认识的人,还可以获得其他十几种会员特权,拥有更多不一样的体验",
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
widget.logic.showRechargeDialog();
|
||||
},
|
||||
child: Center(
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 14.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 10.sp,
|
||||
horizontal: 55.sp,
|
||||
),
|
||||
child: const Text(
|
||||
"前往开通VIP",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
margin: EdgeInsets.only(top: 10.sp),
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
child: Container(
|
||||
color: Colors.black,
|
||||
width: Get.width,
|
||||
height: 100.sp,
|
||||
padding: EdgeInsets.symmetric(vertical: 25.sp),
|
||||
)),
|
||||
Container(
|
||||
width: Get.width,
|
||||
// margin: EdgeInsets.only(top: 10.sp),
|
||||
color: Colors.black.withOpacity(0.87),
|
||||
padding: EdgeInsets.symmetric(vertical: 25.sp, horizontal: 20.sp),
|
||||
child: Column(
|
||||
children: [
|
||||
Center(
|
||||
child: Text(
|
||||
"VIP特权",
|
||||
style: TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
))
|
||||
],
|
||||
));
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 18.sp),
|
||||
child: Text(
|
||||
"开通VIP后,才能查看更多附近的圈友,也可以根据您的喜好、属性、角色、取向等筛选出想要认识的人,还可以获得其他十几种会员特权,拥有更多不一样的体验",
|
||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
widget.logic.showRechargeDialog();
|
||||
},
|
||||
child: Center(
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 14.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 10.sp,
|
||||
horizontal: 55.sp,
|
||||
),
|
||||
child: const Text(
|
||||
"前往开通VIP",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
))
|
||||
],
|
||||
)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget ListItem(VicinityItemBean item, int index) {
|
||||
|
||||
@ -2,7 +2,7 @@ import 'dart:io';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
// import 'package:flutter_install_app/flutter_install_app.dart';
|
||||
import 'package:flutter_install_app/flutter_install_app.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
@ -260,7 +260,7 @@ class _CustomDialogState extends State<UpdateDialog> {
|
||||
// SmartDialog.dismiss();
|
||||
print(error);
|
||||
});
|
||||
// await AppInstaller.installApk(filePath, actionRequired: false);
|
||||
await AppInstaller.installApk(filePath, actionRequired: false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_bugly/flutter_bugly.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:tencent_chat_push_for_china/tencent_chat_push_for_china.dart';
|
||||
@ -147,6 +148,10 @@ class _CustomDialogState extends State<YesAgreementDialog> {
|
||||
uploadBuzIDAndToken();
|
||||
SmartDialog.dismiss();
|
||||
pushLoginPage();
|
||||
FlutterBugly.init(
|
||||
androidAppId: "8509314e11",
|
||||
iOSAppId: "51e7b4e472",
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
width: 240.sp,
|
||||
|
||||
@ -131,25 +131,27 @@ class HomeLogic extends GetxController {
|
||||
showOKToast(bean.msg);
|
||||
}
|
||||
getUnreadSize() async {
|
||||
V2TimValueCallback<int> getTotalUnreadMessageCountRes =
|
||||
await TencentImSDKPlugin.v2TIMManager
|
||||
.getConversationManager()
|
||||
.getTotalUnreadMessageCount();
|
||||
print("未读数量desc=" +
|
||||
getTotalUnreadMessageCountRes.desc.toString() +
|
||||
"code=" +
|
||||
getTotalUnreadMessageCountRes.code.toString() +
|
||||
"data=" +
|
||||
getTotalUnreadMessageCountRes.data.toString());
|
||||
try {
|
||||
V2TimValueCallback<int> getTotalUnreadMessageCountRes =
|
||||
await TencentImSDKPlugin.v2TIMManager
|
||||
.getConversationManager()
|
||||
.getTotalUnreadMessageCount();
|
||||
print("未读数量desc=" +
|
||||
getTotalUnreadMessageCountRes.desc.toString() +
|
||||
"code=" +
|
||||
getTotalUnreadMessageCountRes.code.toString() +
|
||||
"data=" +
|
||||
getTotalUnreadMessageCountRes.data.toString());
|
||||
|
||||
if (getTotalUnreadMessageCountRes.code == 0) {
|
||||
unreadSIze.value = getTotalUnreadMessageCountRes.data.toString();
|
||||
if (Platform.isAndroid) {
|
||||
setOfflinePushStatus(status: AppStatus.foreground);
|
||||
if (getTotalUnreadMessageCountRes.code == 0) {
|
||||
unreadSIze.value = getTotalUnreadMessageCountRes.data.toString();
|
||||
if (Platform.isAndroid) {
|
||||
setOfflinePushStatus(status: AppStatus.foreground);
|
||||
}
|
||||
} else {
|
||||
getUnreadSize();
|
||||
}
|
||||
} else {
|
||||
getUnreadSize();
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@ -459,8 +459,8 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
}
|
||||
});
|
||||
//自己的信息
|
||||
V2TimUserFullInfo myuserFullInfo =
|
||||
snapshot.data!.first;
|
||||
V2TimUserFullInfo myuserFullInfo =snapshot.data!.where((element) => element.userID! == model.selfInfoViewModel.loginInfo!.userID!).toList().first;
|
||||
|
||||
|
||||
if (userFullInfo!.customInfo!
|
||||
.containsKey('Label')) {
|
||||
|
||||
@ -4,6 +4,7 @@ import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:circle_app/app/circle/logic.dart';
|
||||
import 'package:circle_app/app/circle/view.dart';
|
||||
import 'package:circle_app/common/Widgets/open_vip_tip/view.dart';
|
||||
import 'package:circle_app/common/colors/app_color.dart';
|
||||
import 'package:circle_app/main.dart';
|
||||
import 'package:circle_app/network/api.dart';
|
||||
import 'package:circle_app/network/dio_manager.dart';
|
||||
@ -123,6 +124,40 @@ class MsgPage extends StatelessWidget {
|
||||
});
|
||||
}
|
||||
|
||||
String count = '0';
|
||||
if (logic != null) {
|
||||
count = (logic.statistics.value.likeMeCount ?? 0).toString();
|
||||
}
|
||||
|
||||
if (int.parse(count) > 0) {
|
||||
widgets.add(Positioned(
|
||||
left: 15.sp * i,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
getCircleImage('avatar_bg'),
|
||||
width: 30.sp,
|
||||
height: 30.sp,
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
width: 28.sp,
|
||||
height: 28.sp,
|
||||
child: Text(
|
||||
int.parse(count) > 99
|
||||
? '99+'
|
||||
: count,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: int.parse(count) > 99 ? 10.sp : 12.sp),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
return Container(
|
||||
width: Get.width,
|
||||
padding: EdgeInsets.only(left: 18.sp, right: 18.sp),
|
||||
@ -141,8 +176,7 @@ class MsgPage extends StatelessWidget {
|
||||
height: 30.sp,
|
||||
width: 30.0.sp +
|
||||
15.sp *
|
||||
(widgets.length -
|
||||
1.sp),
|
||||
(widgets.length),
|
||||
child: Stack(
|
||||
children: widgets,
|
||||
),
|
||||
|
||||
@ -27,31 +27,32 @@ class SplashLogic extends GetxController {
|
||||
super.onReady();
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
void onInit() async {
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
// await Future.delayed(Duration(seconds: 30));
|
||||
|
||||
var data1 =
|
||||
await DioManager.instance.get(url: Api.getCircleList, params: {});
|
||||
var bean1 = BaseResponse<ConfigBean>.fromJson(
|
||||
data1, (data1) => ConfigBean.fromJson(data1));
|
||||
if (bean1.code == 200) {
|
||||
configBean = bean1.data!;
|
||||
|
||||
configBean.genderMap.forEach((key, value) {
|
||||
genderList.add(value);
|
||||
});
|
||||
|
||||
configBean.orientationMap.forEach((key, value) {
|
||||
orientationList.add(value);
|
||||
});
|
||||
configBean.roleMap.forEach((key, value) {
|
||||
roleList.add(value);
|
||||
});
|
||||
}
|
||||
// var data1 =
|
||||
// await DioManager.instance.get(url: Api.getCircleList, params: {});
|
||||
// var bean1 = BaseResponse<ConfigBean>.fromJson(
|
||||
// data1, (data1) => ConfigBean.fromJson(data1));
|
||||
// if (bean1.code == 200) {
|
||||
// configBean = bean1.data!;
|
||||
//
|
||||
// configBean.genderMap.forEach((key, value) {
|
||||
// genderList.add(value);
|
||||
// });
|
||||
//
|
||||
// configBean.orientationMap.forEach((key, value) {
|
||||
// orientationList.add(value);
|
||||
// });
|
||||
// configBean.roleMap.forEach((key, value) {
|
||||
// roleList.add(value);
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
checkStatus() async {
|
||||
if ((await getAuthorization()).isEmpty) {
|
||||
if (Platform.isIOS) {
|
||||
pushLoginPage();
|
||||
|
||||
@ -99,7 +99,7 @@ class _SwiperPageState extends State<SwiperPage> {
|
||||
Container(
|
||||
// color: Colors.red,
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: logic.imgList[index],
|
||||
imageUrl: logic.imgList[index].toString().contains('?') ? logic.imgList[index].toString().split('?').first : logic.imgList[index].toString(),
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
|
||||
@ -4,6 +4,7 @@ import 'package:circle_app/common/Widgets/base_tip_widget.dart';
|
||||
import 'package:circle_app/common/colors/app_color.dart';
|
||||
import 'package:circle_app/common/const.dart';
|
||||
import 'package:circle_app/main.dart';
|
||||
import 'package:circle_app/view/notice.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -50,6 +51,9 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
@override
|
||||
void dispose() {
|
||||
_tabController.dispose();
|
||||
if (OverlayClass.overlayEntry != null) {
|
||||
OverlayClass.overlayEntry!.remove();
|
||||
}
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
||||
@ -44,6 +44,7 @@ class _AddWxTipState extends State<AddWxTip> {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
width:Get.width - 30.sp,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0x99000000),
|
||||
image: DecorationImage(
|
||||
|
||||
@ -174,6 +174,7 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
||||
} else {
|
||||
unlockingPayment(prices[selectedIndex].id.toString(), (){
|
||||
Get.back();
|
||||
showOKToast('微信号解锁成功');
|
||||
unLockWxSuccessResult(widget.userId);
|
||||
});
|
||||
}
|
||||
@ -269,20 +270,15 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
||||
width: 40.sp,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
gradient: AppColor.mainVerLinearGradient
|
||||
// shape: BoxShape.circle,
|
||||
// gradient: AppColor.mainVerLinearGradient
|
||||
),
|
||||
child: Text(
|
||||
'VIP',
|
||||
|
||||
style: TextStyle(color: Colors.white, fontSize: 12.sp,fontWeight: FontWeight.w500),
|
||||
child: Image.asset(
|
||||
getDisCoverImage('wx'), // Replace this with the actual image path
|
||||
width: 35.sp
|
||||
),
|
||||
),
|
||||
// Image.asset(
|
||||
// iconIv, // Replace this with the actual image path
|
||||
// width: 31.sp,
|
||||
// height: 29.sp,
|
||||
// ),
|
||||
|
||||
SizedBox(width: 8.sp),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
||||
@ -37,15 +37,22 @@ final TUIChatSeparateViewModel chatSeparateViewModel =
|
||||
TUIChatSeparateViewModel();
|
||||
|
||||
void main() {
|
||||
FlutterBugly.postCatchedException(() {
|
||||
FlutterBugly.postCatchedException(() async {
|
||||
// 如果需要 ensureInitialized,请在这里运行。
|
||||
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
|
||||
FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
|
||||
runApp(MyApp());
|
||||
FlutterBugly.init(
|
||||
androidAppId: "8509314e11",
|
||||
iOSAppId: "51e7b4e472",
|
||||
);
|
||||
if (Platform.isAndroid) {
|
||||
bool isAgreemement = await getAgreemement();
|
||||
if (isAgreemement) {
|
||||
FlutterBugly.init(
|
||||
androidAppId: "8509314e11",
|
||||
iOSAppId: "51e7b4e472",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
if (Platform.isAndroid) {
|
||||
getLostData();
|
||||
@ -104,8 +111,12 @@ loginIM(String userId, String sig) async {
|
||||
|
||||
//退出IM
|
||||
logoutIM() async {
|
||||
final result = await coreInstance.logout();
|
||||
print(result.desc + '退出IM');
|
||||
try {
|
||||
final result = await coreInstance.logout();
|
||||
print(result.desc + '退出IM');
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//获取设备Token,获取成功后开启离线推送
|
||||
|
||||
@ -65,14 +65,13 @@ void uploadImage(String quToken, XFile pickedFile, String updataRoute,
|
||||
}
|
||||
}
|
||||
|
||||
//if(isImageJpgOrPng(pickedFile.path)){
|
||||
if (false) {
|
||||
if(isImageJpgOrPng(pickedFile.path)){
|
||||
var path = await getApplicationSupportDirectoryPath();
|
||||
CompressObject compressObject = CompressObject(
|
||||
imageFile: File(pickedFile.path),
|
||||
path: path,
|
||||
quality: 80,
|
||||
step: 6,
|
||||
step: 9,
|
||||
mode: CompressMode.AUTO,
|
||||
);
|
||||
Luban.compressImage(compressObject).then((_path) {
|
||||
@ -86,8 +85,6 @@ void uploadImage(String quToken, XFile pickedFile, String updataRoute,
|
||||
SmartDialog.dismiss(force: true);
|
||||
});
|
||||
} else {
|
||||
// var path = await getApplicationSupportDirectoryPath();
|
||||
// String outputPath = path;
|
||||
uploadQiniu(pickedFile.path, pickedFile.name, updataRoute, quToken, (result) {
|
||||
myCallback(result);
|
||||
});
|
||||
|
||||
@ -309,7 +309,7 @@ class CustomLoadFooter extends StatelessWidget {
|
||||
canLoadingText: "松手开始加载数据",
|
||||
loadingText: "正在加载...",
|
||||
idleText: "上拉加载更多",
|
||||
noDataText: "没有更多数据了",
|
||||
noDataText: "只展示推荐的哦~",
|
||||
failedText: "加载失败",
|
||||
);
|
||||
}
|
||||
|
||||
@ -6,7 +6,9 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
typedef void NoticeCallback();
|
||||
|
||||
class OverlayClass {
|
||||
static OverlayEntry? overlayEntry;
|
||||
}
|
||||
|
||||
void showFloatingButtonOverlay(
|
||||
BuildContext context, String nickname, String ageMsg, String avatar,int event,NoticeCallback noticeCallback) {
|
||||
@ -20,7 +22,7 @@ void showFloatingButtonOverlay(
|
||||
late Timer countdownTimer;
|
||||
|
||||
// 创建 OverlayEntry
|
||||
overlayEntry = OverlayEntry(
|
||||
OverlayClass.overlayEntry = OverlayEntry(
|
||||
builder: (BuildContext context) {
|
||||
return Positioned(
|
||||
top: 30,
|
||||
@ -117,7 +119,11 @@ void showFloatingButtonOverlay(
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
countdownTimer.cancel(); // 取消计时器
|
||||
overlayEntry.remove();
|
||||
try {
|
||||
OverlayClass.overlayEntry!.remove();
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
noticeCallback();
|
||||
|
||||
// logic.setLike();
|
||||
@ -172,10 +178,16 @@ void showFloatingButtonOverlay(
|
||||
countdownSeconds--;
|
||||
// overlayEntry.markNeedsBuild(); // 刷新 OverlayEntry
|
||||
} else {
|
||||
timer.cancel(); // 取消计时器
|
||||
overlayEntry.remove(); // 移除 OverlayEntry
|
||||
timer.cancel();
|
||||
// 取消计时器
|
||||
|
||||
try {
|
||||
OverlayClass.overlayEntry!.remove();
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
// 将 OverlayEntry 添加到 Overlay 中
|
||||
overlayState?.insert(overlayEntry);
|
||||
overlayState?.insert(OverlayClass.overlayEntry!);
|
||||
}
|
||||
|
||||
@ -606,6 +606,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.3"
|
||||
flutter_install_app:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_install_app
|
||||
sha256: "9b117006d17c900e671c26bcbc9b15c7b8efd15d6f9b4442ad5d576de20fab53"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
flutter_intl:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
@ -93,7 +93,7 @@ dependencies:
|
||||
#event_bus:
|
||||
event_bus: ^2.0.0
|
||||
#安装apk
|
||||
# flutter_install_app: 1.3.0
|
||||
flutter_install_app: 1.3.0
|
||||
#闪屏页
|
||||
flutter_native_splash: 2.2.16
|
||||
#腾讯离线推送
|
||||
|
||||
Loading…
Reference in New Issue
Block a user