修改emoji无法显示,个人主页切换显示

This commit is contained in:
CYH 2023-10-24 18:15:05 +08:00
parent f008d4c045
commit 85bc065c71
9 changed files with 344 additions and 237 deletions

View File

@ -363,19 +363,19 @@
DEVELOPMENT_TEAM = C39VUKAY2Z;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "微乐园";
INFOPLIST_KEY_NSCameraUsageDescription = "应用想要访问您的相机,用于设置头像/动态发布";
INFOPLIST_KEY_CFBundleDisplayName = "跨友Trans";
INFOPLIST_KEY_NSCameraUsageDescription = "App会在上传头像时需要访问您的相机权限";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "应用想要访问您的位置,用于设置个人资料";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "应用想要访问您的麦克风,用于发送语音消息";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "App需要使用您的位置信息,寻找附近用户";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "$(PRODUCT_NAME)需要您同意,才能使用麦克风,用来发送语音";
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "是否同意应用将图片保存到相册中?";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "应用想要访问您的相册,用于设置头像/动态发布";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "App会在上传头像时需要访问您的相册权限";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@ -512,19 +512,19 @@
DEVELOPMENT_TEAM = C39VUKAY2Z;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "微乐园";
INFOPLIST_KEY_NSCameraUsageDescription = "应用想要访问您的相机,用于设置头像/动态发布";
INFOPLIST_KEY_CFBundleDisplayName = "跨友Trans";
INFOPLIST_KEY_NSCameraUsageDescription = "App会在上传头像时需要访问您的相机权限";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "应用想要访问您的位置,用于设置个人资料";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "应用想要访问您的麦克风,用于发送语音消息";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "App需要使用您的位置信息,寻找附近用户";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "$(PRODUCT_NAME)需要您同意,才能使用麦克风,用来发送语音";
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "是否同意应用将图片保存到相册中?";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "应用想要访问您的相册,用于设置头像/动态发布";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "App会在上传头像时需要访问您的相册权限";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@ -555,19 +555,19 @@
DEVELOPMENT_TEAM = C39VUKAY2Z;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "微乐园";
INFOPLIST_KEY_NSCameraUsageDescription = "应用想要访问您的相机,用于设置头像/动态发布";
INFOPLIST_KEY_CFBundleDisplayName = "跨友Trans";
INFOPLIST_KEY_NSCameraUsageDescription = "App会在上传头像时需要访问您的相机权限";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "应用想要访问您的位置,用于设置个人资料";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "应用想要访问您的麦克风,用于发送语音消息";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "App需要使用您的位置信息,寻找附近用户";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "$(PRODUCT_NAME)需要您同意,才能使用麦克风,用来发送语音";
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "是否同意应用将图片保存到相册中?";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "应用想要访问您的相册,用于设置头像/动态发布";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "App会在上传头像时需要访问您的相册权限";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",

View File

@ -2,23 +2,17 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>App Transport Security Settings </key>
<true/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>weixin</string>
<string></string>
<key>CFBundleURLSchemes</key>
<array>
<string>wxab2387c2198f01e1</string>
</array>
<array/>
</dict>
</array>
<key>LSApplicationQueriesSchemes</key>
@ -27,9 +21,16 @@
<string>weixin</string>
<string>wechat</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<key>io.flutter.embedded_views_preview</key>
<true/>
</dict>
</plist>

View File

