1.3.2代码提交
This commit is contained in:
parent
8ce0f58a77
commit
7b7f01ae93
@ -71,8 +71,8 @@ android {
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||
minSdkVersion 21
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode 24
|
||||
versionName "1.3.2"
|
||||
versionCode 22
|
||||
versionName "1.3.0"
|
||||
manifestPlaceholders = [
|
||||
vivo_APPID: "105669716",
|
||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 12 KiB |
@ -381,8 +381,8 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.2.6;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.circleApp;
|
||||
MARKETING_VERSION = 1.3.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.kyApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
@ -530,8 +530,8 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.2.6;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.circleApp;
|
||||
MARKETING_VERSION = 1.3.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.kyApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
@ -573,8 +573,8 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.2.6;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.circleApp;
|
||||
MARKETING_VERSION = 1.3.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.kyApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict/>
|
||||
<dict>
|
||||
<key>aps-environment</key>
|
||||
<string>development</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@ -493,6 +493,7 @@ class Circle {
|
||||
String ios_item;
|
||||
double amount;
|
||||
bool is_limit;
|
||||
bool is_top;
|
||||
double oldAmount;
|
||||
String lastCalloutTime;
|
||||
bool isJoin;
|
||||
@ -510,6 +511,7 @@ class Circle {
|
||||
required this.intro,
|
||||
required this.amount,
|
||||
required this.oldAmount,
|
||||
required this.is_top,
|
||||
required this.lastCalloutTime,
|
||||
required this.isJoin,
|
||||
required this.isLike,
|
||||
@ -529,6 +531,7 @@ class Circle {
|
||||
|
||||
return Circle(
|
||||
id: json['id'],
|
||||
is_top: json['is_top'] ?? false,
|
||||
is_limit: json['is_limit'] ?? false,
|
||||
image: json['image'] ?? '',
|
||||
ios_item: json['ios_item'] ?? '',
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -203,7 +203,7 @@ class UnlockCallDialog extends GetxController {
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'¥${int.parse(amount)}',
|
||||
'¥${double.parse(amount).toInt()}',
|
||||
style: TextStyle(
|
||||
color: Color(0xffE845FF),
|
||||
fontSize: 16.sp,
|
||||
@ -213,7 +213,7 @@ class UnlockCallDialog extends GetxController {
|
||||
width: 2.sp,
|
||||
),
|
||||
Text(
|
||||
'(原价${int.parse(oldAmount)})',
|
||||
'(原价${double.parse(oldAmount).toInt()})',
|
||||
style: TextStyle(
|
||||
color: Colors.white70,
|
||||
fontSize: 16.sp,
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -40,7 +40,16 @@ class HomeLogic extends GetxController {
|
||||
final RxString unreadSIze = "0".obs;
|
||||
|
||||
final RxBool showcirlceUnred = false.obs;
|
||||
late V2TimSimpleMsgListener msgListener;
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
// TODO: implement onClose
|
||||
super.onClose();
|
||||
TencentImSDKPlugin.v2TIMManager
|
||||
.v2TIMMessageManager.removeAdvancedMsgListener();
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
void onInit() async {
|
||||
@ -55,11 +64,15 @@ class HomeLogic extends GetxController {
|
||||
tabs.add(MsgPage());
|
||||
tabs.add(MinefragmentPage());
|
||||
|
||||
EventBusManager.on<RefreshUnread>().listen((event) {
|
||||
getUnreadSize();
|
||||
});
|
||||
// EventBusManager.on<RefreshUnread>().listen((event) {
|
||||
// getUnreadSize();
|
||||
// });
|
||||
getUnreadSize();
|
||||
var msgListener = V2TimSimpleMsgListener(onRecvC2CTextMessage: (
|
||||
|
||||
|
||||
|
||||
|
||||
msgListener = V2TimSimpleMsgListener(onRecvC2CTextMessage: (
|
||||
msgID,
|
||||
userInfo,
|
||||
text,
|
||||
@ -100,7 +113,7 @@ class HomeLogic extends GetxController {
|
||||
break;
|
||||
case 2://上线
|
||||
|
||||
String ageMsg = "${content['genderName']}·${content['age']}·${content['roleName']}·${content['orientationName']}";
|
||||
String ageMsg = "${content['genderName']}·${content['age']}·${content['roleName']}·${content['orientationName']}";
|
||||
|
||||
showFloatingButtonOverlay(Get.context!,content['nickname'],ageMsg,content['avatarThumb'],2,(){
|
||||
pushChatPage(content['id'].toString(), content['imId'],
|
||||
@ -113,6 +126,25 @@ class HomeLogic extends GetxController {
|
||||
});
|
||||
|
||||
|
||||
TencentImSDKPlugin.v2TIMManager
|
||||
.v2TIMMessageManager.addAdvancedMsgListener(
|
||||
listener: V2TimAdvancedMsgListener(
|
||||
onRecvNewMessage: (message) {
|
||||
print(message);
|
||||
if (message.elemType == MessageElemType.V2TIM_ELEM_TYPE_CUSTOM) {
|
||||
if ( message.customElem?.data != null) {
|
||||
print(message.customElem!.data!);
|
||||
Map jsonData = jsonDecode(message.customElem!.data!);
|
||||
String event = jsonData['event'].toString();
|
||||
if (int.parse(event) == 3) {
|
||||
showOKToast(message.customElem!.desc!.toString());
|
||||
EventBusManager.fire(LikeRefresh());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ class HomePage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _HomePageState extends State<HomePage>
|
||||
with AutomaticKeepAliveClientMixin,SingleTickerProviderStateMixin {
|
||||
with AutomaticKeepAliveClientMixin, SingleTickerProviderStateMixin {
|
||||
@override
|
||||
bool get wantKeepAlive => true;
|
||||
|
||||
@ -27,7 +27,11 @@ class _HomePageState extends State<HomePage>
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
logic.tabController = TabController(length: 4, vsync: this, initialIndex: 0,animationDuration: Duration.zero);
|
||||
logic.tabController = TabController(
|
||||
length: 4,
|
||||
vsync: this,
|
||||
initialIndex: 0,
|
||||
animationDuration: Duration.zero);
|
||||
}
|
||||
|
||||
@override
|
||||
@ -67,7 +71,7 @@ class _HomePageState extends State<HomePage>
|
||||
width: MediaQuery.of(context).size.width,
|
||||
// height:
|
||||
// Get.height - 49.sp + MediaQuery.of(context).padding.bottom,
|
||||
decoration: const BoxDecoration(image: bgWidget),
|
||||
decoration: const BoxDecoration(image: bgWidget),
|
||||
),
|
||||
TabBarView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
@ -94,7 +98,8 @@ class _HomePageState extends State<HomePage>
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
if (!isSelected) {
|
||||
logic.tabController.animateTo(index, duration: Duration(milliseconds: 0), curve: Curves.ease);
|
||||
logic.tabController.animateTo(index,
|
||||
duration: Duration(milliseconds: 0), curve: Curves.ease);
|
||||
controller.updateIndex(index);
|
||||
}
|
||||
},
|
||||
@ -113,24 +118,24 @@ class _HomePageState extends State<HomePage>
|
||||
gaplessPlayback: true,
|
||||
))),
|
||||
// if (logic.showcirlceUnred.value && index == 1)
|
||||
Obx(() => Visibility(
|
||||
visible: index == 1 && controller.showcirlceUnred.value,
|
||||
child: Positioned(
|
||||
// right: 4.sp,
|
||||
top: 10.sp,
|
||||
child: Container(
|
||||
|
||||
width: 14.sp,
|
||||
height: 14.sp,
|
||||
margin: EdgeInsets.only(
|
||||
left:24.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(7.sp),
|
||||
gradient: LinearGradient(
|
||||
colors: controller.showcirlceUnred.value ? [Color(0xFFC343F9), Color(0xFFFB34B2)] : [Color(0xFFC343F9), Color(0xFFFB34B2)]),
|
||||
border:
|
||||
Border.all(color: Color(0xFF170730), width: 1.sp))),
|
||||
))),
|
||||
Obx(() => Visibility(
|
||||
visible: index == 1 && controller.showcirlceUnred.value,
|
||||
child: Positioned(
|
||||
// right: 4.sp,
|
||||
top: 10.sp,
|
||||
child: Container(
|
||||
width: 14.sp,
|
||||
height: 14.sp,
|
||||
margin: EdgeInsets.only(left: 24.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(7.sp),
|
||||
gradient: LinearGradient(
|
||||
colors: controller.showcirlceUnred.value
|
||||
? [Color(0xFFC343F9), Color(0xFFFB34B2)]
|
||||
: [Color(0xFFC343F9), Color(0xFFFB34B2)]),
|
||||
border:
|
||||
Border.all(color: Color(0xFF170730), width: 1.sp))),
|
||||
))),
|
||||
// Obx(() => null)
|
||||
Obx(() => Visibility(
|
||||
visible: index == 2 && controller.unreadSIze != "0",
|
||||
|
||||
@ -155,6 +155,17 @@ class LikeLogic extends GetxController {
|
||||
showOKToast(bean.msg);
|
||||
}
|
||||
|
||||
setTopCircle(String interest_id,bool isStatus) async {
|
||||
var data = await DioManager.instance.post(
|
||||
url: Api.circleTop,
|
||||
params: {"interestId": interest_id,'isTop' :isStatus ? 1 : 0});
|
||||
var bean = BaseResponse<String>.fromJson(data, (data) => data);
|
||||
if (bean.code == 200) {
|
||||
relaodMyData();
|
||||
}
|
||||
showOKToast(bean.msg);
|
||||
}
|
||||
|
||||
|
||||
loadCalloutsNew() async {
|
||||
List<String> idList = [];
|
||||
|
||||
@ -1,9 +1,13 @@
|
||||
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:circle_app/app/circle/logic.dart';
|
||||
import 'package:circle_app/app/circle/widgets/info_list_view.dart';
|
||||
import 'package:circle_app/app/select_circle/logic.dart';
|
||||
import 'package:circle_app/common/Widgets/circle_share.dart';
|
||||
import 'package:circle_app/common/Widgets/text_more.dart';
|
||||
import 'package:circle_app/main.dart';
|
||||
import 'package:circle_app/network/dio_manager.dart';
|
||||
import 'package:circle_app/router/app_routers.dart';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@ -12,11 +16,48 @@ import 'package:get/get.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
class LikePage extends StatelessWidget {
|
||||
class LikePage extends StatefulWidget {
|
||||
LikePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<LikePage> createState() => _LikePageState();
|
||||
}
|
||||
|
||||
class _LikePageState extends State<LikePage> with RouteAware {
|
||||
final ctr = Get.lazyPut(() => LikeLogic());
|
||||
|
||||
final logic = Get.find<LikeLogic>();
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
// TODO: implement didChangeDependencies
|
||||
super.didChangeDependencies();
|
||||
|
||||
/// 路由订阅
|
||||
routeObserver.subscribe(this, ModalRoute.of(context) as PageRoute);
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
routeObserver.unsubscribe(this);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void didPopNext() {
|
||||
print('didPopNext');
|
||||
logic.loadMyCircleData();
|
||||
}
|
||||
|
||||
///当前页面进入时触发
|
||||
void didPush() {
|
||||
print('didPopNext');
|
||||
|
||||
}
|
||||
void didPop() {
|
||||
print('didPop');
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@ -70,7 +111,8 @@ class LikePage extends StatelessWidget {
|
||||
logic.currentIndex,
|
||||
logic.mycircle.lists[logic.currentIndex],
|
||||
logic,
|
||||
key: ValueKey('${logic.mycircle.lists[logic.currentIndex].id.toString() + logic.currentIndex.toString()}'),
|
||||
key: ValueKey(
|
||||
'${logic.mycircle.lists[logic.currentIndex].id.toString() + logic.currentIndex.toString()}'),
|
||||
)))
|
||||
],
|
||||
),
|
||||
@ -91,7 +133,7 @@ class LikePage extends StatelessWidget {
|
||||
child: ListView.builder(
|
||||
controller: logic.rightCtr,
|
||||
itemBuilder: (context, index) {
|
||||
return circleInfoItem(logic.circle.lists[index]);
|
||||
return circleInfoItem(logic.circle.lists[index],index);
|
||||
},
|
||||
itemCount: logic.circle.lists.length,
|
||||
)),
|
||||
@ -112,7 +154,7 @@ class LikePage extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
circleInfoItem(Circle bean) {
|
||||
circleInfoItem(Circle bean,int index) {
|
||||
List<JoinUser> urlList = bean.lastJoinUsers;
|
||||
List<Widget> widgets = [];
|
||||
int i = 0;
|
||||
@ -133,10 +175,20 @@ class LikePage extends StatelessWidget {
|
||||
});
|
||||
}
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
// if (bean.isJoin) {
|
||||
Get.toNamed(AppRoutes.Signal_circle_list, arguments: bean.id);
|
||||
// }
|
||||
onTap: () async {
|
||||
var result = await Get.toNamed(AppRoutes.Signal_circle_list, arguments: bean.id);
|
||||
var data = await DioManager.instance.get(
|
||||
url: "/up-service/interest/${bean.id}",);
|
||||
if (data["code"] == 200) {
|
||||
var bean = Circle.fromJson(data['data']);
|
||||
logic.circle.lists[index] = bean;
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 10.sp),
|
||||
@ -261,9 +313,9 @@ class LikePage extends StatelessWidget {
|
||||
additionText: '查看更多',
|
||||
maxLines: 3,
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||
TextStyle(color: Colors.white, fontSize: 17.sp),
|
||||
additionStyle: TextStyle(
|
||||
color: const Color(0xFFFF4DF6), fontSize: 14.sp),
|
||||
color: const Color(0xFFFF4DF6), fontSize: 17.sp),
|
||||
onTap: () {
|
||||
_showTextContentDialog(
|
||||
Get.context!, bean.intro, bean.title);
|
||||
@ -365,6 +417,27 @@ class LikePage extends StatelessWidget {
|
||||
logic.update();
|
||||
}
|
||||
},
|
||||
onLongPress: () {
|
||||
if (index >= 0) {
|
||||
int count = 0;
|
||||
for(int i = 0; i < logic.mycircle.lists.length; i++) {
|
||||
if (logic.mycircle.lists[i].is_top) {
|
||||
count++;
|
||||
}
|
||||
if (count == 5 || i > 5) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (count == 5 && !logic.mycircle.lists[index].is_top) {
|
||||
showOKToast('圈子置顶最多五个哦~');
|
||||
} else {
|
||||
_showSetTopCircleDialog(Get.context!,logic,logic.mycircle.lists[index]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
width: 65.sp,
|
||||
height: 65.sp,
|
||||
@ -373,31 +446,35 @@ class LikePage extends StatelessWidget {
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
if (text.isEmpty)
|
||||
Image.asset(
|
||||
getCircleImage('circile_all_icon'),
|
||||
width: 55.sp,
|
||||
),
|
||||
topCicleStatusItem(
|
||||
isSelcted,
|
||||
Image.asset(
|
||||
getCircleImage('circile_all_icon'),
|
||||
width: 55.sp,
|
||||
)),
|
||||
if (text.isNotEmpty)
|
||||
Container(
|
||||
margin: EdgeInsets.all(6.sp),
|
||||
// padding: EdgeInsets.only(left: 4.sp),
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.all(6.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(7.sp),
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFF3F6967), Color(0xFF5C3769)])),
|
||||
child: Text(
|
||||
text,
|
||||
maxLines: 2,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 13.sp,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
fontWeight: FontWeight.w600),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
cicleStatusItem(
|
||||
isSelcted,
|
||||
Container(
|
||||
// margin: EdgeInsets.all(6.sp),
|
||||
// padding: EdgeInsets.only(left: 4.sp),
|
||||
alignment: Alignment.center,
|
||||
// padding: EdgeInsets.all(6.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(7.sp),
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFF3F6967), Color(0xFF5C3769)])),
|
||||
child: Text(
|
||||
text,
|
||||
maxLines: 2,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 13.sp,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
fontWeight: FontWeight.w600),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
)),
|
||||
if (isUnread)
|
||||
Positioned(
|
||||
right: 6.sp,
|
||||
@ -406,7 +483,7 @@ class LikePage extends StatelessWidget {
|
||||
width: 15.sp,
|
||||
height: 15.sp,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
shape: BoxShape.circle,
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFFC343F9), Color(0xFFFB34B2)]),
|
||||
border:
|
||||
@ -418,6 +495,77 @@ class LikePage extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
cicleStatusItem(bool isSelected, Widget widget) {
|
||||
return Container(
|
||||
width: 48.sp,
|
||||
height: 48.sp,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(7.0),
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: isSelected
|
||||
? [
|
||||
Color(0xFF71F3F2),
|
||||
Color(0xFFF558FF),
|
||||
]
|
||||
: [
|
||||
Colors.transparent,
|
||||
Colors.transparent,
|
||||
],
|
||||
stops: [0.0365, 0.9427],
|
||||
),
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(7.0),
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(isSelected ? 1.sp : 0.sp),
|
||||
color: Color(0x14022AFF),
|
||||
child: widget,
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
topCicleStatusItem(bool isSelected, Widget widget) {
|
||||
return Container(
|
||||
alignment: Alignment.center,
|
||||
width: 48.sp,
|
||||
height: 48.sp,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(7.0),
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: isSelected
|
||||
? [
|
||||
Color(0xFF71F3F2),
|
||||
Color(0xFFF558FF),
|
||||
]
|
||||
: [
|
||||
Colors.transparent,
|
||||
Colors.transparent,
|
||||
],
|
||||
stops: [0.0365, 0.9427],
|
||||
),
|
||||
),
|
||||
child: Container(
|
||||
width: 47.sp,
|
||||
height: 47.sp,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(7.sp),
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFF3F6967), Color(0xFF5C3769)])),
|
||||
// padding: EdgeInsets.all(isSelected ? 1.sp : 0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(7.0),
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(isSelected ? 1.sp : 0.sp),
|
||||
color: Color(0x14022AFF),
|
||||
child: widget,
|
||||
))),
|
||||
);
|
||||
}
|
||||
|
||||
void _showTextContentDialog(BuildContext context, String msg, String title) {
|
||||
showDialog(
|
||||
context: context,
|
||||
@ -498,4 +646,140 @@ class LikePage extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
void _showSetTopCircleDialog(BuildContext context, var controller, var bean) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return Dialog(
|
||||
backgroundColor: Colors.transparent,
|
||||
child: Container(
|
||||
height: 160.sp,
|
||||
padding: EdgeInsets.all(1.0),
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.all(1.sp),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFF4C3E5F), Color(0xFF324140)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 24.sp),
|
||||
child: Column(
|
||||
children: [
|
||||
Center(
|
||||
child: Text(
|
||||
"提示",
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 12.sp, left: 14.sp, right: 14.sp),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
bean.is_top ? "是否取消置顶该圈子。" : "是否置顶该圈子。",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 30.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Color(0x26FFFFFF),
|
||||
Color(0x26FFFFFF),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(
|
||||
top: 10.sp,
|
||||
bottom: 10.sp,
|
||||
left: 52.sp,
|
||||
right: 52.sp),
|
||||
child: Text(
|
||||
"否",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 24.sp),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
logic.setTopCircle(bean.id.toString(), !bean.is_top);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 24.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(
|
||||
top: 10.sp,
|
||||
bottom: 10.sp,
|
||||
left: 52.sp,
|
||||
right: 52.sp),
|
||||
child: Text(
|
||||
"是",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_slidable_for_tencent_im/flutter_slidable.dart';
|
||||
@ -41,9 +42,8 @@ class TIMConversation extends StatefulWidget {
|
||||
|
||||
/// conversation controller
|
||||
final TIMUIKitConversationController? controller;
|
||||
|
||||
final AutoScrollController? autoScrollController;
|
||||
|
||||
final AutoScrollController? autoScrollController;
|
||||
|
||||
final ScrollController? scrollController;
|
||||
|
||||
@ -84,7 +84,7 @@ class TIMConversation extends StatefulWidget {
|
||||
this.controller,
|
||||
this.autoScrollController,
|
||||
this.itemSecondaryMenuBuilder,
|
||||
this.scrollController,
|
||||
this.scrollController,
|
||||
this.itemBuilder,
|
||||
this.isShowDraft = true,
|
||||
this.itemSlideBuilder,
|
||||
@ -160,21 +160,30 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
serviceLocator<TUIConversationViewModel>();
|
||||
late TIMUIKitConversationController _timuiKitConversationController;
|
||||
final TUIThemeViewModel themeViewModel = serviceLocator<TUIThemeViewModel>();
|
||||
final TUIFriendShipViewModel friendShipViewModel =
|
||||
serviceLocator<TUIFriendShipViewModel>();
|
||||
|
||||
// final TUIFriendShipViewModel friendShipViewModel =
|
||||
// serviceLocator<TUIFriendShipViewModel>();
|
||||
|
||||
bool hasMore = true;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
final controller = getController();
|
||||
widget.scrollController!.addListener(() {
|
||||
|
||||
try {
|
||||
if (widget.scrollController!.position.pixels ==
|
||||
widget.scrollController!.position.maxScrollExtent && hasMore) {
|
||||
_timuiKitConversationController.loadData();
|
||||
}
|
||||
} catch (_) {}
|
||||
});
|
||||
_timuiKitConversationController = controller;
|
||||
_timuiKitConversationController.model = model;
|
||||
}
|
||||
|
||||
scrollToTop() {
|
||||
widget.autoScrollController!.animateTo(
|
||||
0.0, // Scroll to the top
|
||||
0, // Scroll to the top
|
||||
duration: Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOut,
|
||||
);
|
||||
@ -191,10 +200,10 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
model.setSelectedConversation(conversation);
|
||||
}
|
||||
|
||||
_clearHistory(V2TimConversation conversationItem) async{
|
||||
await _timuiKitConversationController.clearHistoryMessage(
|
||||
_clearHistory(V2TimConversation conversationItem) async {
|
||||
await _timuiKitConversationController.clearHistoryMessage(
|
||||
conversation: conversationItem);
|
||||
await Future.delayed(Duration(seconds: 1));
|
||||
await Future.delayed(Duration(seconds: 1));
|
||||
EventBusManager.fire(RefreshUnread());
|
||||
}
|
||||
|
||||
@ -204,8 +213,8 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
isPinned: !conversation.isPinned!);
|
||||
}
|
||||
|
||||
_deleteConversation(V2TimConversation conversation) async{
|
||||
await _timuiKitConversationController.deleteConversation(
|
||||
_deleteConversation(V2TimConversation conversation) async {
|
||||
await _timuiKitConversationController.deleteConversation(
|
||||
conversationID: conversation.conversationID);
|
||||
await Future.delayed(Duration(seconds: 1));
|
||||
EventBusManager.fire(RefreshUnread());
|
||||
@ -217,15 +226,15 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
(element) => (element?.groupID != null || element?.userID != null))
|
||||
.toList();
|
||||
|
||||
// 过滤指定的 userID
|
||||
// 过滤指定的 userID qpqz_prod_10_10000000000
|
||||
String devtTargetUserID = "qpqz_dev_10_10000000000";
|
||||
String prodTargetUserID = "qpqz_dev_10_10000000000";
|
||||
String prodTargetUserID = "qpqz_prod_10_10000000000";
|
||||
filteredConversationList = filteredConversationList
|
||||
.where((conversation) =>
|
||||
conversation?.userID != devtTargetUserID ||conversation?.userID != prodTargetUserID)
|
||||
conversation?.userID != devtTargetUserID &&
|
||||
conversation?.userID != prodTargetUserID)
|
||||
.toList();
|
||||
|
||||
|
||||
if (widget.conversationCollector != null) {
|
||||
filteredConversationList = filteredConversationList
|
||||
.where(widget.conversationCollector!)
|
||||
@ -384,14 +393,12 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
return MultiProvider(
|
||||
providers: [
|
||||
ChangeNotifierProvider.value(value: model),
|
||||
ChangeNotifierProvider.value(value: friendShipViewModel)
|
||||
// ChangeNotifierProvider.value(value: friendShipViewModel)
|
||||
],
|
||||
builder: (BuildContext context, Widget? w) {
|
||||
final _model = Provider.of<TUIConversationViewModel>(context);
|
||||
bool haveMoreData = _model.haveMoreData;
|
||||
final _friendShipViewModel =
|
||||
Provider.of<TUIFriendShipViewModel>(context);
|
||||
_model.lifeCycle = widget.lifeCycle;
|
||||
hasMore = _model.haveMoreData;
|
||||
// _model.lifeCycle = widget.lifeCycle;
|
||||
|
||||
List<V2TimConversation?> filteredConversationList =
|
||||
getFilteredConversation();
|
||||
@ -413,31 +420,43 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
future: getUserListInfo(userIdList),
|
||||
builder: (BuildContext context,
|
||||
AsyncSnapshot<List<V2TimUserFullInfo>> snapshot) {
|
||||
// if (snapshot.connectionState != ConnectionState.done ||
|
||||
// haveMoreData) {
|
||||
// if (haveMoreData) {
|
||||
// _timuiKitConversationController.loadData();
|
||||
// }
|
||||
//
|
||||
// return Container();
|
||||
// }
|
||||
|
||||
return ListView.builder(
|
||||
controller: widget.scrollController!,
|
||||
shrinkWrap: true,
|
||||
itemCount: filteredConversationList.length,
|
||||
itemBuilder: (context, index) {
|
||||
if (index == filteredConversationList.length - 1) {
|
||||
if (haveMoreData) {
|
||||
_timuiKitConversationController.loadData();
|
||||
}
|
||||
}
|
||||
// if (index == filteredConversationList.length - 1) {
|
||||
// if (haveMoreData) {
|
||||
// loaddingWidget(true);
|
||||
// // _timuiKitConversationController.loadData();
|
||||
// } else {
|
||||
// return Container();
|
||||
// }
|
||||
// }
|
||||
|
||||
final conversationItem =
|
||||
filteredConversationList[index];
|
||||
|
||||
final V2TimUserStatus? onlineStatus =
|
||||
_friendShipViewModel.userStatusList.firstWhere(
|
||||
(item) =>
|
||||
item.userID == conversationItem?.userID,
|
||||
orElse: () =>
|
||||
V2TimUserStatus(statusType: 0));
|
||||
// final V2TimUserStatus? onlineStatus =
|
||||
// _friendShipViewModel.userStatusList.firstWhere(
|
||||
// (item) =>
|
||||
// item.userID == conversationItem?.userID,
|
||||
// orElse: () =>
|
||||
// V2TimUserStatus(statusType: 0));
|
||||
|
||||
if (widget.itemBuilder != null) {
|
||||
return widget.itemBuilder!(
|
||||
conversationItem!, onlineStatus);
|
||||
}
|
||||
// if (widget.itemBuilder != null) {
|
||||
// return widget.itemBuilder!(
|
||||
// conversationItem!, onlineStatus);
|
||||
// }
|
||||
|
||||
final slideChildren =
|
||||
_getSlideBuilder()(conversationItem!);
|
||||
@ -454,28 +473,38 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
ConnectionState.done) {
|
||||
if ((snapshot.data ?? []).isNotEmpty) {
|
||||
snapshot.data!.forEach((element) {
|
||||
if (element.userID == conversationItem.userID) {
|
||||
if (element.userID ==
|
||||
conversationItem.userID) {
|
||||
userFullInfo = element;
|
||||
}
|
||||
});
|
||||
//自己的信息
|
||||
V2TimUserFullInfo myuserFullInfo =snapshot.data!.where((element) => element.userID! == model.selfInfoViewModel.loginInfo!.userID!).toList().first;
|
||||
|
||||
V2TimUserFullInfo myuserFullInfo = snapshot
|
||||
.data!
|
||||
.where((element) =>
|
||||
element.userID! ==
|
||||
model.selfInfoViewModel.loginInfo!
|
||||
.userID!)
|
||||
.toList()
|
||||
.first;
|
||||
|
||||
if (userFullInfo!.customInfo!
|
||||
.containsKey('Label')) {
|
||||
var otherInfo = jsonDecode(userFullInfo!
|
||||
if (userFullInfo!
|
||||
.customInfo!['Label']
|
||||
.toString());
|
||||
Map myInfo = jsonDecode(myuserFullInfo!
|
||||
.customInfo!['Label']
|
||||
.toString());
|
||||
if (myInfo != null) {
|
||||
if (myInfo.containsKey('city')) {
|
||||
if (myInfo['city']
|
||||
.toString()
|
||||
.contains(otherInfo['city'].toString())) {
|
||||
isSameCity = true;
|
||||
.toString().isNotEmpty) {
|
||||
var otherInfo = jsonDecode(userFullInfo!
|
||||
.customInfo!['Label']
|
||||
.toString());
|
||||
Map myInfo = jsonDecode(myuserFullInfo!
|
||||
.customInfo!['Label']
|
||||
.toString());
|
||||
if (myInfo != null) {
|
||||
if (myInfo.containsKey('city')) {
|
||||
if (myInfo['city'].toString().contains(
|
||||
otherInfo['city'].toString())) {
|
||||
isSameCity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -483,7 +512,7 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
|
||||
if (userFullInfo != null) {
|
||||
List<String> userIdList =
|
||||
userFullInfo!.userID!.split('_');
|
||||
userFullInfo!.userID!.split('_');
|
||||
if (userIdList.length >= 4) {
|
||||
if (int.parse(userIdList[2]) == 10) {
|
||||
isOfficial = true;
|
||||
@ -493,7 +522,6 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Widget conversationLineItem() {
|
||||
@ -524,7 +552,7 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
conversationItem.userID != null &&
|
||||
conversationItem
|
||||
.userID!.isNotEmpty)
|
||||
? onlineStatus
|
||||
? null
|
||||
: null,
|
||||
draftTimestamp:
|
||||
conversationItem.draftTimestamp,
|
||||
@ -590,20 +618,18 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
? widget.emptyBuilder!()
|
||||
: Container());
|
||||
}
|
||||
|
||||
return TUIKitScreenUtils.getDeviceWidget(
|
||||
// EasyRefresh(
|
||||
// header: CustomizeBallPulseHeader(color: theme.primaryColor),
|
||||
// onRefresh: () async {
|
||||
// model.refresh();
|
||||
// },
|
||||
// child:
|
||||
return TUIKitScreenUtils.getDeviceWidget(
|
||||
defaultWidget: SlidableAutoCloseBehavior(
|
||||
child: EasyRefresh(
|
||||
header: CustomizeBallPulseHeader(color: theme.primaryColor),
|
||||
onRefresh: () async {
|
||||
model.refresh();
|
||||
},
|
||||
child:SingleChildScrollView(
|
||||
controller: widget.scrollController,
|
||||
child: conversationList(),
|
||||
),
|
||||
child: conversationList(),
|
||||
|
||||
),
|
||||
),
|
||||
|
||||
desktopWidget: Scrollbar(
|
||||
controller: widget.autoScrollController!,
|
||||
child: conversationList()));
|
||||
|
||||
@ -3,17 +3,20 @@ import 'package:circle_app/network/api.dart';
|
||||
import 'package:circle_app/network/dio_manager.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
import 'state.dart';
|
||||
|
||||
class MsgLogic extends GetxController {
|
||||
final MsgState state = MsgState();
|
||||
List<UserListItem> lists = [];
|
||||
|
||||
ScrollController listScrollController = ScrollController();
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
// TODO: implement onInit
|
||||
super.onInit();
|
||||
|
||||
loadLikeData();
|
||||
}
|
||||
loadLikeData() async {
|
||||
|
||||
@ -23,12 +23,16 @@ import 'logic.dart';
|
||||
const msgBgWidget = DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
image: AssetImage('assets/images/base/home_back.png'));
|
||||
class MsgPage extends StatelessWidget {
|
||||
class MsgPage extends StatefulWidget {
|
||||
MsgPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MsgPage> createState() => _MsgPageState();
|
||||
}
|
||||
|
||||
class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
||||
final ctr = Get.put(MsgLogic());
|
||||
|
||||
|
||||
var logic = Get.find<CircleLogic>();
|
||||
void getPipeiData() async {
|
||||
var data = await DioManager.instance
|
||||
.get(url: Api.getMatch);
|
||||
@ -46,7 +50,6 @@ class MsgPage extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
showRechargeDialog(){
|
||||
Get.bottomSheet(
|
||||
Scaffold(
|
||||
@ -73,7 +76,19 @@ class MsgPage extends StatelessWidget {
|
||||
// tipWidget(),
|
||||
// reconmandWidget(),
|
||||
// Text(controller.state.msg),
|
||||
Expanded(child: msgWdiget(context))
|
||||
Expanded(child: TIMConversation(
|
||||
autoScrollController: logic.scrollController,
|
||||
scrollController: logic.listScrollController,
|
||||
onTapItem: (selectedConv) async{
|
||||
String type = selectedConv.userID!.split('_')[2];
|
||||
if (int.parse(type) == 11) {
|
||||
Get.toNamed(AppRoutes.Sys_notify_list, arguments: selectedConv);
|
||||
return;
|
||||
}
|
||||
Get.toNamed(AppRoutes.Chat, arguments: selectedConv);
|
||||
|
||||
},
|
||||
))
|
||||
],
|
||||
);
|
||||
}),
|
||||
@ -371,4 +386,8 @@ class MsgPage extends StatelessWidget {
|
||||
Widget msgItem(conv, status) {
|
||||
return Container();
|
||||
}
|
||||
|
||||
@override
|
||||
// TODO: implement wantKeepAlive
|
||||
bool get wantKeepAlive => true;
|
||||
}
|
||||
|
||||
@ -504,140 +504,5 @@ class _My_circlePageState extends State<My_circlePage>
|
||||
);
|
||||
}
|
||||
|
||||
void _showOutCircleDialog(BuildContext context, var controller, Circle bean) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return Dialog(
|
||||
backgroundColor: Colors.transparent,
|
||||
child: Container(
|
||||
height: 160.sp,
|
||||
padding: EdgeInsets.all(1.0),
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.all(1.sp),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFF4C3E5F), Color(0xFF324140)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 24.sp),
|
||||
child: Column(
|
||||
children: [
|
||||
Center(
|
||||
child: Text(
|
||||
"提示",
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 12.sp, left: 14.sp, right: 14.sp),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
"是否确认退出该圈子。",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 30.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Color(0x26FFFFFF),
|
||||
Color(0x26FFFFFF),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(
|
||||
top: 10.sp,
|
||||
bottom: 10.sp,
|
||||
left: 52.sp,
|
||||
right: 52.sp),
|
||||
child: Text(
|
||||
"否",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 24.sp),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
logic.outCircle(bean.id.toString(), bean.isJoin);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 24.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(
|
||||
top: 10.sp,
|
||||
bottom: 10.sp,
|
||||
left: 52.sp,
|
||||
right: 52.sp),
|
||||
child: Text(
|
||||
"是",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -272,8 +272,8 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
borderRadius: BorderRadius.circular(17.sp),
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0x26FFFFFF),
|
||||
Color(0x26FFFFFF),
|
||||
Color(0xaaDC5BFD),
|
||||
Color(0xaa06F9FA),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
|
||||
@ -33,6 +33,9 @@ import 'package:tencent_chat_push_for_china/tencent_chat_push_for_china.dart';
|
||||
import 'app/login/login/logic.dart';
|
||||
import 'app/splash/view.dart';
|
||||
|
||||
///定义全局的 routeObserver 对象
|
||||
final RouteObserver<PageRoute> routeObserver = RouteObserver();
|
||||
|
||||
final CoreServicesImpl coreInstance = TIMUIKitCore.getInstance();
|
||||
final TUIChatSeparateViewModel chatSeparateViewModel =
|
||||
TUIChatSeparateViewModel();
|
||||
@ -524,6 +527,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
||||
Locale('en', 'US'),
|
||||
],
|
||||
home: SplashPage(),
|
||||
navigatorObservers: [routeObserver],
|
||||
builder: FlutterSmartDialog.init(),
|
||||
debugShowCheckedModeBanner: false,
|
||||
)));
|
||||
|
||||
@ -303,6 +303,7 @@ class Api {
|
||||
//获取多个圈子是否有新喊话
|
||||
static const calloutsNew = '/up-service/interests/callouts/new';
|
||||
|
||||
|
||||
//是否置顶圈子
|
||||
static const circleTop = '/up-service/interest/top';
|
||||
|
||||
}
|
||||
@ -62,4 +62,9 @@ class ScrollToTop {
|
||||
|
||||
class RefreshUnread {
|
||||
|
||||
}
|
||||
|
||||
|
||||
class LikeRefresh {
|
||||
|
||||
}
|
||||
@ -315,6 +315,24 @@ class CustomLoadFooter extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class CustomLikeLoadFooter extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ClassicFooter(
|
||||
// 自定义加载更多时的文字
|
||||
canLoadingText: "松手开始加载数据",
|
||||
loadingText: "正在加载...",
|
||||
idleText: "上拉加载更多",
|
||||
noDataText: "",
|
||||
height: 20.sp,
|
||||
spacing: 5,
|
||||
failedText: "加载失败",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 获取应用程序的文档目录路径
|
||||
Future<String> getApplicationDocumentsDirectoryPath() async {
|
||||
final directory = await getApplicationDocumentsDirectory();
|
||||
|
||||
@ -170,7 +170,7 @@ void showFloatingButtonOverlay(
|
||||
countdownTimer = Timer.periodic(Duration(seconds: 1), (timer) {
|
||||
if (countdownSeconds > 0) {
|
||||
countdownSeconds--;
|
||||
// overlayEntry.markNeedsBuild(); // 刷新 OverlayEntry
|
||||
// overlayEntry.markNeedsBuild(); // 刷新 OverlayEntry
|
||||
} else {
|
||||
timer.cancel();
|
||||
// 取消计时器
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -95,7 +95,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