安卓1.3.5代码提交
This commit is contained in:
parent
07a4c42cde
commit
7478f85bbb
@ -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 26
|
||||
versionName "1.3.3"
|
||||
versionCode 27
|
||||
versionName "1.3.5"
|
||||
manifestPlaceholders = [
|
||||
vivo_APPID: "105669716",
|
||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||
|
||||
@ -59,97 +59,102 @@ class _ChatGiftPannelState extends State<ChatGiftPannel>
|
||||
height: Get.height,
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(child: Container()),
|
||||
Expanded(child:GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Container())),
|
||||
Container(
|
||||
// color: Color(0xFF423055),
|
||||
child: SafeArea(
|
||||
top: false,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF423055),
|
||||
borderRadius: BorderRadius.only(topLeft: Radius.circular(16.sp,),topRight: Radius.circular(16.sp))
|
||||
),
|
||||
width: Get.width,
|
||||
height: 370.sp,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(height: 5.sp,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
height: 30.sp,
|
||||
width:120.sp,
|
||||
margin: EdgeInsets.only(left: 5.sp,),
|
||||
child: TabBar(
|
||||
isScrollable: false,
|
||||
automaticIndicatorColorAdjustment: false,
|
||||
labelPadding: EdgeInsets.symmetric(horizontal: 4.0.sp),
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
indicatorColor: AppColor.mainColor,
|
||||
indicatorSize: TabBarIndicatorSize.label,
|
||||
unselectedLabelStyle: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
child: SafeArea(
|
||||
top: false,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF423055),
|
||||
borderRadius: BorderRadius.only(topLeft: Radius.circular(16.sp,),topRight: Radius.circular(16.sp))
|
||||
),
|
||||
width: Get.width,
|
||||
height: 370.sp,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(height: 5.sp,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
height: 30.sp,
|
||||
width:120.sp,
|
||||
margin: EdgeInsets.only(left: 5.sp,),
|
||||
child: TabBar(
|
||||
isScrollable: false,
|
||||
automaticIndicatorColorAdjustment: false,
|
||||
labelPadding: EdgeInsets.symmetric(horizontal: 4.0.sp),
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
indicatorColor: AppColor.mainColor,
|
||||
indicatorSize: TabBarIndicatorSize.label,
|
||||
unselectedLabelStyle: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
unselectedLabelColor: Color(0xB3FFFFFF),
|
||||
labelColor: AppColor.mainColor,
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16.sp, fontWeight: FontWeight.w500),
|
||||
controller: tabController,
|
||||
tabs: const <Widget>[
|
||||
Tab(
|
||||
text: '礼物',
|
||||
),
|
||||
Tab(
|
||||
text: '会员',
|
||||
),
|
||||
],
|
||||
),
|
||||
unselectedLabelColor: Color(0xB3FFFFFF),
|
||||
labelColor: AppColor.mainColor,
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16.sp, fontWeight: FontWeight.w500),
|
||||
controller: tabController,
|
||||
tabs: const <Widget>[
|
||||
Tab(
|
||||
text: '礼物',
|
||||
),
|
||||
Tab(
|
||||
text: '会员',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
tabController.index == 0 ? Container(
|
||||
margin: EdgeInsets.only(right: 15.sp),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
String toUserId = widget.accid!.split('_').last;
|
||||
Get.toNamed(AppRoutes.GiftShopPage,arguments: toUserId);
|
||||
},
|
||||
child: Container(
|
||||
height:22.sp,
|
||||
width: 62.sp,
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(11.sp)
|
||||
),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Container(
|
||||
height:20.sp,
|
||||
width: 60.sp,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF423055),
|
||||
borderRadius: BorderRadius.circular(10.sp)
|
||||
)),
|
||||
Text('礼物墙',style: TextStyle(color: Colors.white,fontSize: 14.sp),)
|
||||
],
|
||||
),
|
||||
)),
|
||||
) : Container()
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
controller: tabController,
|
||||
children: [
|
||||
Gift(widget.accid,widget.giftId),
|
||||
PartnerOption(accid: widget.accid),
|
||||
],
|
||||
))
|
||||
],
|
||||
),
|
||||
)))
|
||||
tabController.index == 0 ? Container(
|
||||
margin: EdgeInsets.only(right: 15.sp),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
String toUserId = widget.accid!.split('_').last;
|
||||
Get.toNamed(AppRoutes.GiftShopPage,arguments: toUserId);
|
||||
},
|
||||
child: Container(
|
||||
height:22.sp,
|
||||
width: 62.sp,
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(11.sp)
|
||||
),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Container(
|
||||
height:20.sp,
|
||||
width: 60.sp,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF423055),
|
||||
borderRadius: BorderRadius.circular(10.sp)
|
||||
)),
|
||||
Text('礼物墙',style: TextStyle(color: Colors.white,fontSize: 14.sp),)
|
||||
],
|
||||
),
|
||||
)),
|
||||
) : Container()
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
controller: tabController,
|
||||
children: [
|
||||
Gift(widget.accid,widget.giftId),
|
||||
PartnerOption(accid: widget.accid),
|
||||
],
|
||||
))
|
||||
],
|
||||
),
|
||||
)),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -263,6 +263,7 @@ class _GiftState extends State<Gift> {
|
||||
if (info['name'] == '浪漫告白') {
|
||||
selectedIndex = i;
|
||||
giftId = info['id'].toString();
|
||||
tipStr = info['topHours'] != null ? info['topHours'].toString() : '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@ import 'package:tencent_cloud_chat_uikit/data_services/message/message_services.
|
||||
import 'package:tencent_cloud_chat_uikit/data_services/services_locatar.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
||||
|
||||
import '../../util/PaymentUtils.dart';
|
||||
import '../../util/SharedPreferencesHelper.dart';
|
||||
import '../../util/eventBus.dart';
|
||||
import '../../view/notice.dart';
|
||||
@ -87,6 +88,9 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
|
||||
checkVersion();
|
||||
loadMyCircleData();
|
||||
if (Platform.isAndroid) {
|
||||
initWxApi();
|
||||
}
|
||||
}
|
||||
|
||||
void addMsgListener() {
|
||||
|
||||
@ -248,7 +248,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'想要聊天的圈友',
|
||||
'最近想要聊天的圈友',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
@ -270,7 +270,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
||||
).createShader(Offset.zero & bounds.size);
|
||||
},
|
||||
child: Text(
|
||||
'${ctr.total}人等您聊',
|
||||
'${ctr.total}人在线等您聊',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
|
||||
@ -138,30 +138,12 @@ class QuickPage extends StatelessWidget {
|
||||
// height: 210.sp + (item.images.isNotEmpty ? 98.sp : 0),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.sp),
|
||||
border: GradientBoxBorder(
|
||||
|
||||
gradient:
|
||||
AppColor.mainVerLinearGradient,
|
||||
border: Border.all(
|
||||
color: AppColor.mainColor.withOpacity(0.2),
|
||||
width: 1.sp,
|
||||
),
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 1.sp, left: 1.sp, right: 1.sp),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(10.sp),
|
||||
topRight: Radius.circular(10.sp),
|
||||
),
|
||||
child: Image(
|
||||
image: AssetImage(getCircleImage("icon_list_null")),
|
||||
width: Get.width,
|
||||
fit: BoxFit.fill,
|
||||
height: 92.sp,
|
||||
)
|
||||
),
|
||||
),
|
||||
child:
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@ -171,10 +153,10 @@ class QuickPage extends StatelessWidget {
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 6.sp, left: 8.sp),
|
||||
width: 88.sp,
|
||||
height: 88.sp,
|
||||
width: 61.sp,
|
||||
height: 61.sp,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
borderRadius: BorderRadius.circular(30.5.sp),
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
@ -187,51 +169,58 @@ class QuickPage extends StatelessWidget {
|
||||
),
|
||||
padding: EdgeInsets.all(2.sp),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
borderRadius: BorderRadius.circular(30.sp),
|
||||
child: Image.network(item.avatarThumb,
|
||||
width: 88.sp, height: 88.sp, fit: BoxFit.cover),
|
||||
width: 60.sp, height: 60.sp, fit: BoxFit.cover),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 6.sp, left: 9.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
item.nickname,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: const Color.fromRGBO(247, 250, 250, 1.0),
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 8.sp),
|
||||
if (item.gender != null)
|
||||
_buildInfoRow(item),
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
// color: Colors.red,
|
||||
// height: 55.sp, // 设置固定高度
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: 55.sp
|
||||
),
|
||||
width: Get.width,
|
||||
margin: EdgeInsets.symmetric(horizontal: 8.0),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft, // 文本左对齐,垂直居中
|
||||
child: Text(
|
||||
item.signature ?? '暂时还没有签名哦~',
|
||||
maxLines: 2,
|
||||
style: TextStyle(color: Colors.white, fontSize: 18.sp),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 6.sp, left: 9.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
item.nickname,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: const Color.fromRGBO(247, 250, 250, 1.0),
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 8.sp),
|
||||
if (item.gender != null)
|
||||
_buildInfoRow(item),
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
// color: Colors.red,
|
||||
// height: 55.sp, // 设置固定高度
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: 55.sp
|
||||
),
|
||||
width: Get.width,
|
||||
margin: EdgeInsets.symmetric(horizontal: 8.0),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft, // 文本左对齐,垂直居中
|
||||
child: Text(
|
||||
item.signature ?? '暂时还没有签名哦~',
|
||||
maxLines: 2,
|
||||
style: TextStyle(color: Colors.white, fontSize: 18.sp),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
if (item.interests.isNotEmpty)
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 8.sp, right: 3.sp,bottom: 5.sp),
|
||||
@ -262,8 +251,7 @@ class QuickPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
]),
|
||||
],
|
||||
)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -106,6 +106,15 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
@override
|
||||
void dispose() {
|
||||
_tabController.dispose();
|
||||
OverlayState? overlayState = Overlay.of(Get.context!);
|
||||
if (mainOverlayEntry != null) {
|
||||
if (overlayState.debugIsVisible(mainOverlayEntry!)) {
|
||||
mainOverlayEntry!.remove();
|
||||
}
|
||||
}
|
||||
|
||||
// overlayState.insert(entry);
|
||||
|
||||
sub.cancel();
|
||||
routeObserver.unsubscribe(this);
|
||||
super.dispose();
|
||||
|
||||
@ -77,9 +77,11 @@ class _RechargeScreenDialogState extends State<RechargeScreenDialog> {
|
||||
if (isZfbPrice) {
|
||||
var data = await DioManager.instance.post(
|
||||
url: Api.postAliPayOrder,
|
||||
params: {"itemId": itemId, "payType": 4});
|
||||
if (data['code'] == 10000) {
|
||||
openAliPay(data['payUrl'], (isSuccess, errorMsg) {
|
||||
params: {"product_id": itemId, "type": 4});
|
||||
var bean = BaseResponse<PayUrlBean>.fromJson(
|
||||
data, (data) => PayUrlBean.fromJson(data));
|
||||
if (bean.isSuccess()) {
|
||||
openAliPay(bean.data.payUrl, (isSuccess, errorMsg) {
|
||||
if (isSuccess) {
|
||||
// 处理支付成功
|
||||
showOKToast('充值成功');
|
||||
@ -95,12 +97,12 @@ class _RechargeScreenDialogState extends State<RechargeScreenDialog> {
|
||||
} else {
|
||||
var data = await DioManager.instance.post(
|
||||
url: Api.postWxOrder,
|
||||
params: {"itemId": itemId, "payType": 4});
|
||||
params: {"product_id": itemId, "type": 4});
|
||||
var bean = BaseResponse<PaymentData>.fromJson(
|
||||
data, (data) => PaymentData.fromJson(data));
|
||||
if (bean.isSuccess()) {
|
||||
// "wxPayAo" -> [_Map]
|
||||
openWxPay(data['wxPayAo'], (bool isSuccess, String? errorMessage) {
|
||||
openWxPay(bean.data, (bool isSuccess, String? errorMessage) {
|
||||
if (isSuccess) {
|
||||
// 处理支付成功
|
||||
showOKToast('充值成功');
|
||||
@ -129,7 +131,7 @@ class _RechargeScreenDialogState extends State<RechargeScreenDialog> {
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 20.sp,right: 20.sp),
|
||||
padding: EdgeInsets.all(20.sp),
|
||||
height: widget.isShowBalance ? 441.sp + (!Platform.isAndroid ? 0 : 50.sp) : 390.sp + (!Platform.isAndroid ? 0 : 50.sp),
|
||||
height: widget.isShowBalance ? 441.sp + (!Platform.isAndroid ? 0 : 15.sp) : 390.sp + (!Platform.isAndroid ? 0 : 50.sp),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF393949),
|
||||
borderRadius: BorderRadius.circular(10.sp)
|
||||
@ -296,7 +298,7 @@ class _RechargeScreenDialogState extends State<RechargeScreenDialog> {
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16.0.sp),
|
||||
SizedBox(height: 10.0.sp),
|
||||
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
|
||||
@ -41,6 +41,8 @@ final CoreServicesImpl coreInstance = TIMUIKitCore.getInstance();
|
||||
final TUIChatSeparateViewModel chatSeparateViewModel =
|
||||
TUIChatSeparateViewModel();
|
||||
|
||||
OverlayEntry? mainOverlayEntry;
|
||||
|
||||
void main() {
|
||||
FlutterBugly.postCatchedException(() async {
|
||||
// 如果需要 ensureInitialized,请在这里运行。
|
||||
@ -133,9 +135,7 @@ void uploadBuzIDAndToken() async {
|
||||
return;
|
||||
}
|
||||
|
||||
// if (Platform.isAndroid) {
|
||||
initWxApi();
|
||||
// }
|
||||
|
||||
await ChannelPush.init((msg) {});
|
||||
|
||||
int? businessID = await TimUiKitPushPlugin.getBuzId(PushConfig.appInfo);
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
|
||||
|
||||
class Api {
|
||||
// static const baseUrl = 'https://leyuan666.com/zuul-service/';
|
||||
static const baseUrl = 'https://leyuan666.com/zuul-service/';
|
||||
|
||||
|
||||
static const baseUrl = 'http://192.168.3.55:2000/';
|
||||
// static const baseUrl = 'http://192.168.3.55:2000/';
|
||||
|
||||
|
||||
// 获取验证码
|
||||
|
||||
@ -1,180 +1,231 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:circle_app/common/colors/app_color.dart';
|
||||
import 'package:event_bus/event_bus.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../main.dart';
|
||||
typedef void NoticeCallback();
|
||||
|
||||
|
||||
void showFloatingButtonOverlay(
|
||||
BuildContext context, String nickname, String ageMsg, String avatar,int event,NoticeCallback noticeCallback) {
|
||||
|
||||
|
||||
OverlayState? overlayState = Overlay.of(context);
|
||||
late OverlayEntry overlayEntry;
|
||||
bool showMessage = false;
|
||||
|
||||
int countdownSeconds = 5; // 倒计时秒数
|
||||
|
||||
|
||||
|
||||
// 创建 Timer
|
||||
late Timer countdownTimer;
|
||||
|
||||
// 创建 OverlayEntry
|
||||
overlayEntry = OverlayEntry(
|
||||
builder: (BuildContext context) {
|
||||
return Positioned(
|
||||
top: 30,
|
||||
|
||||
return Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Positioned(
|
||||
top: MediaQuery.of(context).padding.top,
|
||||
// right: 16,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 500),
|
||||
curve: Curves.easeInOut,
|
||||
height: showMessage ? 95 : 0,
|
||||
child: Container(
|
||||
width: Get.width - 16,
|
||||
margin: EdgeInsets.all(10.sp),
|
||||
padding: EdgeInsets.fromLTRB(16.sp, 16.sp, 16.sp, 0),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: const Color(0xFF353443),
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ClipOval(
|
||||
child: CachedNetworkImage(
|
||||
fit: BoxFit.cover,
|
||||
placeholder: null,
|
||||
imageUrl: avatar,
|
||||
width: 48.sp,
|
||||
height: 48.sp,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 500),
|
||||
curve: Curves.easeInOut,
|
||||
height: showMessage ? 85 : 0,
|
||||
child: Container(
|
||||
width: Get.width - 16,
|
||||
// margin: EdgeInsets.only(top:10.sp),
|
||||
padding: EdgeInsets.fromLTRB(16.sp, 16.sp, 16.sp, 0),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: const Color(0xFF353443),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ClipOval(
|
||||
child: CachedNetworkImage(
|
||||
fit: BoxFit.cover,
|
||||
placeholder: null,
|
||||
imageUrl: avatar,
|
||||
width: 48.sp,
|
||||
height: 48.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
// width: 70.sp,
|
||||
child: Text(
|
||||
nickname,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Color.fromRGBO(247, 250, 250, 1.0),
|
||||
fontSize: 16.sp,
|
||||
const SizedBox(width: 8),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
// width: 70.sp,
|
||||
child: Text(
|
||||
nickname,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Color.fromRGBO(247, 250, 250, 1.0),
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 8.sp),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color.fromRGBO(141, 255, 248, 1.0),
|
||||
Color.fromRGBO(181, 211, 255, 1.0),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
SizedBox(width: 8.sp),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color.fromRGBO(141, 255, 248, 1.0),
|
||||
Color.fromRGBO(181, 211, 255, 1.0),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(
|
||||
top: 2.sp,
|
||||
bottom: 2.sp,
|
||||
left: 10.sp,
|
||||
right: 10.sp,
|
||||
),
|
||||
child: Text(
|
||||
ageMsg,
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 10,
|
||||
),
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(
|
||||
top: 2.sp,
|
||||
bottom: 2.sp,
|
||||
left: 10.sp,
|
||||
right: 10.sp,
|
||||
),
|
||||
child: Text(
|
||||
ageMsg,
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 10,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text( event == 0
|
||||
? "看了这么久,给我点个喜欢呗~"
|
||||
: event == 1
|
||||
? "我喜欢了你,可以喜欢我一下吗?"
|
||||
: event == 2
|
||||
? "你喜欢的人上线啦,赶紧找他聊天吧!"
|
||||
: "我也喜欢了你,一起聊聊呗~",
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
countdownTimer.cancel(); // 取消计时器
|
||||
overlayEntry!.remove();
|
||||
noticeCallback();
|
||||
|
||||
// logic.setLike();
|
||||
// logic.showMessage = false;
|
||||
// logic.update();
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 6.sp),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16.sp, vertical: 6.sp),
|
||||
child: Text(
|
||||
event == 0
|
||||
? "喜欢"
|
||||
const SizedBox(height: 8),
|
||||
Text( event == 0
|
||||
? "看了这么久,给我点个喜欢呗~"
|
||||
: event == 1
|
||||
? "回关"
|
||||
? "我喜欢了你,可以喜欢我一下吗?"
|
||||
: event == 2
|
||||
? "私聊"
|
||||
: "私聊",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
? "你喜欢的人上线啦,赶紧找他聊天吧!"
|
||||
: "我也喜欢了你,一起聊聊呗~",
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
countdownTimer.cancel();
|
||||
try {
|
||||
overlayEntry!.remove();
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
mainOverlayEntry = null;
|
||||
noticeCallback();
|
||||
|
||||
// logic.setLike();
|
||||
// logic.showMessage = false;
|
||||
// logic.update();
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 6.sp),
|
||||
height: 34,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16.sp, vertical: 6.sp),
|
||||
child: Text(
|
||||
event == 0
|
||||
? "喜欢"
|
||||
: event == 1
|
||||
? "回关"
|
||||
: event == 2
|
||||
? "私聊"
|
||||
: "私聊",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// ),
|
||||
],
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (event == 0)
|
||||
Positioned(
|
||||
top: MediaQuery.of(context).padding.top,
|
||||
right: 8,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
countdownTimer.cancel();
|
||||
// 取消计时器
|
||||
try {
|
||||
overlayEntry!.remove();
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
mainOverlayEntry = null;
|
||||
},
|
||||
child: Container(
|
||||
height: 20,
|
||||
width: 30,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(topRight: Radius.circular(10),bottomLeft: Radius.circular(10)),
|
||||
gradient: AppColor.mainVerLinearGradient
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Icon(Icons.close,size: 20,color: Colors.white,),
|
||||
),
|
||||
))
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
// setState(() {});
|
||||
showMessage = true;
|
||||
mainOverlayEntry = overlayEntry;
|
||||
countdownTimer = Timer.periodic(Duration(seconds: 1), (timer) {
|
||||
if (countdownSeconds > 0) {
|
||||
countdownSeconds--;
|
||||
// overlayEntry.markNeedsBuild(); // 刷新 OverlayEntry
|
||||
} else {
|
||||
timer.cancel();
|
||||
// 取消计时器
|
||||
overlayEntry!.remove();
|
||||
timer.cancel();
|
||||
|
||||
try {
|
||||
overlayEntry!.remove();
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
mainOverlayEntry = null;
|
||||
}
|
||||
});
|
||||
// 将 OverlayEntry 添加到 Overlay 中
|
||||
|
||||
Loading…
Reference in New Issue
Block a user