@ -456,7 +456,8 @@ class _TIMUIKItHistoryMessageListItemState
width: 3,
height: 3,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(1.5),
borderRadius:
BorderRadius.circular(1.5),
color: Color(0xFF00FFF4)),
),
Expanded(
@ -477,22 +478,21 @@ class _TIMUIKItHistoryMessageListItemState
),
),
Container(
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
margin:
EdgeInsets.only(top: 10.sp, bottom: 10.sp),
alignment: Alignment.centerLeft,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin:
EdgeInsets.only(right: 5.sp, top: 10.sp),
margin: EdgeInsets.only(right: 5.sp,top: 10.sp),
width: 3,
height: 3,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(1.5),
color: Color(0xFF00FFF4)),
),
Expanded(
child: Text(
Expanded(child: Text(
isFromSelf
? '交友宣言:' + info['user']['signature']
: '交友宣言:' + info['my']['signature'],
@ -509,8 +509,9 @@ class _TIMUIKItHistoryMessageListItemState
width: Get.width,
fit: BoxFit.fill,
),
interestWdiget(
isFromSelf ? info['interests'] : info['myInterests'])
interestWdiget(isFromSelf
? info['interests']
: info['myInterests'])
],
),
),
@ -739,10 +740,7 @@ class _TIMUIKItHistoryMessageListItemState
}
interestWdiget(List data) {
if (!data.isNotEmpty)
return Container(
height: 0,
);
if (!data.isNotEmpty) return Container(height: 0,);
return Container(
alignment: Alignment.centerLeft,
height: 49.sp,

View File

@ -9,7 +9,6 @@ import 'package:circle_app/app/minefragment/logic.dart';
import 'package:circle_app/common/Widgets/open_vip_tip/view.dart';
import 'package:circle_app/network/api.dart';
import 'package:circle_app/network/dio_manager.dart';
import 'package:circle_app/util/SharedPreferencesHelper.dart';
import 'package:circle_app/util/util.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -280,7 +279,8 @@ class _TIMTextFieldLayoutNarrowState
widget.addStickerToText(newText);
setSendButton();
}),
defaultCustomEmojiStickerList: [])
defaultCustomEmojiStickerList:
widget.isUseDefaultEmoji ? ConstData.emojiList : [])
: EmojiPanel(onTapEmoji: (unicode) {
final newText = String.fromCharCode(unicode);
widget.addStickerToText(newText);
@ -320,10 +320,10 @@ class _TIMTextFieldLayoutNarrowState
final height = originHeight != 0 ? originHeight : currentKeyboardHeight;
return height;
} else if (showMore || showEmojiPanel) {
return 268.0 + (bottomPadding ?? 0.0);
return 200.0 + (bottomPadding ?? 0.0);
} else if (widget.textEditingController.text.length >= 46 &&
showKeyboard == false) {
return 25 + (bottomPadding ?? 0.0);
return 15 + (bottomPadding ?? 0.0);
} else {
return bottomPadding ?? 0;
}
@ -454,23 +454,6 @@ class _TIMTextFieldLayoutNarrowState
_buildRepliedMessage(widget.repliedMessage),
Stack(
children: [
Positioned(
bottom: MediaQuery.of(context).padding.bottom + 20,
child: AnimatedContainer(
duration: Duration(
milliseconds: (showKeyboard && PlatformUtils().isAndroid)
? 200
: 340),
curve: Curves.fastOutSlowIn,
width: Get.width,
height: max(_getBottomHeight(), 0.0),
child: ListView(
physics: const NeverScrollableScrollPhysics(),
children: [_getBottomContainer()],
),
),
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
@ -692,13 +675,13 @@ class _TIMTextFieldLayoutNarrowState
),
),
Container(
height: 64.sp,
height: 40.sp,
width: Get.width,
margin: EdgeInsets.only(bottom: showEmojiPanel ? 40.sp : 0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () async {
if (isBlack) {
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
@ -740,45 +723,45 @@ class _TIMTextFieldLayoutNarrowState
),
),
GestureDetector(
onTap: () async {
onTap: () {
if (isBlack) {
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
return;
}
await getImageFile();
getImageFile();
},
child:
Image.asset(getMsgImage('photo'), width: 40.sp),
),
GestureDetector(
onTap: () async {
onTap: () {
if (isBlack) {
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
return;
}
await getTakeImageFile();
getTakeImageFile();
},
child: Image.asset(getMsgImage('take_photo'),
width: 40.sp),
),
GestureDetector(
onTap: () async {
onTap: () {
if (isBlack) {
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
return;
}
await getVideoFile(ImageSource.gallery);
getVideoFile(ImageSource.gallery);
},
child: Image.asset(getMsgImage('icon_video'),
width: 40.sp),
),
GestureDetector(
onTap: () async {
onTap: () {
if (isBlack) {
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
return;
}
await getVideoFile(ImageSource.camera);
getVideoFile(ImageSource.camera);
},
child: Image.asset(getMsgImage('icon_video_camera'),
width: 40.sp),
@ -802,6 +785,22 @@ class _TIMTextFieldLayoutNarrowState
],
),
),
Positioned(
bottom: MediaQuery.of(context).padding.bottom + 20,
child: AnimatedContainer(
duration: Duration(
milliseconds: (showKeyboard && PlatformUtils().isAndroid)
? 200
: 340),
curve: Curves.fastOutSlowIn,
width: Get.width,
height: max(_getBottomHeight(), 0.0),
child: ListView(
physics: const NeverScrollableScrollPhysics(),
children: [_getBottomContainer()],
),
),
)
],
)
],
@ -809,27 +808,12 @@ class _TIMTextFieldLayoutNarrowState
}
Future checkVipStatus(int plate) async {
if (!isVip) {
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') {
isVip = true;
return true;
} else {
var data =
await DioManager.instance.get(url: Api.getIsVips + plate.toString());
if (data['code'] == 200) {
isVip = !data['data'];
}
// var data = await DioManager.instance.get(url: Api.getUserMine);
// var bean = BaseResponse<MineResponseBean>.fromJson(
// data, (data) => MineResponseBean.fromJson(data));
// if (bean.isSuccess()) {
// User userInfoBean = bean.data.user!;
// isVip = userInfoBean.vip > 0;
// }
}
}
if (!isVip) {
showOKToast('开通会员之后才能发送图片');

View File

@ -461,11 +461,11 @@ class _TUIChatState extends TIMUIKitState<TIMChat> {
tongueItemBuilder: widget.tongueItemBuilder,
onLongPressForOthersHeadPortrait:
(String? userId, String? nickName) {
// if (widget.conversationType !=
// ConvType.c2c) {
// textFieldController.longPressToAt(
// nickName, userId);
// }
if (widget.conversationType !=
ConvType.c2c) {
textFieldController.longPressToAt(
nickName, userId);
}
},
mainHistoryListConfig:
widget.mainHistoryListConfig,

View File

@ -95,7 +95,7 @@ class _ChatPageState extends State<ChatPage> {
}).toList();
return StickerPanel(
// height: 100.sp,
backgroundColor:Colors.red,
backgroundColor:Colors.transparent,
showBottomContainer: true,
sendTextMsg: sendTextMessage,
sendFaceMsg: (index, data) =>

View File

@ -1,9 +1,17 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:circle_app/util/util.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:get/get_state_manager/src/simple/get_state.dart';
import 'package:image_gallery_saver/image_gallery_saver.dart';
import 'logic.dart';
import 'dart:ui' as ui;
class SwiperPage extends StatefulWidget {
const SwiperPage({Key? key}) : super(key: key);
@ -13,12 +21,10 @@ class SwiperPage extends StatefulWidget {
class _SwiperPageState extends State<SwiperPage> {
GlobalKey _globalKey = GlobalKey();
@override
Widget build(BuildContext context) {
return GetBuilder<SwiperLogic>(builder: (logic) {
return Scaffold(
appBar: null,
backgroundColor: Colors.black87,
@ -28,23 +34,142 @@ class _SwiperPageState extends State<SwiperPage> {
//
Navigator.pop(context);
}),
child: Stack(
children: [
Container(
child: Swiper(
controller: logic.swiperController,
index:logic.index,
index: logic.index,
loop: false,
itemBuilder: (BuildContext context, int index) {
print("img="+logic.imgList[index]);
return SizedBox(
width: double.infinity,
child: Image.network(
"${logic.imgList[index]}?imageView2/0/q/60|watermark/2/text/5b6u5LmQ5ZutQVBQ/font/5b6u6L2v6ZuF6buR/fontsize/2160/fill/I0ZGRkZGRg==/dissolve/50/gravity/SouthEast/dx/60/dy/120", fit: BoxFit.contain,)
);
if (logic.index == index) {
return RepaintBoundary(
key: _globalKey,
child:itemWidget(logic,index));
}
return itemWidget(logic,index);
},
onIndexChanged: (int index) {
logic.index = index;
logic.update();
},
itemCount: logic.imgList.length,
pagination: SwiperPagination(), //
// control: new SwiperControl(), //,线
pagination: const SwiperPagination(
builder: DotSwiperPaginationBuilder(
activeColor: Color(0xFFD14CFF),
color: Colors.white)), //
)),
Positioned(
bottom: Get.bottomBarHeight,
right: 15.sp,
child: InkWell(
onTap: () {
_saveLocalImage();
},
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.all(5.sp),
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.5),
borderRadius: BorderRadius.circular(17.5.sp)),
child: Icon(
Icons.download,
color: Colors.white,
size: 25.sp,
),
),
))
],
),
),
);
});
}
itemWidget(SwiperLogic logic,int index) {
return Container(
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Stack(
alignment: Alignment.center,
children: [
Container(
// color: Colors.red,
child: CachedNetworkImage(
imageUrl: logic.imgList[index],
fit: BoxFit.contain,
),
),
Positioned(
left: 10.sp,
bottom: 20.sp,
child: Container(
margin:
EdgeInsets.only(top: Get.height * 0.45),
child: Text(
'微乐园APP',
style: TextStyle(
color: Colors.white, fontSize: 25.sp),
),
))
],
)
],
));
}
_saveLocalImage() async {
RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image =
await boundary.toImage(pixelRatio: ui.window.devicePixelRatio);
ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png));
if (byteData != null) {
final result =
await ImageGallerySaver.saveImage(byteData.buffer.asUint8List());
print(result);
// isSuccess
if (result['isSuccess']) {
showOKToast('保存成功');
} else {
showOKToast('保存失败,请检查相册权限是否开启');
}
}
}
// Widget build(BuildContext context) {
// return GetBuilder<SwiperLogic>(builder: (logic) {
//
// return Scaffold(
// appBar: null,
// backgroundColor: Colors.black87,
// body: GestureDetector(
// behavior: HitTestBehavior.translucent,
// onTap: (() {
// //
// Navigator.pop(context);
// }),
// child: Swiper(
// controller: logic.swiperController,
// index:logic.index,
// itemBuilder: (BuildContext context, int index) {
// print("img="+logic.imgList[index]);
// // return SizedBox(
// // width: double.infinity,
// // child: Image.network(
// // "${logic.imgList[index]}?imageView2/0/q/60|watermark/2/text/5b6u5LmQ5ZutQVBQ/font/5b6u6L2v6ZuF6buR/fontsize/2160/fill/I0ZGRkZGRg==/dissolve/50/gravity/SouthEast/dx/60/dy/120", fit: BoxFit.contain,)
// // );
// },
// itemCount: logic.imgList.length,
// pagination: SwiperPagination(), //
// // control: new SwiperControl(), //,线
// ),
// ),
// );
// });
// }
}

View File

@ -523,7 +523,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
);
},
),
logic.isBlack||logic.isDestroy||logic.isBlackBeen?Container(): GestureDetector(
logic.isBlack||logic.isDestroy||logic.isBlackBeen?Container(): _tabController.index == 0 ? GestureDetector(
onTap: () {
if(!logic.isShowAlbum&&controller.isMe){
List<MyConfigData> numbers = [];
@ -565,7 +565,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
),
),
),
),
) : Container(),
],
),
);

View File

@ -142,7 +142,6 @@ flutter:
- assets/images/mine/
- assets/images/msg/
- assets/images/circle/
- assets/tencent_cloud_chat_sticker/
- assets/province.json
# - images/a_dot_ham.jpeg