bug修改
This commit is contained in:
parent
bb286c94ae
commit
f008d4c045
@ -46,13 +46,13 @@ android {
|
|||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
|
||||||
debug {
|
debug {
|
||||||
storeFile file('../leyuan.jks')
|
storeFile file('leyuan.jks')
|
||||||
storePassword 'leyuan'
|
storePassword 'leyuan'
|
||||||
keyAlias = 'leyuan'
|
keyAlias = 'leyuan'
|
||||||
keyPassword 'leyuan'
|
keyPassword 'leyuan'
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
storeFile file('../leyuan.jks')
|
storeFile file('leyuan.jks')
|
||||||
storePassword 'leyuan'
|
storePassword 'leyuan'
|
||||||
keyAlias = 'leyuan'
|
keyAlias = 'leyuan'
|
||||||
keyPassword 'leyuan'
|
keyPassword 'leyuan'
|
||||||
|
|||||||
@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
|
||||||
|
|||||||
@ -381,7 +381,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.1.3;
|
MARKETING_VERSION = 1.2.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
@ -530,7 +530,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.1.3;
|
MARKETING_VERSION = 1.2.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
@ -573,7 +573,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.1.3;
|
MARKETING_VERSION = 1.2.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
|||||||
@ -456,8 +456,7 @@ class _TIMUIKItHistoryMessageListItemState
|
|||||||
width: 3,
|
width: 3,
|
||||||
height: 3,
|
height: 3,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(1.5),
|
||||||
BorderRadius.circular(1.5),
|
|
||||||
color: Color(0xFF00FFF4)),
|
color: Color(0xFF00FFF4)),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
@ -478,21 +477,22 @@ class _TIMUIKItHistoryMessageListItemState
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
margin:
|
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||||
EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(right: 5.sp,top: 10.sp),
|
margin:
|
||||||
|
EdgeInsets.only(right: 5.sp, top: 10.sp),
|
||||||
width: 3,
|
width: 3,
|
||||||
height: 3,
|
height: 3,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(1.5),
|
borderRadius: BorderRadius.circular(1.5),
|
||||||
color: Color(0xFF00FFF4)),
|
color: Color(0xFF00FFF4)),
|
||||||
),
|
),
|
||||||
Expanded(child: Text(
|
Expanded(
|
||||||
|
child: Text(
|
||||||
isFromSelf
|
isFromSelf
|
||||||
? '交友宣言:' + info['user']['signature']
|
? '交友宣言:' + info['user']['signature']
|
||||||
: '交友宣言:' + info['my']['signature'],
|
: '交友宣言:' + info['my']['signature'],
|
||||||
@ -509,9 +509,8 @@ class _TIMUIKItHistoryMessageListItemState
|
|||||||
width: Get.width,
|
width: Get.width,
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
),
|
),
|
||||||
interestWdiget(isFromSelf
|
interestWdiget(
|
||||||
? info['interests']
|
isFromSelf ? info['interests'] : info['myInterests'])
|
||||||
: info['myInterests'])
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -740,7 +739,10 @@ class _TIMUIKItHistoryMessageListItemState
|
|||||||
}
|
}
|
||||||
|
|
||||||
interestWdiget(List data) {
|
interestWdiget(List data) {
|
||||||
if (!data.isNotEmpty) return Container(height: 0,);
|
if (!data.isNotEmpty)
|
||||||
|
return Container(
|
||||||
|
height: 0,
|
||||||
|
);
|
||||||
return Container(
|
return Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
height: 49.sp,
|
height: 49.sp,
|
||||||
|
|||||||
@ -192,17 +192,17 @@ class TIMUIKitMessageTooltipState
|
|||||||
id: "copyMessage",
|
id: "copyMessage",
|
||||||
iconImageAsset: "images/copy_message.png",
|
iconImageAsset: "images/copy_message.png",
|
||||||
onClick: () => _onTap("copyMessage", model)),
|
onClick: () => _onTap("copyMessage", model)),
|
||||||
if (shouldShowForwardAction && !isVoteMessage(widget.message))
|
// if (shouldShowForwardAction && !isVoteMessage(widget.message))
|
||||||
MessageToolTipItem(
|
// MessageToolTipItem(
|
||||||
label: TIM_t("转发"),
|
// label: TIM_t("转发"),
|
||||||
id: "forwardMessage",
|
// id: "forwardMessage",
|
||||||
iconImageAsset: "images/forward_message.png",
|
// iconImageAsset: "images/forward_message.png",
|
||||||
onClick: () => _onTap("forwardMessage", model)),
|
// onClick: () => _onTap("forwardMessage", model)),
|
||||||
MessageToolTipItem(
|
// MessageToolTipItem(
|
||||||
label: TIM_t("多选"),
|
// label: TIM_t("多选"),
|
||||||
id: "multiSelect",
|
// id: "multiSelect",
|
||||||
iconImageAsset: "images/multi_message.png",
|
// iconImageAsset: "images/multi_message.png",
|
||||||
onClick: () => _onTap("multiSelect", model)),
|
// onClick: () => _onTap("multiSelect", model)),
|
||||||
if (shouldShowReplyAction)
|
if (shouldShowReplyAction)
|
||||||
MessageToolTipItem(
|
MessageToolTipItem(
|
||||||
label: TIM_t(model.chatConfig.isAtWhenReply ? "回复" : "引用"),
|
label: TIM_t(model.chatConfig.isAtWhenReply ? "回复" : "引用"),
|
||||||
@ -214,11 +214,11 @@ class TIMUIKitMessageTooltipState
|
|||||||
id: "delete",
|
id: "delete",
|
||||||
iconImageAsset: "images/delete_message.png",
|
iconImageAsset: "images/delete_message.png",
|
||||||
onClick: () => _onTap("delete", model)),
|
onClick: () => _onTap("delete", model)),
|
||||||
MessageToolTipItem(
|
// MessageToolTipItem(
|
||||||
label: TIM_t("翻译"),
|
// label: TIM_t("翻译"),
|
||||||
id: "translate",
|
// id: "translate",
|
||||||
iconImageAsset: "images/translate.png",
|
// iconImageAsset: "images/translate.png",
|
||||||
onClick: () => _onTap("translate", model)),
|
// onClick: () => _onTap("translate", model)),
|
||||||
if (shouldShowRevokeAction)
|
if (shouldShowRevokeAction)
|
||||||
MessageToolTipItem(
|
MessageToolTipItem(
|
||||||
label: TIM_t("撤回"),
|
label: TIM_t("撤回"),
|
||||||
@ -234,26 +234,26 @@ class TIMUIKitMessageTooltipState
|
|||||||
return tooltipsConfig.showCopyMessage &&
|
return tooltipsConfig.showCopyMessage &&
|
||||||
widget.message.elemType == MessageElemType.V2TIM_ELEM_TYPE_TEXT;
|
widget.message.elemType == MessageElemType.V2TIM_ELEM_TYPE_TEXT;
|
||||||
}
|
}
|
||||||
if (type == "forwardMessage") {
|
// if (type == "forwardMessage") {
|
||||||
return tooltipsConfig.showForwardMessage && !isDesktopScreen;
|
// return tooltipsConfig.showForwardMessage && !isDesktopScreen;
|
||||||
}
|
// }
|
||||||
if (type == "replyMessage") {
|
if (type == "replyMessage") {
|
||||||
return tooltipsConfig.showReplyMessage && !isDesktopScreen;
|
return tooltipsConfig.showReplyMessage && !isDesktopScreen;
|
||||||
}
|
}
|
||||||
if (type == "delete") {
|
if (type == "delete") {
|
||||||
return (!PlatformUtils().isWeb) && tooltipsConfig.showDeleteMessage;
|
return (!PlatformUtils().isWeb) && tooltipsConfig.showDeleteMessage;
|
||||||
}
|
}
|
||||||
if (type == "multiSelect") {
|
// if (type == "multiSelect") {
|
||||||
return tooltipsConfig.showMultipleChoiceMessage;
|
// return tooltipsConfig.showMultipleChoiceMessage;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (type == "revoke") {
|
if (type == "revoke") {
|
||||||
return tooltipsConfig.showRecallMessage;
|
return tooltipsConfig.showRecallMessage;
|
||||||
}
|
}
|
||||||
if (type == "translate") {
|
// if (type == "translate") {
|
||||||
return tooltipsConfig.showTranslation &&
|
// return tooltipsConfig.showTranslation &&
|
||||||
widget.message.elemType == MessageElemType.V2TIM_ELEM_TYPE_TEXT;
|
// widget.message.elemType == MessageElemType.V2TIM_ELEM_TYPE_TEXT;
|
||||||
}
|
// }
|
||||||
return true;
|
return true;
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -280,8 +280,7 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
widget.addStickerToText(newText);
|
widget.addStickerToText(newText);
|
||||||
setSendButton();
|
setSendButton();
|
||||||
}),
|
}),
|
||||||
defaultCustomEmojiStickerList:
|
defaultCustomEmojiStickerList: [])
|
||||||
widget.isUseDefaultEmoji ? ConstData.emojiList : [])
|
|
||||||
: EmojiPanel(onTapEmoji: (unicode) {
|
: EmojiPanel(onTapEmoji: (unicode) {
|
||||||
final newText = String.fromCharCode(unicode);
|
final newText = String.fromCharCode(unicode);
|
||||||
widget.addStickerToText(newText);
|
widget.addStickerToText(newText);
|
||||||
|
|||||||
@ -461,11 +461,11 @@ class _TUIChatState extends TIMUIKitState<TIMChat> {
|
|||||||
tongueItemBuilder: widget.tongueItemBuilder,
|
tongueItemBuilder: widget.tongueItemBuilder,
|
||||||
onLongPressForOthersHeadPortrait:
|
onLongPressForOthersHeadPortrait:
|
||||||
(String? userId, String? nickName) {
|
(String? userId, String? nickName) {
|
||||||
if (widget.conversationType !=
|
// if (widget.conversationType !=
|
||||||
ConvType.c2c) {
|
// ConvType.c2c) {
|
||||||
textFieldController.longPressToAt(
|
// textFieldController.longPressToAt(
|
||||||
nickName, userId);
|
// nickName, userId);
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
mainHistoryListConfig:
|
mainHistoryListConfig:
|
||||||
widget.mainHistoryListConfig,
|
widget.mainHistoryListConfig,
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import 'package:cached_network_image/cached_network_image.dart';
|
|||||||
import 'package:circle_app/app/chat/TIMUIKitChat/tim_uikit_chat.dart';
|
import 'package:circle_app/app/chat/TIMUIKitChat/tim_uikit_chat.dart';
|
||||||
import 'package:circle_app/app/minefragment/logic.dart';
|
import 'package:circle_app/app/minefragment/logic.dart';
|
||||||
import 'package:circle_app/components/my_app_bar.dart';
|
import 'package:circle_app/components/my_app_bar.dart';
|
||||||
|
import 'package:circle_app/main.dart';
|
||||||
import 'package:circle_app/network/api.dart';
|
import 'package:circle_app/network/api.dart';
|
||||||
import 'package:circle_app/network/dio_manager.dart';
|
import 'package:circle_app/network/dio_manager.dart';
|
||||||
import 'package:circle_app/router/app_routers.dart';
|
import 'package:circle_app/router/app_routers.dart';
|
||||||
@ -93,8 +94,9 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
));
|
));
|
||||||
}).toList();
|
}).toList();
|
||||||
return StickerPanel(
|
return StickerPanel(
|
||||||
backgroundColor:Colors.transparent,
|
// height: 100.sp,
|
||||||
showBottomContainer: false,
|
backgroundColor:Colors.red,
|
||||||
|
showBottomContainer: true,
|
||||||
sendTextMsg: sendTextMessage,
|
sendTextMsg: sendTextMessage,
|
||||||
sendFaceMsg: (index, data) =>
|
sendFaceMsg: (index, data) =>
|
||||||
sendFaceMessage(index + 1, (data.split("/")[3]).split("@")[0]),
|
sendFaceMessage(index + 1, (data.split("/")[3]).split("@")[0]),
|
||||||
@ -110,7 +112,6 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
V2TimConversation con = Get.arguments;
|
V2TimConversation con = Get.arguments;
|
||||||
return TIMChat(
|
return TIMChat(
|
||||||
|
|
||||||
conversation: Get.arguments,
|
conversation: Get.arguments,
|
||||||
customStickerPanel: renderCustomStickerPanel,
|
customStickerPanel: renderCustomStickerPanel,
|
||||||
onTapAvatar :(String userId,TapDownDetails tapDownDetails)async{
|
onTapAvatar :(String userId,TapDownDetails tapDownDetails)async{
|
||||||
@ -125,12 +126,11 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
// 仅供演示,非全部配置项,实际使用中,可只传和默认项不同的参数,无需传入所有开关
|
// 仅供演示,非全部配置项,实际使用中,可只传和默认项不同的参数,无需传入所有开关
|
||||||
isAllowClickAvatar: true,
|
isAllowClickAvatar: true,
|
||||||
isUseDefaultEmoji: true,
|
isUseDefaultEmoji: true,
|
||||||
isAllowLongPressMessage: false,
|
isAllowLongPressMessage: true,
|
||||||
isShowReadingStatus: true,
|
isShowReadingStatus: true,
|
||||||
isShowGroupReadingStatus: true,
|
isShowGroupReadingStatus: true,
|
||||||
notificationTitle: "",
|
notificationTitle: "",
|
||||||
isUseMessageReaction: true,
|
isUseMessageReaction: true,
|
||||||
|
|
||||||
notificationBody: (V2TimMessage message, String convID, ConvType convType) {
|
notificationBody: (V2TimMessage message, String convID, ConvType convType) {
|
||||||
// V2TIM_ELEM_TYPE_NONE = 0, ///< 未知消息
|
// V2TIM_ELEM_TYPE_NONE = 0, ///< 未知消息
|
||||||
// V2TIM_ELEM_TYPE_TEXT = 1, ///< 文本消息
|
// V2TIM_ELEM_TYPE_TEXT = 1, ///< 文本消息
|
||||||
@ -180,15 +180,18 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
),
|
),
|
||||||
|
|
||||||
userAvatarBuilder: (BuildContext context, V2TimMessage message) {
|
userAvatarBuilder: (BuildContext context, V2TimMessage message) {
|
||||||
return avatarWidget((message.faceUrl?.isNotEmpty ?? false) ? message.faceUrl! : 'https://qiniuyun.leyuan666.com/quanzi/avatar/default.png');
|
return avatarWidget((message.faceUrl?.isNotEmpty ?? false) ? message.faceUrl! : 'https://qiniuyun.leyuan666.com/quanzi/avatar/default.png',message!);
|
||||||
},
|
},
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
avatarWidget(String url, {double width = 34}) {
|
avatarWidget(String url,V2TimMessage message, {double width = 34}) {
|
||||||
print(url);
|
print(url);
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
|
onTap: () async {
|
||||||
|
var data = await Get.toNamed(AppRoutes.UserInfoActivity,arguments: message.sender!.toString().split('_').last);
|
||||||
|
},
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:circle_app/app/likelist/logic.dart';
|
||||||
import 'package:circle_app/main.dart';
|
import 'package:circle_app/main.dart';
|
||||||
import 'package:circle_app/router/app_routers.dart';
|
import 'package:circle_app/router/app_routers.dart';
|
||||||
import 'package:circle_app/util/device.dart';
|
import 'package:circle_app/util/device.dart';
|
||||||
@ -28,7 +29,7 @@ class CircleLogic extends GetxController {
|
|||||||
final CircleState state = CircleState();
|
final CircleState state = CircleState();
|
||||||
var statistics = Rx<DataModel>(
|
var statistics = Rx<DataModel>(
|
||||||
DataModel(visitCount: 0, lastVisitUsers: [], likeMeCount: 0));
|
DataModel(visitCount: 0, lastVisitUsers: [], likeMeCount: 0));
|
||||||
|
List<UserListItem> lists = [];
|
||||||
//Map? statistics;
|
//Map? statistics;
|
||||||
int page = 1;
|
int page = 1;
|
||||||
|
|
||||||
|
|||||||
@ -528,11 +528,15 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
// final GlobalKey<InfoListViewState> infoListViewKey = GlobalKey<InfoListViewState>();
|
// final GlobalKey<InfoListViewState> infoListViewKey = GlobalKey<InfoListViewState>();
|
||||||
return InfoListView(index, bean, logic);
|
return InfoListView(index, bean, logic);
|
||||||
},
|
},
|
||||||
onIndexChanged: (index) {
|
onIndexChanged: (index) async {
|
||||||
controller.state.index = index;
|
controller.state.index = index;
|
||||||
if (index == logic.circle.lists.length - 1) {
|
if (index == logic.circle.lists.length - 1) {
|
||||||
logic.loadMore();
|
await logic.loadMore();
|
||||||
|
if (!logic.isMore) {
|
||||||
|
showOKToast('小主,换个方向滑动呗~');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print(index.toString());
|
print(index.toString());
|
||||||
},
|
},
|
||||||
index: controller.state.index,
|
index: controller.state.index,
|
||||||
@ -674,7 +678,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
TabBar(
|
TabBar(
|
||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
controller: _tabController,
|
controller: _tabController,
|
||||||
labelPadding: EdgeInsets.symmetric(horizontal: 13.0),
|
labelPadding: EdgeInsets.symmetric(horizontal: 8.0.sp),
|
||||||
indicator: UnderlineTabIndicator(
|
indicator: UnderlineTabIndicator(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: const Color(0xFF00FFF4),
|
color: const Color(0xFF00FFF4),
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:circle_app/app/circle/view.dart';
|
import 'package:circle_app/app/circle/view.dart';
|
||||||
import 'package:circle_app/common/Widgets/base_tip_widget.dart';
|
import 'package:circle_app/common/Widgets/base_tip_widget.dart';
|
||||||
@ -14,6 +17,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:flutter_swiper/flutter_swiper.dart';
|
import 'package:flutter_swiper/flutter_swiper.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:get/utils.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
import '../../../../util/eventBus.dart';
|
import '../../../../util/eventBus.dart';
|
||||||
@ -55,11 +59,13 @@ class _DiscoverState extends State<Discover>
|
|||||||
double nextOffset = 0;
|
double nextOffset = 0;
|
||||||
int lastPage = 0;
|
int lastPage = 0;
|
||||||
|
|
||||||
double screenHeight = Get.height -
|
double screenHeight = Platform.isAndroid ? Get.height -
|
||||||
|
Get.statusBarHeight - Get.bottomBarHeight : Get.height -
|
||||||
Get.bottomBarHeight -
|
Get.bottomBarHeight -
|
||||||
Get.statusBarHeight -
|
Get.statusBarHeight -
|
||||||
((Get.height > 750 ? 115.sp : 155.sp) - Get.statusBarHeight);
|
((Get.height > 750 ? 115.sp : 155.sp) - Get.statusBarHeight);
|
||||||
|
|
||||||
|
|
||||||
void animateToOffset(ScrollController controller, double offset,
|
void animateToOffset(ScrollController controller, double offset,
|
||||||
void Function() onScrollCompleted) {
|
void Function() onScrollCompleted) {
|
||||||
controller
|
controller
|
||||||
@ -88,9 +94,9 @@ class _DiscoverState extends State<Discover>
|
|||||||
pointerEnd = event.position;
|
pointerEnd = event.position;
|
||||||
touchRangeY = pointerStart.dy - pointerEnd.dy;
|
touchRangeY = pointerStart.dy - pointerEnd.dy;
|
||||||
|
|
||||||
if (touchRangeY.abs() < screenHeight / 3) {
|
if (touchRangeY.abs() < screenHeight / 8) {
|
||||||
// 滑动距离大于屏幕宽度的1/8就可以继续翻页了
|
// 滑动距离大于屏幕宽度的1/8就可以继续翻页了
|
||||||
nextOffset = (screenHeight + 10.sp) * lastPage;
|
nextOffset = (screenHeight + 5.sp) * lastPage;
|
||||||
animateToOffset(_scrollController, nextOffset, () {});
|
animateToOffset(_scrollController, nextOffset, () {});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -98,12 +104,12 @@ class _DiscoverState extends State<Discover>
|
|||||||
// 手指从下向上滑动
|
// 手指从下向上滑动
|
||||||
lastPage--;
|
lastPage--;
|
||||||
animateToOffset(
|
animateToOffset(
|
||||||
_scrollController, lastPage * (screenHeight + 10.sp), () {});
|
_scrollController, lastPage * ( screenHeight + 5.sp), () {});
|
||||||
} else if (touchRangeY > 0 && lastPage < list.length - 1) {
|
} else if (touchRangeY > 0 && lastPage < list.length - 1) {
|
||||||
// 从上向下
|
// 从上向下
|
||||||
lastPage++;
|
lastPage++;
|
||||||
animateToOffset(
|
animateToOffset(
|
||||||
_scrollController, lastPage * (screenHeight + 10.sp), () {});
|
_scrollController, lastPage * (screenHeight + 5.sp), () {});
|
||||||
if (lastPage == 3 && isPop == false && widget.unlockWxNum == 0) {
|
if (lastPage == 3 && isPop == false && widget.unlockWxNum == 0) {
|
||||||
isPop = true;
|
isPop = true;
|
||||||
//弹窗提示
|
//弹窗提示
|
||||||
@ -252,6 +258,13 @@ class _DiscoverState extends State<Discover>
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
// TODO: add widget build method
|
// 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);
|
||||||
|
|
||||||
return list.isEmpty
|
return list.isEmpty
|
||||||
? isMore
|
? isMore
|
||||||
? loaddingWidget(true)
|
? loaddingWidget(true)
|
||||||
@ -288,7 +301,7 @@ class _DiscoverState extends State<Discover>
|
|||||||
height: screenHeight,
|
height: screenHeight,
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
top: 10.sp, left: 16.sp, right: 16.sp),
|
top: 5.sp, left: 16.sp, right: 16.sp),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:circle_app/app/likelist/logic.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
@ -6,5 +7,6 @@ class FriendslistBinding extends Bindings {
|
|||||||
@override
|
@override
|
||||||
void dependencies() {
|
void dependencies() {
|
||||||
Get.lazyPut(() => FriendslistLogic());
|
Get.lazyPut(() => FriendslistLogic());
|
||||||
|
Get.lazyPut(() => LikelistLogic());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
|
|
||||||
@ -10,6 +11,7 @@ import 'state.dart';
|
|||||||
class FriendslistLogic extends GetxController {
|
class FriendslistLogic extends GetxController {
|
||||||
final RefreshController refreshController = RefreshController();
|
final RefreshController refreshController = RefreshController();
|
||||||
final FriendslistState state = FriendslistState();
|
final FriendslistState state = FriendslistState();
|
||||||
|
|
||||||
int page = 1;
|
int page = 1;
|
||||||
int isVip = 0;
|
int isVip = 0;
|
||||||
bool isLoad = true;
|
bool isLoad = true;
|
||||||
@ -18,6 +20,8 @@ class FriendslistLogic extends GetxController {
|
|||||||
@override
|
@override
|
||||||
void onInit() async {
|
void onInit() async {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
|
|
||||||
|
|
||||||
initList();
|
initList();
|
||||||
}
|
}
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:circle_app/app/likelist/view.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -9,14 +10,34 @@ import '../../router/app_routers.dart';
|
|||||||
import '../../util/util.dart';
|
import '../../util/util.dart';
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
|
|
||||||
class FriendslistPage extends StatelessWidget {
|
class FriendslistPage extends StatefulWidget {
|
||||||
FriendslistPage({Key? key}) : super(key: key);
|
FriendslistPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<FriendslistPage> createState() => _FriendslistPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _FriendslistPageState extends State<FriendslistPage> with SingleTickerProviderStateMixin,AutomaticKeepAliveClientMixin {
|
||||||
final logic = Get.find<FriendslistLogic>();
|
final logic = Get.find<FriendslistLogic>();
|
||||||
|
|
||||||
final state = Get.find<FriendslistLogic>().state;
|
final state = Get.find<FriendslistLogic>().state;
|
||||||
|
|
||||||
|
late TabController _tabController;
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool get wantKeepAlive => true;
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
// TODO: implement initState
|
||||||
|
super.initState();
|
||||||
|
_tabController = TabController(length: 2, vsync: this, initialIndex: Get.arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
return GetBuilder<FriendslistLogic>(builder: (logic) {
|
return GetBuilder<FriendslistLogic>(builder: (logic) {
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@ -27,10 +48,83 @@ class FriendslistPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: const MyAppBar(
|
appBar: MyAppBar(
|
||||||
centerTitle: "我喜欢的",
|
diyTitleWdiget: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
TabBar(
|
||||||
|
isScrollable: true,
|
||||||
|
controller: _tabController,
|
||||||
|
labelPadding: EdgeInsets.symmetric(horizontal: 8.0.sp),
|
||||||
|
indicator: UnderlineTabIndicator(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: const Color(0xFF00FFF4),
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
),
|
||||||
|
indicatorColor: const Color(0xFF00FFF4),
|
||||||
|
indicatorWeight: 2.sp,
|
||||||
|
labelColor: const Color(0xFF00FFF4),
|
||||||
|
unselectedLabelColor: const Color(0xB3FFFFFF),
|
||||||
|
indicatorSize: TabBarIndicatorSize.label,
|
||||||
|
indicatorPadding: EdgeInsets.only(left: 30.sp, right: 30.sp),
|
||||||
|
tabs: [
|
||||||
|
Tab(
|
||||||
|
child: Text(
|
||||||
|
'我喜欢的',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Tab(
|
||||||
|
child: Text(
|
||||||
|
'喜欢我的',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
],
|
||||||
|
labelStyle: TextStyle(
|
||||||
|
color: const Color(0xFF00FFF4),
|
||||||
|
fontSize: 18.sp,
|
||||||
|
shadows: [
|
||||||
|
Shadow(
|
||||||
|
color: const Color(0xFFF657FF).withOpacity(0.5),
|
||||||
|
offset: Offset(0, -2), // 阴影偏移
|
||||||
|
blurRadius: 3, // 阴影模糊半径
|
||||||
|
// spreadRadius: 0
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
unselectedLabelStyle: TextStyle(
|
||||||
|
// color: const Color(0xB3FFFFFF),
|
||||||
|
fontSize: 18.sp,
|
||||||
|
shadows: [
|
||||||
|
Shadow(
|
||||||
|
// color: const Color(0xFFF657FF),
|
||||||
|
offset: const Offset(0, -1),
|
||||||
|
blurRadius: 3.0.sp,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
onTap: (index) {
|
||||||
|
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
),
|
||||||
|
body: TabBarView(children: [myLiveWidget(),LikelistPage()],controller: _tabController,),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget myLiveWidget() {
|
||||||
|
return SafeArea(
|
||||||
child: logic.isLoad ? loaddingWidget(true) : logic.lists.isEmpty ? noResultWidget() : SmartRefresher(
|
child: logic.isLoad ? loaddingWidget(true) : logic.lists.isEmpty ? noResultWidget() : SmartRefresher(
|
||||||
controller: logic.refreshController,
|
controller: logic.refreshController,
|
||||||
onRefresh: _onRefresh,
|
onRefresh: _onRefresh,
|
||||||
@ -44,10 +138,7 @@ class FriendslistPage extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget ListItem(UserInfo item,int index) {
|
Widget ListItem(UserInfo item,int index) {
|
||||||
@ -144,8 +235,6 @@ class FriendslistPage extends StatelessWidget {
|
|||||||
),);
|
),);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Widget _buildInfoRow(UserInfo userInfoBean) {
|
Widget _buildInfoRow(UserInfo userInfoBean) {
|
||||||
String ageMsg = getAgeCOntent(userInfoBean.gender, userInfoBean.age,
|
String ageMsg = getAgeCOntent(userInfoBean.gender, userInfoBean.age,
|
||||||
userInfoBean.role, userInfoBean.orientation);
|
userInfoBean.role, userInfoBean.orientation);
|
||||||
@ -179,7 +268,6 @@ class FriendslistPage extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void _onRefresh() async {
|
void _onRefresh() async {
|
||||||
logic.page = 1;
|
logic.page = 1;
|
||||||
logic.initList();
|
logic.initList();
|
||||||
|
|||||||
@ -212,6 +212,8 @@ class HomeLogic extends GetxController {
|
|||||||
} else if (index == 2) {
|
} else if (index == 2) {
|
||||||
final logic = Get.put(MinefragmentLogic());
|
final logic = Get.put(MinefragmentLogic());
|
||||||
logic.getMode();
|
logic.getMode();
|
||||||
|
} else {
|
||||||
|
getUnreadSize();
|
||||||
}
|
}
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,18 +18,8 @@ class LikelistPage extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GetBuilder<LikelistLogic>(builder: (logic) {
|
return GetBuilder<LikelistLogic>(builder: (logic) {
|
||||||
return Container(
|
return Scaffold(
|
||||||
decoration: BoxDecoration(
|
|
||||||
image: DecorationImage(
|
|
||||||
image: AssetImage(getBaseImage("home_back")),
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Scaffold(
|
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: const MyAppBar(
|
|
||||||
centerTitle: "喜欢我的",
|
|
||||||
),
|
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: logic.isLoad
|
child: logic.isLoad
|
||||||
? loaddingWidget(true)
|
? loaddingWidget(true)
|
||||||
@ -49,7 +39,6 @@ class LikelistPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -291,7 +291,7 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(AppRoutes.FriendsActivity);
|
Get.toNamed(AppRoutes.FriendsActivity,arguments: 0);
|
||||||
},
|
},
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -329,7 +329,7 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||||
sharedPreferences.setInt(SharedPreferencesHelper.LIKEMECOUNT, logic.like_me_count);
|
sharedPreferences.setInt(SharedPreferencesHelper.LIKEMECOUNT, logic.like_me_count);
|
||||||
});
|
});
|
||||||
Get.toNamed(AppRoutes.LikeListActivity);
|
Get.toNamed(AppRoutes.FriendsActivity,arguments: 1);
|
||||||
},
|
},
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
import 'package:circle_app/app/likelist/logic.dart';
|
||||||
|
import 'package:circle_app/network/api.dart';
|
||||||
|
import 'package:circle_app/network/dio_manager.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
@ -5,6 +8,25 @@ import 'state.dart';
|
|||||||
|
|
||||||
class MsgLogic extends GetxController {
|
class MsgLogic extends GetxController {
|
||||||
final MsgState state = MsgState();
|
final MsgState state = MsgState();
|
||||||
|
List<UserListItem> lists = [];
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onInit() {
|
||||||
|
// TODO: implement onInit
|
||||||
|
super.onInit();
|
||||||
|
loadLikeData();
|
||||||
|
}
|
||||||
|
loadLikeData() async {
|
||||||
|
var data =
|
||||||
|
await DioManager.instance.get(url: Api.fansList, params: {
|
||||||
|
'page':1,
|
||||||
|
'page_size':3
|
||||||
|
|
||||||
|
});
|
||||||
|
var bean = BaseResponse<UserList>.fromJson(data, (data) => UserList.fromJson(data));
|
||||||
|
if (bean.isSuccess()) {
|
||||||
|
lists.addAll(bean.data.lists);
|
||||||
|
}
|
||||||
|
update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:circle_app/app/circle/logic.dart';
|
import 'package:circle_app/app/circle/logic.dart';
|
||||||
import 'package:circle_app/app/circle/view.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/Widgets/open_vip_tip/view.dart';
|
||||||
@ -81,12 +82,47 @@ class MsgPage extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
circleWidget(String url, String userId,{double width = 30}) {
|
||||||
|
return Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
getCircleImage('avatar_bg'),
|
||||||
|
width: width.sp,
|
||||||
|
),
|
||||||
|
ClipOval(
|
||||||
|
child: CachedNetworkImage(
|
||||||
|
imageUrl:url??"https://qiniuyun.leyuan666.com/quanzi/avatar/default.png",
|
||||||
|
width: (width - 1).sp,
|
||||||
|
height: (width - 1).sp,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
memCacheHeight: width.toInt() - 1,
|
||||||
|
memCacheWidth: width.toInt() - 1,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
navigatorItem(MsgLogic ctr) {
|
navigatorItem(MsgLogic ctr) {
|
||||||
var logic = Get.find<CircleLogic>();
|
var logic = Get.find<CircleLogic>();
|
||||||
String count = '0';
|
|
||||||
if (logic != null) {
|
List<Widget> widgets = [];
|
||||||
count = (logic.statistics.value.likeMeCount ?? 0).toString();
|
int i = 0;
|
||||||
|
// print(urlList);
|
||||||
|
if(ctr.lists!.isNotEmpty){
|
||||||
|
ctr.lists.forEach((element) {
|
||||||
|
if(widgets.length>2){
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
widgets.add(Positioned(
|
||||||
|
left: 15.sp * i,
|
||||||
|
child: circleWidget(element.user.avatar! ?? "https://qiniuyun.leyuan666.com/quanzi/avatar/default.png",element.user.id.toString()),
|
||||||
|
));
|
||||||
|
i++;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
padding: EdgeInsets.only(left: 18.sp, right: 18.sp),
|
padding: EdgeInsets.only(left: 18.sp, right: 18.sp),
|
||||||
@ -98,49 +134,20 @@ class MsgPage extends StatelessWidget {
|
|||||||
left: 0,
|
left: 0,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(AppRoutes.LikeListActivity);
|
Get.toNamed(AppRoutes.FriendsActivity,arguments: 1);
|
||||||
},
|
},
|
||||||
child: Stack(
|
child:ctr.lists.isNotEmpty
|
||||||
children: [
|
? SizedBox(
|
||||||
SizedBox(
|
|
||||||
width: count.length > 2
|
|
||||||
? 45.sp
|
|
||||||
: count.length > 1
|
|
||||||
? 38.sp
|
|
||||||
: 35.sp,
|
|
||||||
height: 30.sp,
|
height: 30.sp,
|
||||||
|
width: 30.0.sp +
|
||||||
|
15.sp *
|
||||||
|
(widgets.length -
|
||||||
|
1.sp),
|
||||||
|
child: Stack(
|
||||||
|
children: widgets,
|
||||||
),
|
),
|
||||||
Image.asset(
|
)
|
||||||
getMsgImage('msg_love'),
|
: Container(),)),
|
||||||
width: 30.sp,
|
|
||||||
),
|
|
||||||
int.parse(count) > 0
|
|
||||||
? Positioned(
|
|
||||||
right: 0,
|
|
||||||
child: Container(
|
|
||||||
padding:
|
|
||||||
EdgeInsets.only(left: 5.sp, right: 5.sp),
|
|
||||||
height: 14.sp,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(7.sp),
|
|
||||||
gradient: const LinearGradient(
|
|
||||||
colors: [
|
|
||||||
Color(0xFFC343F9),
|
|
||||||
Color(0xFFFB34B2),
|
|
||||||
],
|
|
||||||
)),
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: Text(
|
|
||||||
int.parse(count) > 99 ? '99+' : count,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 10.sp,
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
),
|
|
||||||
))
|
|
||||||
: Container(),
|
|
||||||
],
|
|
||||||
))),
|
|
||||||
ShaderMask(
|
ShaderMask(
|
||||||
shaderCallback: (Rect bounds) {
|
shaderCallback: (Rect bounds) {
|
||||||
return const LinearGradient(
|
return const LinearGradient(
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
|||||||
|
|
||||||
class AppColor {
|
class AppColor {
|
||||||
static Color mainColor = Color(0xFF06F9FA);
|
static Color mainColor = Color(0xFF06F9FA);
|
||||||
|
static Color bgColor = Color(0xFF120D29);
|
||||||
static Color mainBgColor = Color(0XFF392D53);
|
static Color mainBgColor = Color(0XFF392D53);
|
||||||
|
|
||||||
static Gradient mainVerLinearGradient = const LinearGradient(
|
static Gradient mainVerLinearGradient = const LinearGradient(
|
||||||
|
|||||||
@ -11,6 +11,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
const MyAppBar({
|
const MyAppBar({
|
||||||
Key? key,
|
Key? key,
|
||||||
this.backgroundColor,
|
this.backgroundColor,
|
||||||
|
this.diyTitleWdiget,
|
||||||
this.title = '',
|
this.title = '',
|
||||||
this.centerTitle = '',
|
this.centerTitle = '',
|
||||||
this.actionWdiget,
|
this.actionWdiget,
|
||||||
@ -30,6 +31,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
final String backImg;
|
final String backImg;
|
||||||
final Color? backImgColor;
|
final Color? backImgColor;
|
||||||
final Widget? actionWdiget;
|
final Widget? actionWdiget;
|
||||||
|
final Widget? diyTitleWdiget;
|
||||||
final VoidCallback? onPressed;
|
final VoidCallback? onPressed;
|
||||||
final VoidCallback? onCenterTitlePressed;
|
final VoidCallback? onCenterTitlePressed;
|
||||||
final bool isBack;
|
final bool isBack;
|
||||||
@ -76,7 +78,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
),
|
),
|
||||||
) : Container();
|
) : Container();
|
||||||
|
|
||||||
final Widget titleWidget = GestureDetector(
|
Widget titleWidget = diyTitleWdiget != null ? diyTitleWdiget! : GestureDetector(
|
||||||
onTap: onCenterTitlePressed,
|
onTap: onCenterTitlePressed,
|
||||||
child: Semantics(
|
child: Semantics(
|
||||||
namesRoute: true,
|
namesRoute: true,
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
|
|
||||||
class Api {
|
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/';
|
||||||
|
|
||||||
|
|
||||||
// 获取验证码
|
// 获取验证码
|
||||||
|
|||||||
@ -39,7 +39,7 @@ dependencies:
|
|||||||
# 屏幕适配
|
# 屏幕适配
|
||||||
flutter_screenutil: ^5.6.0
|
flutter_screenutil: ^5.6.0
|
||||||
# 相册库
|
# 相册库
|
||||||
image_picker: ^0.8.6
|
image_picker: ^0.8.7+5
|
||||||
# Toast弹窗
|
# Toast弹窗
|
||||||
oktoast: ^3.3.1
|
oktoast: ^3.3.1
|
||||||
# 清除缓存
|
# 清除缓存
|
||||||
@ -142,6 +142,7 @@ flutter:
|
|||||||
- assets/images/mine/
|
- assets/images/mine/
|
||||||
- assets/images/msg/
|
- assets/images/msg/
|
||||||
- assets/images/circle/
|
- assets/images/circle/
|
||||||
|
- assets/tencent_cloud_chat_sticker/
|
||||||
- assets/province.json
|
- assets/province.json
|
||||||
# - images/a_dot_ham.jpeg
|
# - images/a_dot_ham.jpeg
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user