修改emoji无法显示,个人主页切换显示
This commit is contained in:
parent
f008d4c045
commit
85bc065c71
@ -363,19 +363,19 @@
|
|||||||
DEVELOPMENT_TEAM = C39VUKAY2Z;
|
DEVELOPMENT_TEAM = C39VUKAY2Z;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = "微乐园";
|
INFOPLIST_KEY_CFBundleDisplayName = "跨友Trans";
|
||||||
INFOPLIST_KEY_NSCameraUsageDescription = "应用想要访问您的相机,用于设置头像/动态发布";
|
INFOPLIST_KEY_NSCameraUsageDescription = "App会在上传头像时,需要访问您的相机权限";
|
||||||
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料";
|
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料";
|
||||||
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "应用想要访问您的位置,用于设置个人资料";
|
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "App需要使用您的位置信息,寻找附近用户";
|
||||||
INFOPLIST_KEY_NSMicrophoneUsageDescription = "应用想要访问您的麦克风,用于发送语音消息";
|
INFOPLIST_KEY_NSMicrophoneUsageDescription = "$(PRODUCT_NAME)需要您同意,才能使用麦克风,用来发送语音";
|
||||||
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "是否同意应用将图片保存到相册中?";
|
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "是否同意应用将图片保存到相册中?";
|
||||||
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "应用想要访问您的相册,用于设置头像/动态发布";
|
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "App会在上传头像时,需要访问您的相册权限";
|
||||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||||
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
||||||
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent;
|
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent;
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
|
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortraitUpsideDown";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@ -512,19 +512,19 @@
|
|||||||
DEVELOPMENT_TEAM = C39VUKAY2Z;
|
DEVELOPMENT_TEAM = C39VUKAY2Z;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = "微乐园";
|
INFOPLIST_KEY_CFBundleDisplayName = "跨友Trans";
|
||||||
INFOPLIST_KEY_NSCameraUsageDescription = "应用想要访问您的相机,用于设置头像/动态发布";
|
INFOPLIST_KEY_NSCameraUsageDescription = "App会在上传头像时,需要访问您的相机权限";
|
||||||
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料";
|
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料";
|
||||||
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "应用想要访问您的位置,用于设置个人资料";
|
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "App需要使用您的位置信息,寻找附近用户";
|
||||||
INFOPLIST_KEY_NSMicrophoneUsageDescription = "应用想要访问您的麦克风,用于发送语音消息";
|
INFOPLIST_KEY_NSMicrophoneUsageDescription = "$(PRODUCT_NAME)需要您同意,才能使用麦克风,用来发送语音";
|
||||||
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "是否同意应用将图片保存到相册中?";
|
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "是否同意应用将图片保存到相册中?";
|
||||||
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "应用想要访问您的相册,用于设置头像/动态发布";
|
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "App会在上传头像时,需要访问您的相册权限";
|
||||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||||
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
||||||
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent;
|
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent;
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
|
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortraitUpsideDown";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@ -555,19 +555,19 @@
|
|||||||
DEVELOPMENT_TEAM = C39VUKAY2Z;
|
DEVELOPMENT_TEAM = C39VUKAY2Z;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = "微乐园";
|
INFOPLIST_KEY_CFBundleDisplayName = "跨友Trans";
|
||||||
INFOPLIST_KEY_NSCameraUsageDescription = "应用想要访问您的相机,用于设置头像/动态发布";
|
INFOPLIST_KEY_NSCameraUsageDescription = "App会在上传头像时,需要访问您的相机权限";
|
||||||
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料";
|
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料";
|
||||||
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "应用想要访问您的位置,用于设置个人资料";
|
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "App需要使用您的位置信息,寻找附近用户";
|
||||||
INFOPLIST_KEY_NSMicrophoneUsageDescription = "应用想要访问您的麦克风,用于发送语音消息";
|
INFOPLIST_KEY_NSMicrophoneUsageDescription = "$(PRODUCT_NAME)需要您同意,才能使用麦克风,用来发送语音";
|
||||||
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "是否同意应用将图片保存到相册中?";
|
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "是否同意应用将图片保存到相册中?";
|
||||||
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "应用想要访问您的相册,用于设置头像/动态发布";
|
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "App会在上传头像时,需要访问您的相册权限";
|
||||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||||
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
||||||
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent;
|
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent;
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
|
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortraitUpsideDown";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
|
|||||||
@ -2,23 +2,17 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>App Transport Security Settings </key>
|
|
||||||
<true/>
|
|
||||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>????</string>
|
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleTypeRole</key>
|
<key>CFBundleTypeRole</key>
|
||||||
<string>Editor</string>
|
<string>Editor</string>
|
||||||
<key>CFBundleURLName</key>
|
<key>CFBundleURLName</key>
|
||||||
<string>weixin</string>
|
<string></string>
|
||||||
<key>CFBundleURLSchemes</key>
|
<key>CFBundleURLSchemes</key>
|
||||||
<array>
|
<array/>
|
||||||
<string>wxab2387c2198f01e1</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>LSApplicationQueriesSchemes</key>
|
<key>LSApplicationQueriesSchemes</key>
|
||||||
@ -27,9 +21,16 @@
|
|||||||
<string>weixin</string>
|
<string>weixin</string>
|
||||||
<string>wechat</string>
|
<string>wechat</string>
|
||||||
</array>
|
</array>
|
||||||
|
<key>NSAppTransportSecurity</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
|
<true/>
|
||||||
|
<key>NSAllowsArbitraryLoadsInWebContent</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
<key>io.flutter.embedded_views_preview</key>
|
||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@ -456,7 +456,8 @@ class _TIMUIKItHistoryMessageListItemState
|
|||||||
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(
|
Expanded(
|
||||||
@ -477,22 +478,21 @@ class _TIMUIKItHistoryMessageListItemState
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
margin:
|
||||||
|
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:
|
margin: EdgeInsets.only(right: 5.sp,top: 10.sp),
|
||||||
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(
|
Expanded(child: Text(
|
||||||
child: Text(
|
|
||||||
isFromSelf
|
isFromSelf
|
||||||
? '交友宣言:' + info['user']['signature']
|
? '交友宣言:' + info['user']['signature']
|
||||||
: '交友宣言:' + info['my']['signature'],
|
: '交友宣言:' + info['my']['signature'],
|
||||||
@ -509,8 +509,9 @@ class _TIMUIKItHistoryMessageListItemState
|
|||||||
width: Get.width,
|
width: Get.width,
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
),
|
),
|
||||||
interestWdiget(
|
interestWdiget(isFromSelf
|
||||||
isFromSelf ? info['interests'] : info['myInterests'])
|
? info['interests']
|
||||||
|
: info['myInterests'])
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -739,10 +740,7 @@ class _TIMUIKItHistoryMessageListItemState
|
|||||||
}
|
}
|
||||||
|
|
||||||
interestWdiget(List data) {
|
interestWdiget(List data) {
|
||||||
if (!data.isNotEmpty)
|
if (!data.isNotEmpty) return Container(height: 0,);
|
||||||
return Container(
|
|
||||||
height: 0,
|
|
||||||
);
|
|
||||||
return Container(
|
return Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
height: 49.sp,
|
height: 49.sp,
|
||||||
|
|||||||
@ -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/common/Widgets/open_vip_tip/view.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/util/SharedPreferencesHelper.dart';
|
|
||||||
import 'package:circle_app/util/util.dart';
|
import 'package:circle_app/util/util.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';
|
||||||
@ -280,7 +279,8 @@ 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);
|
||||||
@ -320,10 +320,10 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
final height = originHeight != 0 ? originHeight : currentKeyboardHeight;
|
final height = originHeight != 0 ? originHeight : currentKeyboardHeight;
|
||||||
return height;
|
return height;
|
||||||
} else if (showMore || showEmojiPanel) {
|
} else if (showMore || showEmojiPanel) {
|
||||||
return 268.0 + (bottomPadding ?? 0.0);
|
return 200.0 + (bottomPadding ?? 0.0);
|
||||||
} else if (widget.textEditingController.text.length >= 46 &&
|
} else if (widget.textEditingController.text.length >= 46 &&
|
||||||
showKeyboard == false) {
|
showKeyboard == false) {
|
||||||
return 25 + (bottomPadding ?? 0.0);
|
return 15 + (bottomPadding ?? 0.0);
|
||||||
} else {
|
} else {
|
||||||
return bottomPadding ?? 0;
|
return bottomPadding ?? 0;
|
||||||
}
|
}
|
||||||
@ -454,23 +454,6 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
_buildRepliedMessage(widget.repliedMessage),
|
_buildRepliedMessage(widget.repliedMessage),
|
||||||
Stack(
|
Stack(
|
||||||
children: [
|
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(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
@ -692,13 +675,13 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 64.sp,
|
height: 40.sp,
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
|
margin: EdgeInsets.only(bottom: showEmojiPanel ? 40.sp : 0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
if (isBlack) {
|
if (isBlack) {
|
||||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||||
@ -740,45 +723,45 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async {
|
onTap: () {
|
||||||
if (isBlack) {
|
if (isBlack) {
|
||||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await getImageFile();
|
getImageFile();
|
||||||
},
|
},
|
||||||
child:
|
child:
|
||||||
Image.asset(getMsgImage('photo'), width: 40.sp),
|
Image.asset(getMsgImage('photo'), width: 40.sp),
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async {
|
onTap: () {
|
||||||
if (isBlack) {
|
if (isBlack) {
|
||||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await getTakeImageFile();
|
getTakeImageFile();
|
||||||
},
|
},
|
||||||
child: Image.asset(getMsgImage('take_photo'),
|
child: Image.asset(getMsgImage('take_photo'),
|
||||||
width: 40.sp),
|
width: 40.sp),
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async {
|
onTap: () {
|
||||||
if (isBlack) {
|
if (isBlack) {
|
||||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await getVideoFile(ImageSource.gallery);
|
getVideoFile(ImageSource.gallery);
|
||||||
},
|
},
|
||||||
child: Image.asset(getMsgImage('icon_video'),
|
child: Image.asset(getMsgImage('icon_video'),
|
||||||
width: 40.sp),
|
width: 40.sp),
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async {
|
onTap: () {
|
||||||
if (isBlack) {
|
if (isBlack) {
|
||||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await getVideoFile(ImageSource.camera);
|
getVideoFile(ImageSource.camera);
|
||||||
},
|
},
|
||||||
child: Image.asset(getMsgImage('icon_video_camera'),
|
child: Image.asset(getMsgImage('icon_video_camera'),
|
||||||
width: 40.sp),
|
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 {
|
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 =
|
var data =
|
||||||
await DioManager.instance.get(url: Api.getIsVips + plate.toString());
|
await DioManager.instance.get(url: Api.getIsVips + plate.toString());
|
||||||
|
|
||||||
if (data['code'] == 200) {
|
if (data['code'] == 200) {
|
||||||
isVip = !data['data'];
|
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) {
|
if (!isVip) {
|
||||||
showOKToast('开通会员之后才能发送图片');
|
showOKToast('开通会员之后才能发送图片');
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -95,7 +95,7 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
}).toList();
|
}).toList();
|
||||||
return StickerPanel(
|
return StickerPanel(
|
||||||
// height: 100.sp,
|
// height: 100.sp,
|
||||||
backgroundColor:Colors.red,
|
backgroundColor:Colors.transparent,
|
||||||
showBottomContainer: true,
|
showBottomContainer: true,
|
||||||
sendTextMsg: sendTextMessage,
|
sendTextMsg: sendTextMessage,
|
||||||
sendFaceMsg: (index, data) =>
|
sendFaceMsg: (index, data) =>
|
||||||
|
|||||||
@ -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/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: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:get/get_state_manager/src/simple/get_state.dart';
|
||||||
|
import 'package:image_gallery_saver/image_gallery_saver.dart';
|
||||||
|
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
|
import 'dart:ui' as ui;
|
||||||
class SwiperPage extends StatefulWidget {
|
class SwiperPage extends StatefulWidget {
|
||||||
const SwiperPage({Key? key}) : super(key: key);
|
const SwiperPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@ -13,12 +21,10 @@ class SwiperPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _SwiperPageState extends State<SwiperPage> {
|
class _SwiperPageState extends State<SwiperPage> {
|
||||||
|
|
||||||
|
GlobalKey _globalKey = GlobalKey();
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
return GetBuilder<SwiperLogic>(builder: (logic) {
|
return GetBuilder<SwiperLogic>(builder: (logic) {
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: null,
|
appBar: null,
|
||||||
backgroundColor: Colors.black87,
|
backgroundColor: Colors.black87,
|
||||||
@ -28,23 +34,142 @@ class _SwiperPageState extends State<SwiperPage> {
|
|||||||
//点击任意地方都能关闭页面,并且不影响你的滑动查看
|
//点击任意地方都能关闭页面,并且不影响你的滑动查看
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
}),
|
}),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
child: Swiper(
|
child: Swiper(
|
||||||
controller: logic.swiperController,
|
controller: logic.swiperController,
|
||||||
index: logic.index,
|
index: logic.index,
|
||||||
|
loop: false,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
print("img="+logic.imgList[index]);
|
if (logic.index == index) {
|
||||||
return SizedBox(
|
return RepaintBoundary(
|
||||||
width: double.infinity,
|
key: _globalKey,
|
||||||
child: Image.network(
|
child:itemWidget(logic,index));
|
||||||
"${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,)
|
}
|
||||||
);
|
return itemWidget(logic,index);
|
||||||
|
},
|
||||||
|
|
||||||
|
onIndexChanged: (int index) {
|
||||||
|
logic.index = index;
|
||||||
|
logic.update();
|
||||||
},
|
},
|
||||||
itemCount: logic.imgList.length,
|
itemCount: logic.imgList.length,
|
||||||
pagination: SwiperPagination(), //下面的分页小点
|
pagination: const SwiperPagination(
|
||||||
// control: new SwiperControl(), //左右的那个箭头,在某模拟器中会出现蓝线
|
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(), //左右的那个箭头,在某模拟器中会出现蓝线
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// });
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
@ -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: () {
|
onTap: () {
|
||||||
if(!logic.isShowAlbum&&controller.isMe){
|
if(!logic.isShowAlbum&&controller.isMe){
|
||||||
List<MyConfigData> numbers = [];
|
List<MyConfigData> numbers = [];
|
||||||
@ -565,7 +565,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
) : Container(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -142,7 +142,6 @@ 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