各种属性改成从服务端拉取 聊天界面发视频 还有些文档上的小修改
This commit is contained in:
parent
a2b8a959fa
commit
4a86537491
@ -65,8 +65,8 @@ android {
|
|||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 8
|
versionCode 10
|
||||||
versionName "1.0.7"
|
versionName "1.0.9"
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
vivo_APPID: "105669716",
|
vivo_APPID: "105669716",
|
||||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||||
|
|||||||
BIN
circle_app/assets/images/msg/icon_video.png
Normal file
BIN
circle_app/assets/images/msg/icon_video.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.8 KiB |
BIN
circle_app/assets/images/msg/icon_video_camera.png
Normal file
BIN
circle_app/assets/images/msg/icon_video_camera.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.6 KiB |
@ -50,6 +50,8 @@ class AboutappLogic extends GetxController {
|
|||||||
getUpVersion() async {
|
getUpVersion() async {
|
||||||
if(isUpdate){
|
if(isUpdate){
|
||||||
showReportDialog(Get.context!, _updateInfo!.constraint == 0, _updateInfo!);
|
showReportDialog(Get.context!, _updateInfo!.constraint == 0, _updateInfo!);
|
||||||
|
}else {
|
||||||
|
showOKToast("暂无新版本");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -177,7 +177,7 @@ class AboutappPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
):Container(),
|
):Container(),
|
||||||
Text(
|
Text(
|
||||||
logic.version,
|
"",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: const Color(0xFFB7BECC),
|
color: const Color(0xFFB7BECC),
|
||||||
fontSize: 12.sp,
|
fontSize: 12.sp,
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'dart:io';
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import 'package:circle_app/app/chat/TIMUIKitChat/TIMUIKitTextField/tim_uikit_send_sound_message.dart';
|
import 'package:circle_app/app/chat/TIMUIKitChat/TIMUIKitTextField/tim_uikit_send_sound_message.dart';
|
||||||
import 'package:circle_app/app/minefragment/logic.dart';
|
import 'package:circle_app/app/minefragment/logic.dart';
|
||||||
@ -30,8 +32,11 @@ import 'package:tencent_cloud_chat_uikit/ui/views/TIMUIKitChat/TIMUIKitTextField
|
|||||||
import 'package:tencent_cloud_chat_uikit/ui/views/TIMUIKitChat/TIMUIKitTextField/tim_uikit_send_sound_message.dart';
|
import 'package:tencent_cloud_chat_uikit/ui/views/TIMUIKitChat/TIMUIKitTextField/tim_uikit_send_sound_message.dart';
|
||||||
import 'package:tencent_extended_text_field/extended_text_field.dart';
|
import 'package:tencent_extended_text_field/extended_text_field.dart';
|
||||||
import 'package:tencent_keyboard_visibility/tencent_keyboard_visibility.dart';
|
import 'package:tencent_keyboard_visibility/tencent_keyboard_visibility.dart';
|
||||||
|
import 'package:video_player/video_player.dart';
|
||||||
|
import 'package:video_thumbnail/video_thumbnail.dart';
|
||||||
|
|
||||||
import '../../../../../util/eventBus.dart';
|
import '../../../../../util/eventBus.dart';
|
||||||
|
import '../../../../call_out/logic.dart';
|
||||||
|
|
||||||
GlobalKey<_TIMTextFieldLayoutNarrowState> TIMnarrowTextFieldKey = GlobalKey();
|
GlobalKey<_TIMTextFieldLayoutNarrowState> TIMnarrowTextFieldKey = GlobalKey();
|
||||||
|
|
||||||
@ -174,9 +179,10 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if(null==commentBlackEvent){
|
if (null == commentBlackEvent) {
|
||||||
commentBlackEvent = EventBusManager.on<CommentBlackEvent>().listen((event) {
|
commentBlackEvent =
|
||||||
if(event.userId == widget.userId){
|
EventBusManager.on<CommentBlackEvent>().listen((event) {
|
||||||
|
if (event.userId == widget.userId) {
|
||||||
isBlack = event.isBlack;
|
isBlack = event.isBlack;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -184,15 +190,16 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
|
|
||||||
getBlack();
|
getBlack();
|
||||||
}
|
}
|
||||||
StreamSubscription? commentBlackEvent =null;
|
|
||||||
|
StreamSubscription? commentBlackEvent = null;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
print("TIMTextFieldLayoutNarrow解绑");
|
print("TIMTextFieldLayoutNarrow解绑");
|
||||||
if(null!=commentBlackEvent){
|
if (null != commentBlackEvent) {
|
||||||
EventBusManager.cancelSubscription(commentBlackEvent!);
|
EventBusManager.cancelSubscription(commentBlackEvent!);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,7 +220,6 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void setSendButton() {
|
void setSendButton() {
|
||||||
final value = widget.textEditingController.text;
|
final value = widget.textEditingController.text;
|
||||||
if (isWebDevice() || isAndroidDevice()) {
|
if (isWebDevice() || isAndroidDevice()) {
|
||||||
@ -667,7 +673,7 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 40.sp,
|
height: 64.sp,
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
@ -691,7 +697,8 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
showSendSoundText = !showSendSoundText;
|
showSendSoundText = !showSendSoundText;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
var data = await Permission.microphone.request();
|
var data =
|
||||||
|
await Permission.microphone.request();
|
||||||
if (data.isGranted) {
|
if (data.isGranted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
showEmojiPanel = false;
|
showEmojiPanel = false;
|
||||||
@ -699,7 +706,8 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
showSendSoundText = !showSendSoundText;
|
showSendSoundText = !showSendSoundText;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Permissions.showPermissionConfirmDialog(context, Permission.microphone.value);
|
Permissions.showPermissionConfirmDialog(
|
||||||
|
context, Permission.microphone.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -733,6 +741,28 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
child: Image.asset(getMsgImage('take_photo'),
|
child: Image.asset(getMsgImage('take_photo'),
|
||||||
width: 40.sp),
|
width: 40.sp),
|
||||||
),
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
if (isBlack) {
|
||||||
|
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
getVideoFile(ImageSource.gallery);
|
||||||
|
},
|
||||||
|
child: Image.asset(getMsgImage('icon_video'),
|
||||||
|
width: 40.sp),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
if (isBlack) {
|
||||||
|
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
getVideoFile(ImageSource.camera);
|
||||||
|
},
|
||||||
|
child: Image.asset(getMsgImage('icon_video_camera'),
|
||||||
|
width: 40.sp),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -783,7 +813,6 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
User userInfoBean = bean.data.user!;
|
User userInfoBean = bean.data.user!;
|
||||||
isVip = userInfoBean.vip > 0;
|
isVip = userInfoBean.vip > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!isVip) {
|
if (!isVip) {
|
||||||
showOKToast('开通会员之后才能发送图片');
|
showOKToast('开通会员之后才能发送图片');
|
||||||
@ -801,6 +830,81 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
return isVip;
|
return isVip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VideoPlayerController? videoPlayerController;
|
||||||
|
|
||||||
|
Future getVideoFile(ImageSource imageSource) async {
|
||||||
|
bool isOK = await checkVipStatus();
|
||||||
|
if (!isOK) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
XFile? pickedFile;
|
||||||
|
String? thumbnailPath; // 声明 thumbnailPath 变量
|
||||||
|
|
||||||
|
try {
|
||||||
|
pickedFile = await _picker.pickVideo(
|
||||||
|
source: imageSource,
|
||||||
|
);
|
||||||
|
if (pickedFile == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
videoPlayerController = VideoPlayerController.file(
|
||||||
|
File(pickedFile.path),
|
||||||
|
videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true),
|
||||||
|
);
|
||||||
|
await videoPlayerController?.initialize().then((_) async {
|
||||||
|
thumbnailPath = await VideoThumbnail.thumbnailFile(
|
||||||
|
video: pickedFile!.path,
|
||||||
|
imageFormat: ImageFormat.JPEG,
|
||||||
|
maxWidth: 100,
|
||||||
|
quality: 50,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
final Duration videoDuration = videoPlayerController!.value.duration;
|
||||||
|
final double durationInSeconds = videoDuration.inSeconds.toDouble();
|
||||||
|
|
||||||
|
await widget.model.sendVideoMessage(
|
||||||
|
videoPath: pickedFile.path,
|
||||||
|
snapshotPath: thumbnailPath,
|
||||||
|
// 在此处可用
|
||||||
|
convID: widget.conversationID,
|
||||||
|
convType: widget.conversationType,
|
||||||
|
duration: durationInSeconds.toInt(),
|
||||||
|
inputElement: context,
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
print(e);
|
||||||
|
// setState(() {
|
||||||
|
// _pickImageError = e;
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<ThumbnailResult> getFirstPic(url) async {
|
||||||
|
Uint8List? bytes = await VideoThumbnail.thumbnailData(video: url);
|
||||||
|
final Completer<ThumbnailResult> completer = Completer();
|
||||||
|
if (bytes != null) {
|
||||||
|
int _imageDataSize = bytes.length;
|
||||||
|
print("image size: $_imageDataSize");
|
||||||
|
|
||||||
|
final _image = Image.memory(bytes);
|
||||||
|
_image.image
|
||||||
|
.resolve(ImageConfiguration())
|
||||||
|
.addListener(ImageStreamListener((ImageInfo info, bool _) {
|
||||||
|
completer.complete(ThumbnailResult(
|
||||||
|
image: _image,
|
||||||
|
dataSize: _imageDataSize,
|
||||||
|
height: info.image.height,
|
||||||
|
width: info.image.width,
|
||||||
|
));
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
return completer.future;
|
||||||
|
}
|
||||||
|
|
||||||
Future getImageFile() async {
|
Future getImageFile() async {
|
||||||
bool isOK = await checkVipStatus();
|
bool isOK = await checkVipStatus();
|
||||||
if (!isOK) {
|
if (!isOK) {
|
||||||
@ -829,7 +933,6 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final XFile? pickedFile = await _picker.pickImage(
|
final XFile? pickedFile = await _picker.pickImage(
|
||||||
source: ImageSource.camera,
|
source: ImageSource.camera,
|
||||||
|
|||||||
@ -14,7 +14,6 @@ import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
|||||||
import 'package:tencent_cloud_chat_uikit/ui/controller/tim_uikit_chat_controller.dart';
|
import 'package:tencent_cloud_chat_uikit/ui/controller/tim_uikit_chat_controller.dart';
|
||||||
|
|
||||||
import '../../util/eventBus.dart';
|
import '../../util/eventBus.dart';
|
||||||
import 'logic.dart';
|
|
||||||
|
|
||||||
class ChatPage extends StatefulWidget {
|
class ChatPage extends StatefulWidget {
|
||||||
|
|
||||||
@ -111,6 +110,7 @@ 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{
|
||||||
@ -121,6 +121,7 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
},
|
},
|
||||||
controller : _timuiKitChatController,
|
controller : _timuiKitChatController,
|
||||||
config: TIMUIKitChatConfig(
|
config: TIMUIKitChatConfig(
|
||||||
|
|
||||||
// 仅供演示,非全部配置项,实际使用中,可只传和默认项不同的参数,无需传入所有开关
|
// 仅供演示,非全部配置项,实际使用中,可只传和默认项不同的参数,无需传入所有开关
|
||||||
isAllowClickAvatar: true,
|
isAllowClickAvatar: true,
|
||||||
isUseDefaultEmoji: true,
|
isUseDefaultEmoji: true,
|
||||||
|
|||||||
@ -1,3 +1,7 @@
|
|||||||
|
import 'package:get/get_rx/src/rx_types/rx_types.dart';
|
||||||
|
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
class CircleState {
|
class CircleState {
|
||||||
String msg = '';
|
String msg = '';
|
||||||
int index = 0;
|
int index = 0;
|
||||||
@ -79,6 +83,7 @@ class Chat {
|
|||||||
int? count;
|
int? count;
|
||||||
List<Users>? users;
|
List<Users>? users;
|
||||||
|
|
||||||
|
|
||||||
Chat({this.accountId, this.count, this.users});
|
Chat({this.accountId, this.count, this.users});
|
||||||
|
|
||||||
Chat.fromJson(Map<String, dynamic> json) {
|
Chat.fromJson(Map<String, dynamic> json) {
|
||||||
|
|||||||
@ -21,7 +21,6 @@ class CirclePage extends StatefulWidget {
|
|||||||
|
|
||||||
class _CirclePageState extends State<CirclePage>
|
class _CirclePageState extends State<CirclePage>
|
||||||
with AutomaticKeepAliveClientMixin {
|
with AutomaticKeepAliveClientMixin {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool get wantKeepAlive => true;
|
bool get wantKeepAlive => true;
|
||||||
|
|
||||||
@ -31,24 +30,20 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
final state = Get.find<CircleLogic>().state;
|
final state = Get.find<CircleLogic>().state;
|
||||||
|
|
||||||
var getContext;
|
var getContext;
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
// TODO: implement dispose
|
|
||||||
super.dispose();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
super.build(context);
|
||||||
getContext = context;
|
getContext = context;
|
||||||
return GetBuilder<CircleLogic>(builder: (logic) {
|
return GetBuilder<CircleLogic>(builder: (logic) {
|
||||||
return Container(
|
return Container(
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
height: MediaQuery.of(context).size.height,
|
height: MediaQuery.of(context).size.height,
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
color: const Color(0xFF423055),
|
color: const Color(0xFF423055), image: bgWidget),
|
||||||
image: bgWidget),
|
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
|
resizeToAvoidBottomInset: false,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: GetBuilder(builder: (CircleLogic controller) {
|
child: GetBuilder(builder: (CircleLogic controller) {
|
||||||
@ -66,6 +61,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: Swiper(
|
child: Swiper(
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
|
||||||
var bean = logic.circle.lists[index];
|
var bean = logic.circle.lists[index];
|
||||||
// final GlobalKey<InfoListViewState> infoListViewKey = GlobalKey<InfoListViewState>();
|
// final GlobalKey<InfoListViewState> infoListViewKey = GlobalKey<InfoListViewState>();
|
||||||
return InfoListView(index, bean, logic);
|
return InfoListView(index, bean, logic);
|
||||||
@ -74,10 +70,8 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
controller.state.index = index;
|
controller.state.index = index;
|
||||||
if (index == logic.circle.lists.length - 1) {
|
if (index == logic.circle.lists.length - 1) {
|
||||||
logic.loadMore();
|
logic.loadMore();
|
||||||
|
|
||||||
}
|
}
|
||||||
print(index.toString());
|
print(index.toString());
|
||||||
|
|
||||||
},
|
},
|
||||||
index: controller.state.index,
|
index: controller.state.index,
|
||||||
itemCount: logic.circle.lists.length,
|
itemCount: logic.circle.lists.length,
|
||||||
@ -100,8 +94,8 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
logic.getCircleIndex().id.toString(),
|
logic.getCircleIndex().id.toString(),
|
||||||
logic.getCircleIndex().title!,
|
logic.getCircleIndex().title!,
|
||||||
false));
|
false));
|
||||||
var data = await Get.toNamed(AppRoutes.Call_out, arguments: {'numbers': numbers});
|
var data = await Get.toNamed(AppRoutes.Call_out,
|
||||||
|
arguments: {'numbers': numbers});
|
||||||
},
|
},
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
getCircleImage('send_msg'),
|
getCircleImage('send_msg'),
|
||||||
@ -122,7 +116,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
infoList = statistics.lastVisitUsers;
|
infoList = statistics.lastVisitUsers;
|
||||||
if (infoList.isNotEmpty) {
|
if (infoList.isNotEmpty) {
|
||||||
for (var element in infoList) {
|
for (var element in infoList) {
|
||||||
if(element["avatar"]!=null&&element["avatar"].contains("http")){
|
if (element["avatar"] != null && element["avatar"].contains("http")) {
|
||||||
urlList.add(element["avatar"]);
|
urlList.add(element["avatar"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,7 +173,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
).createShader(Offset.zero & bounds.size);
|
).createShader(Offset.zero & bounds.size);
|
||||||
},
|
},
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: (){
|
onTap: () {
|
||||||
EventBusManager.fire(ScrollToTop());
|
EventBusManager.fire(ScrollToTop());
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
@ -188,7 +182,9 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
fontSize: 18.sp,
|
fontSize: 18.sp,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
shadows: const [Shadow(color: Color(0xffF657FF), offset: Offset(0.0, -1))],
|
shadows: const [
|
||||||
|
Shadow(color: Color(0xffF657FF), offset: Offset(0.0, -1))
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -219,20 +215,23 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
getCircleImage('avatar_bg'),
|
getCircleImage('avatar_bg'),
|
||||||
width: width.sp,
|
width: width.sp,
|
||||||
),
|
),
|
||||||
url.contains("http") ? ClipOval(
|
url.contains("http")
|
||||||
|
? ClipOval(
|
||||||
child: Image.network(
|
child: Image.network(
|
||||||
url,
|
url,
|
||||||
width: (width - 1).sp,
|
width: (width - 1).sp,
|
||||||
height: (width - 1).sp,
|
height: (width - 1).sp,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
) : Text(url,style: TextStyle(color: Color(0xffF756FF),fontSize: 12.sp),)
|
)
|
||||||
|
: Text(
|
||||||
|
url,
|
||||||
|
style: TextStyle(color: Color(0xffF756FF), fontSize: 12.sp),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void _showTextContentDialog(BuildContext context, String msg) {
|
void _showTextContentDialog(BuildContext context, String msg) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
@ -27,22 +26,23 @@ class InfoListView extends StatefulWidget {
|
|||||||
var logic;
|
var logic;
|
||||||
Circle bean;
|
Circle bean;
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
// Function updateBeanCall;
|
// Function updateBeanCall;
|
||||||
|
|
||||||
InfoListView(this.index, this.bean, this.logic,{super.key});
|
InfoListView(this.index, this.bean, this.logic, {super.key});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<InfoListView> createState() => InfoListViewState();
|
State<InfoListView> createState() => InfoListViewState();
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef void MyListViewback(State<InfoListView> result);
|
typedef void MyListViewback(State<InfoListView> result);
|
||||||
class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClientMixin {
|
|
||||||
|
class InfoListViewState extends State<InfoListView>
|
||||||
|
with AutomaticKeepAliveClientMixin {
|
||||||
@override
|
@override
|
||||||
bool get wantKeepAlive => true;
|
bool get wantKeepAlive => true;
|
||||||
final ScrollController scrollController = ScrollController();
|
final ScrollController scrollController = ScrollController();
|
||||||
|
|
||||||
|
|
||||||
ListLogic? listsLg;
|
ListLogic? listsLg;
|
||||||
|
|
||||||
int callOutPage = 1;
|
int callOutPage = 1;
|
||||||
@ -52,30 +52,29 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
var circleId = '';
|
var circleId = '';
|
||||||
List<Lists> lists = [];
|
List<Lists> lists = [];
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
// TODO: implement dispose
|
// TODO: implement dispose
|
||||||
if(null!=callRefreshCicle){
|
if (null != callRefreshCicle) {
|
||||||
EventBusManager.cancelSubscription(callRefreshCicle!);
|
EventBusManager.cancelSubscription(callRefreshCicle!);
|
||||||
}
|
}
|
||||||
if(null!=scroToTop){
|
if (null != scroToTop) {
|
||||||
EventBusManager.cancelSubscription(scroToTop!);
|
EventBusManager.cancelSubscription(scroToTop!);
|
||||||
|
|
||||||
}
|
}
|
||||||
scrollController.dispose();
|
scrollController.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StreamSubscription? callRefreshCicle =null;
|
StreamSubscription? callRefreshCicle = null;
|
||||||
StreamSubscription? scroToTop =null;
|
StreamSubscription? scroToTop = null;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
// TODO: implement initState
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
scrollController.addListener(() {
|
scrollController.addListener(() {
|
||||||
try {
|
try {
|
||||||
if (scrollController.position.pixels ==
|
if (scrollController.position.pixels ==
|
||||||
@ -87,12 +86,11 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
circleId = widget.bean.id.toString();
|
circleId = widget.bean.id.toString();
|
||||||
loadCallOutListData();
|
loadCallOutListData();
|
||||||
callRefreshCicle = EventBusManager.on<CallRefreshCircle>().listen((event) {
|
callRefreshCicle = EventBusManager.on<CallRefreshCircle>().listen((event) {
|
||||||
if(widget.bean.id.toString() == event.circleId){
|
if (widget.bean.id.toString() == event.circleId) {
|
||||||
loadCallOutListData();
|
loadCallOutListData();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
scroToTop = EventBusManager.on<ScrollToTop>().listen((event) {
|
scroToTop = EventBusManager.on<ScrollToTop>().listen((event) {
|
||||||
scrollController.animateTo(
|
scrollController.animateTo(
|
||||||
0.0,
|
0.0,
|
||||||
@ -104,9 +102,6 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
// widget.back(widget.createState());
|
// widget.back(widget.createState());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
loadCallOutListData() async {
|
loadCallOutListData() async {
|
||||||
var data = await DioManager.instance.get(
|
var data = await DioManager.instance.get(
|
||||||
url: "/up-service/interest/$circleId/callouts",
|
url: "/up-service/interest/$circleId/callouts",
|
||||||
@ -175,10 +170,6 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// if (bean.isQueen) {
|
// if (bean.isQueen) {
|
||||||
// showJoinCiclePiker(cicleId);
|
// showJoinCiclePiker(cicleId);
|
||||||
// } else {
|
// } else {
|
||||||
@ -191,9 +182,9 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
}
|
}
|
||||||
|
|
||||||
void pushMsgPage(Lists bean, String cicleId) async {
|
void pushMsgPage(Lists bean, String cicleId) async {
|
||||||
|
if (widget.bean.is_limit && widget.bean.amount > 0) {
|
||||||
if (widget.bean.is_limit&&widget.bean.amount>0) {
|
showJoinCiclePiker(cicleId, widget.bean.amount.toString(),
|
||||||
showJoinCiclePiker(cicleId,widget.bean.amount.toString(),widget.bean.oldAmount.toString(),2,(payResult){
|
widget.bean.oldAmount.toString(), 2, (payResult) {
|
||||||
widget.bean.is_limit = false;
|
widget.bean.is_limit = false;
|
||||||
if (Get.isRegistered<CircleLogic>()) {
|
if (Get.isRegistered<CircleLogic>()) {
|
||||||
var logic = Get.find<CircleLogic>();
|
var logic = Get.find<CircleLogic>();
|
||||||
@ -206,7 +197,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
logic.update();
|
logic.update();
|
||||||
}
|
}
|
||||||
Get.back();
|
Get.back();
|
||||||
},widget.bean.ios_item);
|
}, widget.bean.ios_item);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,44 +208,47 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// if ()
|
// if ()
|
||||||
|
|
||||||
var data = await DioManager.instance.get(
|
var data = await DioManager.instance.get(
|
||||||
url: "/up-service/callout/${bean.id}/chat",);
|
url: "/up-service/callout/${bean.id}/chat",
|
||||||
|
);
|
||||||
if (data["code"] == 200) {
|
if (data["code"] == 200) {
|
||||||
pushChatPage(data['data']['account_id'].toString().split("_").last,data['data']['account_id'], bean.user!.nickname!);
|
pushChatPage(data['data']['account_id'].toString().split("_").last,
|
||||||
await Future.delayed(Duration(seconds: 1));
|
data['data']['account_id'], bean.user!.nickname!);
|
||||||
SharedPreferences sharedPreferences =await SharedPreferences.getInstance();
|
// await Future.delayed(Duration(seconds: 1));
|
||||||
|
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
|
||||||
// SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
// SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||||
int userId = sharedPreferences.getInt(SharedPreferencesHelper.USERID)??0;
|
int userId = sharedPreferences.getInt(SharedPreferencesHelper.USERID) ?? 0;
|
||||||
String avatar = sharedPreferences.getString(SharedPreferencesHelper.AVATAR)??"";
|
String avatar = sharedPreferences.getString(SharedPreferencesHelper.AVATAR) ?? "";
|
||||||
String name = sharedPreferences.getString(SharedPreferencesHelper.NAME)??"";
|
String name = sharedPreferences.getString(SharedPreferencesHelper.NAME) ?? "";
|
||||||
bean.chat!.users!.add(Users(avatar: avatar,id: userId,nickname: name));
|
bean.chat!.users!.add(Users(avatar: avatar, id: userId, nickname: name));
|
||||||
widget.logic.update();
|
// widget.logic.update();
|
||||||
// });
|
// });
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
super.build(context);
|
||||||
List<JoinUser> urlList = widget.bean.lastJoinUsers;
|
List<JoinUser> urlList = widget.bean.lastJoinUsers;
|
||||||
List<Widget> widgets = [];
|
List<Widget> widgets = [];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
// print(urlList);
|
// print(urlList);
|
||||||
if(null!=urlList){
|
if (null != urlList) {
|
||||||
urlList.forEach((element) {
|
urlList.forEach((element) {
|
||||||
if(widgets.length>2){
|
if (widgets.length > 2) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
widgets.add(Positioned(
|
widgets.add(Positioned(
|
||||||
left: 15.sp * i,
|
left: 15.sp * i,
|
||||||
child: circleWidget(element.avatar??"https://qiniuyun.leyuan666.com/quanzi/avatar/default.png",element.id.toString()),
|
child: circleWidget(
|
||||||
|
element.avatar ??
|
||||||
|
"https://qiniuyun.leyuan666.com/quanzi/avatar/default.png",
|
||||||
|
element.id.toString()),
|
||||||
));
|
));
|
||||||
i++;
|
i++;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return ClipRRect(
|
return ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(10.sp),
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -304,26 +298,42 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
image: AssetImage(
|
image: AssetImage(
|
||||||
getCircleImage('circle_desc')))),
|
getCircleImage('circle_desc')))),
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp,bottom: 10.sp),
|
margin: EdgeInsets.only(
|
||||||
|
top: 10.sp, bottom: 10.sp),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(bottom: 7.sp),
|
margin:
|
||||||
|
EdgeInsets.only(bottom: 7.sp),
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
// height: 50.sp,
|
// height: 50.sp,
|
||||||
child: HideText(text: widget.bean.intro,additionText: '查看更多',maxLines: 3,style: TextStyle(color: Colors.white, fontSize: 14.sp),additionStyle: TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),onTap: () {
|
child: HideText(
|
||||||
|
text: widget.bean.intro,
|
||||||
|
additionText: '查看更多',
|
||||||
|
maxLines: 3,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp),
|
||||||
|
additionStyle: TextStyle(
|
||||||
|
color:
|
||||||
|
const Color(0xFFFF4DF6),
|
||||||
|
fontSize: 14.sp),
|
||||||
|
onTap: () {
|
||||||
_showTextContentDialog(
|
_showTextContentDialog(
|
||||||
context, widget.bean.intro,widget.bean.title);
|
context,
|
||||||
|
widget.bean.intro,
|
||||||
|
widget.bean.title);
|
||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
|
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
behavior:HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: (){
|
onTap: () {
|
||||||
// showToast("点个鸡毛,星哥还没做");
|
// showToast("点个鸡毛,星哥还没做");
|
||||||
// Get.toNamed(AppRoutes.FriendsActivity,arguments: '3');
|
// Get.toNamed(AppRoutes.FriendsActivity,arguments: '3');
|
||||||
},
|
},
|
||||||
child:urlList.length==0?Container(): Row(
|
child: urlList.length == 0
|
||||||
|
? Container()
|
||||||
|
: Row(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
@ -343,7 +353,8 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
Text(
|
Text(
|
||||||
'${convertToTenThousand(widget.bean.joinTotal)}圈友加入',
|
'${convertToTenThousand(widget.bean.joinTotal)}圈友加入',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color:
|
||||||
|
Colors.white,
|
||||||
fontSize: 12.sp),
|
fontSize: 12.sp),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -411,18 +422,16 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
padding: EdgeInsets.all(1.sp),
|
padding: EdgeInsets.all(1.sp),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
child: Image.network(
|
child: Image.network(widget.bean.image,
|
||||||
widget.bean.image,
|
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
fit:BoxFit.cover
|
fit: BoxFit.cover),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: (){
|
onTap: () {
|
||||||
scrollController.animateTo(
|
scrollController.animateTo(
|
||||||
0.0, // Scroll to the top
|
0.0, // Scroll to the top
|
||||||
duration: Duration(milliseconds: 300),
|
duration: Duration(milliseconds: 300),
|
||||||
@ -458,7 +467,8 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
GestureDetector(//加入圈子
|
GestureDetector(
|
||||||
|
//加入圈子
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
if (widget.bean.isJoin) {
|
if (widget.bean.isJoin) {
|
||||||
_showOutCircleDialog(
|
_showOutCircleDialog(
|
||||||
@ -497,7 +507,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void _showTextContentDialog(BuildContext context, String msg,String title) {
|
void _showTextContentDialog(BuildContext context, String msg, String title) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
@ -508,7 +518,6 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
padding: const EdgeInsets.all(1.0),
|
padding: const EdgeInsets.all(1.0),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
|
|
||||||
Container(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
shape: BoxShape.rectangle,
|
shape: BoxShape.rectangle,
|
||||||
@ -536,31 +545,37 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
top: 15,
|
top: 15,
|
||||||
left: 0,
|
left: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
child: Center(child: Text(title, style: TextStyle(
|
child: Center(
|
||||||
color: const Color(0xFFF7FAFA), fontSize: 16.sp)),)),
|
child: Text(title,
|
||||||
|
style: TextStyle(
|
||||||
|
color: const Color(0xFFF7FAFA), fontSize: 16.sp)),
|
||||||
|
)),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(top: 24.sp,bottom: 24.sp),
|
margin: EdgeInsets.only(top: 24.sp, bottom: 24.sp),
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(
|
margin:
|
||||||
top: 12.sp, left: 14.sp, right: 14.sp),
|
EdgeInsets.only(top: 12.sp, left: 14.sp, right: 14.sp),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: SingleChildScrollView(child: Text(
|
child: SingleChildScrollView(
|
||||||
|
child: Text(
|
||||||
msg,
|
msg,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: const Color(0xCCF7FAFA), fontSize: 16.sp),
|
color: const Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||||
),),
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
top:8.sp,
|
top: 8.sp,
|
||||||
right: 10.sp,
|
right: 10.sp,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
},
|
},
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.close,color: Colors.white,
|
Icons.close,
|
||||||
|
color: Colors.white,
|
||||||
size: 20.sp,
|
size: 20.sp,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
@ -590,7 +605,8 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
// pushOtherPeopleHomePage(element.id.toString());
|
// pushOtherPeopleHomePage(element.id.toString());
|
||||||
},
|
},
|
||||||
child: circleWidget(element.avatar!,element.id.toString(), width: 24),
|
child:
|
||||||
|
circleWidget(element.avatar!, element.id.toString(), width: 24),
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
index++;
|
index++;
|
||||||
@ -606,7 +622,6 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
|
|
||||||
double picHeight = 0.0;
|
double picHeight = 0.0;
|
||||||
|
|
||||||
|
|
||||||
if (lists.album != null) {
|
if (lists.album != null) {
|
||||||
if (lists.album!.isNotEmpty) {
|
if (lists.album!.isNotEmpty) {
|
||||||
Album info = lists.album!.first;
|
Album info = lists.album!.first;
|
||||||
@ -672,16 +687,22 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: ()async {
|
onTap: () async {
|
||||||
var sp = await SharedPreferencesHelper.getInstance();
|
var sp =
|
||||||
|
await SharedPreferencesHelper.getInstance();
|
||||||
String myUserId = sp.getMyUserId();
|
String myUserId = sp.getMyUserId();
|
||||||
|
|
||||||
if(lists.user?.id!.toString() == myUserId){
|
if (lists.user?.id!.toString() == myUserId) {
|
||||||
Get.toNamed(AppRoutes.UserInfoActivity);
|
Get.toNamed(AppRoutes.UserInfoActivity);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (widget.bean.is_limit&&widget.bean.amount>0) {
|
if (widget.bean.is_limit &&
|
||||||
showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1,(payResult){
|
widget.bean.amount > 0) {
|
||||||
|
showJoinCiclePiker(
|
||||||
|
widget.bean.id.toString(),
|
||||||
|
widget.bean.amount.toString(),
|
||||||
|
widget.bean.oldAmount.toString(),
|
||||||
|
1, (payResult) {
|
||||||
widget.bean.is_limit = false;
|
widget.bean.is_limit = false;
|
||||||
if (Get.isRegistered<CircleLogic>()) {
|
if (Get.isRegistered<CircleLogic>()) {
|
||||||
var logic = Get.find<CircleLogic>();
|
var logic = Get.find<CircleLogic>();
|
||||||
@ -694,7 +715,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
logic.update();
|
logic.update();
|
||||||
}
|
}
|
||||||
Get.back();
|
Get.back();
|
||||||
},widget.bean.ios_item);
|
}, widget.bean.ios_item);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pushHomePage(lists, lists.id.toString());
|
pushHomePage(lists, lists.id.toString());
|
||||||
@ -738,7 +759,9 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
lists.user?.vip != null && lists.user!.vip == 0
|
lists.user?.vip != null && lists.user!.vip == 0
|
||||||
? Container()
|
? Container()
|
||||||
: Image.asset(
|
: Image.asset(
|
||||||
getCircleImage(lists.user!.vip == 1 ? 'vip' : 'year_vip'),
|
getCircleImage(lists.user!.vip == 1
|
||||||
|
? 'vip'
|
||||||
|
: 'year_vip'),
|
||||||
width: 36.sp,
|
width: 36.sp,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@ -763,8 +786,11 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
Color(0xffB5D3FF)
|
Color(0xffB5D3FF)
|
||||||
])),
|
])),
|
||||||
child: Text(
|
child: Text(
|
||||||
getAgeCOntent(lists.user!.gender??0, lists.user!.age??0,
|
getAgeCOntent(
|
||||||
lists.user!.role??0, lists.user!.orientation??0),
|
lists.user!.gender ?? 0,
|
||||||
|
lists.user!.age ?? 0,
|
||||||
|
lists.user!.role ?? 0,
|
||||||
|
lists.user!.orientation ?? 0),
|
||||||
// '${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}',
|
// '${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
@ -873,7 +899,10 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
)),
|
)),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
pushMsgPage(lists, widget.bean.id.toString(),);
|
pushMsgPage(
|
||||||
|
lists,
|
||||||
|
widget.bean.id.toString(),
|
||||||
|
);
|
||||||
// pushHomePage(
|
// pushHomePage(
|
||||||
// lists, widget.bean.id.toString());
|
// lists, widget.bean.id.toString());
|
||||||
},
|
},
|
||||||
@ -922,9 +951,9 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
widgets.add(Positioned(
|
widgets.add(Positioned(
|
||||||
left: 12.sp * index,
|
left: 12.sp * index,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {},
|
||||||
},
|
child:
|
||||||
child: circleWidget(element.avatar!,element.id.toString(), width: 24),
|
circleWidget(element.avatar!, element.id.toString(), width: 24),
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
index++;
|
index++;
|
||||||
@ -979,15 +1008,21 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: ()async {
|
onTap: () async {
|
||||||
var sp = await SharedPreferencesHelper.getInstance();
|
var sp =
|
||||||
|
await SharedPreferencesHelper.getInstance();
|
||||||
String myUserId = sp.getMyUserId();
|
String myUserId = sp.getMyUserId();
|
||||||
if(lists.user?.id!.toString() == myUserId){
|
if (lists.user?.id!.toString() == myUserId) {
|
||||||
Get.toNamed(AppRoutes.UserInfoActivity);
|
Get.toNamed(AppRoutes.UserInfoActivity);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (widget.bean.is_limit&&widget.bean.amount > 0) {
|
if (widget.bean.is_limit &&
|
||||||
showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1,(payResult){
|
widget.bean.amount > 0) {
|
||||||
|
showJoinCiclePiker(
|
||||||
|
widget.bean.id.toString(),
|
||||||
|
widget.bean.amount.toString(),
|
||||||
|
widget.bean.oldAmount.toString(),
|
||||||
|
1, (payResult) {
|
||||||
widget.bean.is_limit = false;
|
widget.bean.is_limit = false;
|
||||||
if (Get.isRegistered<CircleLogic>()) {
|
if (Get.isRegistered<CircleLogic>()) {
|
||||||
var logic = Get.find<CircleLogic>();
|
var logic = Get.find<CircleLogic>();
|
||||||
@ -1000,7 +1035,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
logic.update();
|
logic.update();
|
||||||
}
|
}
|
||||||
Get.back();
|
Get.back();
|
||||||
},widget.bean.ios_item);
|
}, widget.bean.ios_item);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pushHomePage(lists, lists.id.toString());
|
pushHomePage(lists, lists.id.toString());
|
||||||
@ -1041,10 +1076,13 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
width: 8.sp,
|
width: 8.sp,
|
||||||
),
|
),
|
||||||
lists.user?.vip != null && lists.user!.vip == 0
|
lists.user?.vip != null &&
|
||||||
|
lists.user!.vip == 0
|
||||||
? Container()
|
? Container()
|
||||||
: Image.asset(
|
: Image.asset(
|
||||||
getCircleImage(lists.user!.vip == 1 ? 'vip' : 'year_vip'),
|
getCircleImage(lists.user!.vip == 1
|
||||||
|
? 'vip'
|
||||||
|
: 'year_vip'),
|
||||||
width: 36.sp,
|
width: 36.sp,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@ -1070,8 +1108,11 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
Color(0xffB5D3FF)
|
Color(0xffB5D3FF)
|
||||||
])),
|
])),
|
||||||
child: Text(
|
child: Text(
|
||||||
getAgeCOntent(lists.user!.gender??0, lists.user!.age??0,
|
getAgeCOntent(
|
||||||
lists.user!.role??0, lists.user!.orientation??0),
|
lists.user!.gender ?? 0,
|
||||||
|
lists.user!.age ?? 0,
|
||||||
|
lists.user!.role ?? 0,
|
||||||
|
lists.user!.orientation ?? 0),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
fontSize: 12.sp,
|
fontSize: 12.sp,
|
||||||
@ -1188,9 +1229,8 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
color: Colors.white, fontSize: 12.sp),
|
color: Colors.white, fontSize: 12.sp),
|
||||||
)),
|
)),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async{
|
onTap: () async {
|
||||||
pushMsgPage(lists, widget.bean.id.toString());
|
pushMsgPage(lists, widget.bean.id.toString());
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
getCircleImage('chat'),
|
getCircleImage('chat'),
|
||||||
@ -1206,9 +1246,9 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
circleWidget(String url, String userId,{double width = 30}) {
|
circleWidget(String url, String userId, {double width = 30}) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: (){
|
onTap: () {
|
||||||
Get.toNamed(AppRoutes.UserInfoActivity, arguments: userId);
|
Get.toNamed(AppRoutes.UserInfoActivity, arguments: userId);
|
||||||
},
|
},
|
||||||
child: Stack(
|
child: Stack(
|
||||||
@ -1220,7 +1260,8 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
),
|
),
|
||||||
ClipOval(
|
ClipOval(
|
||||||
child: Image.network(
|
child: Image.network(
|
||||||
url??"https://qiniuyun.leyuan666.com/quanzi/avatar/default.png",
|
url ??
|
||||||
|
"https://qiniuyun.leyuan666.com/quanzi/avatar/default.png",
|
||||||
width: (width - 1).sp,
|
width: (width - 1).sp,
|
||||||
height: (width - 1).sp,
|
height: (width - 1).sp,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
@ -1230,8 +1271,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
void _showOutCircleDialog(
|
void _showOutCircleDialog(BuildContext context, var controller, Circle bean) {
|
||||||
BuildContext context, var controller, Circle bean) {
|
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
@ -1384,13 +1424,10 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
if (data['code'] == 200) {
|
if (data['code'] == 200) {
|
||||||
widget.bean = Circle.fromJson(data['data']);
|
widget.bean = Circle.fromJson(data['data']);
|
||||||
widget.logic.updateCircleInfo(widget.bean);
|
widget.logic.updateCircleInfo(widget.bean);
|
||||||
setState(() {
|
setState(() {});
|
||||||
|
|
||||||
});
|
|
||||||
// final logic = Get.put(CircleLogic());
|
// final logic = Get.put(CircleLogic());
|
||||||
// logic.update();
|
// logic.update();
|
||||||
|
} else if (data['code'] == 404) {
|
||||||
}else if(data['code'] == 404){
|
|
||||||
var logic = Get.put(CircleLogic());
|
var logic = Get.put(CircleLogic());
|
||||||
logic.circle.lists.removeAt(logic.state.index);
|
logic.circle.lists.removeAt(logic.state.index);
|
||||||
logic.update();
|
logic.update();
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import 'dart:io';
|
|||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.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:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
@ -218,7 +218,7 @@ class _CustomDialogState extends State<UpdateDialog> {
|
|||||||
// SmartDialog.dismiss();
|
// SmartDialog.dismiss();
|
||||||
print(error);
|
print(error);
|
||||||
});
|
});
|
||||||
// await AppInstaller.installApk(filePath, actionRequired: false);
|
await AppInstaller.installApk(filePath, actionRequired: false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -78,7 +78,7 @@ class _CustomDialogState extends State<YesAgreementDialog> {
|
|||||||
margin: EdgeInsets.only(left: 10.sp, right: 10.sp),
|
margin: EdgeInsets.only(left: 10.sp, right: 10.sp),
|
||||||
child: RichText(
|
child: RichText(
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
text: "感谢您信任并使用跨友APP,在你使用跨友的服务之前,请认真阅读",
|
text: "感谢您信任并使用微乐园APP,在你使用微乐园的服务之前,请认真阅读",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 14.sp,
|
fontSize: 14.sp,
|
||||||
@ -112,7 +112,7 @@ class _CustomDialogState extends State<YesAgreementDialog> {
|
|||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text:
|
text:
|
||||||
"的全部内容,以了解用户权力义务和个人信息处理规则。跨友仅会将您的信息用于提供服务和改善体验,我们将权力保障您的信息安全,请同意后使用,若您不同意本隐私政策,很遗憾,我们将无法为您提供完整的产品和服务。",
|
"的全部内容,以了解用户权力义务和个人信息处理规则。微乐园仅会将您的信息用于提供服务和改善体验,我们将权力保障您的信息安全,请同意后使用,若您不同意本隐私政策,很遗憾,我们将无法为您提供完整的产品和服务。",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 14.sp,
|
fontSize: 14.sp,
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'dart:ffi';
|
|
||||||
|
|
||||||
import 'package:circle_app/app/circle/logic.dart';
|
import 'package:circle_app/app/circle/logic.dart';
|
||||||
import 'package:circle_app/app/minefragment/logic.dart';
|
import 'package:circle_app/app/minefragment/logic.dart';
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import 'package:tencent_cloud_chat_uikit/ui/widgets/customize_ball_pulse_header.
|
|||||||
import 'package:tencent_cloud_chat_uikit/base_widgets/tim_ui_kit_base.dart';
|
import 'package:tencent_cloud_chat_uikit/base_widgets/tim_ui_kit_base.dart';
|
||||||
import 'package:tencent_cloud_chat_uikit/ui/widgets/wide_popup.dart';
|
import 'package:tencent_cloud_chat_uikit/ui/widgets/wide_popup.dart';
|
||||||
|
|
||||||
|
import '../../../util/eventBus.dart';
|
||||||
import 'tim_uikit_conversation_item.dart';
|
import 'tim_uikit_conversation_item.dart';
|
||||||
|
|
||||||
typedef TIMConversationItemBuilder = Widget Function(
|
typedef TIMConversationItemBuilder = Widget Function(
|
||||||
@ -190,9 +191,11 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
|||||||
model.setSelectedConversation(conversation);
|
model.setSelectedConversation(conversation);
|
||||||
}
|
}
|
||||||
|
|
||||||
_clearHistory(V2TimConversation conversationItem) {
|
_clearHistory(V2TimConversation conversationItem) async{
|
||||||
_timuiKitConversationController.clearHistoryMessage(
|
await _timuiKitConversationController.clearHistoryMessage(
|
||||||
conversation: conversationItem);
|
conversation: conversationItem);
|
||||||
|
await Future.delayed(Duration(seconds: 1));
|
||||||
|
EventBusManager.fire(RefreshUnread());
|
||||||
}
|
}
|
||||||
|
|
||||||
_pinConversation(V2TimConversation conversation) {
|
_pinConversation(V2TimConversation conversation) {
|
||||||
@ -201,9 +204,11 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
|||||||
isPinned: !conversation.isPinned!);
|
isPinned: !conversation.isPinned!);
|
||||||
}
|
}
|
||||||
|
|
||||||
_deleteConversation(V2TimConversation conversation) {
|
_deleteConversation(V2TimConversation conversation) async{
|
||||||
_timuiKitConversationController.deleteConversation(
|
await _timuiKitConversationController.deleteConversation(
|
||||||
conversationID: conversation.conversationID);
|
conversationID: conversation.conversationID);
|
||||||
|
await Future.delayed(Duration(seconds: 1));
|
||||||
|
EventBusManager.fire(RefreshUnread());
|
||||||
}
|
}
|
||||||
|
|
||||||
List<V2TimConversation?> getFilteredConversation() {
|
List<V2TimConversation?> getFilteredConversation() {
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import 'package:get/get.dart';
|
|||||||
import '../../router/app_routers.dart';
|
import '../../router/app_routers.dart';
|
||||||
import '../../util/SharedPreferencesHelper.dart';
|
import '../../util/SharedPreferencesHelper.dart';
|
||||||
import '../dialog/YesAgreementDialog.dart';
|
import '../dialog/YesAgreementDialog.dart';
|
||||||
|
import '../select_circle/logic.dart';
|
||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
|
|
||||||
import '../../network/api.dart';
|
import '../../network/api.dart';
|
||||||
@ -23,28 +24,44 @@ class SplashLogic extends GetxController {
|
|||||||
void onReady() async {
|
void onReady() async {
|
||||||
// TODO: implement onReady
|
// TODO: implement onReady
|
||||||
super.onReady();
|
super.onReady();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() async {
|
void onInit() async {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
// await Future.delayed(Duration(seconds: 30));
|
// await Future.delayed(Duration(seconds: 30));
|
||||||
|
|
||||||
|
var data1 =
|
||||||
|
await DioManager.instance.get(url: Api.getCircleList, params: {});
|
||||||
|
var bean1 = BaseResponse<ConfigBean>.fromJson(
|
||||||
|
data1, (data1) => ConfigBean.fromJson(data1));
|
||||||
|
if (bean1.code == 200) {
|
||||||
|
configBean = bean1.data!;
|
||||||
|
|
||||||
|
configBean.genderMap.forEach((key, value) {
|
||||||
|
genderList.add(value);
|
||||||
|
});
|
||||||
|
|
||||||
|
configBean.orientationMap.forEach((key, value) {
|
||||||
|
orientationList.add(value);
|
||||||
|
});
|
||||||
|
configBean.roleMap.forEach((key, value) {
|
||||||
|
roleList.add(value);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((await getAuthorization()).isEmpty) {
|
if ((await getAuthorization()).isEmpty) {
|
||||||
if(Platform.isIOS){
|
if (Platform.isIOS) {
|
||||||
pushLoginPage();
|
pushLoginPage();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bool isAgreemement = await getAgreemement();
|
bool isAgreemement = await getAgreemement();
|
||||||
if(!isAgreemement){
|
if (!isAgreemement) {
|
||||||
showReportDialog();
|
showReportDialog();
|
||||||
}else{
|
} else {
|
||||||
pushLoginPage();
|
pushLoginPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
var data =
|
var data =
|
||||||
await DioManager.instance.put(url: Api.refreshToken, params: {});
|
await DioManager.instance.put(url: Api.refreshToken, params: {});
|
||||||
@ -65,7 +82,8 @@ class SplashLogic extends GetxController {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} else if(bean.code == 5000||bean.code == 5001||bean.code == 5002||bean.code == 5003){
|
} else if (bean.code == 5000 || bean.code == 5001 || bean.code == 5002 ||
|
||||||
|
bean.code == 5003) {
|
||||||
pushLoginPage();
|
pushLoginPage();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -73,7 +91,7 @@ class SplashLogic extends GetxController {
|
|||||||
if (bean.code == 500) {
|
if (bean.code == 500) {
|
||||||
await Future.delayed(Duration(seconds: 5));
|
await Future.delayed(Duration(seconds: 5));
|
||||||
onInit();
|
onInit();
|
||||||
}else {
|
} else {
|
||||||
pushLoginPage();
|
pushLoginPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
|||||||
import '../../components/my_app_bar.dart';
|
import '../../components/my_app_bar.dart';
|
||||||
import '../../router/app_routers.dart';
|
import '../../router/app_routers.dart';
|
||||||
import '../../util/util.dart';
|
import '../../util/util.dart';
|
||||||
|
import '../select_circle/logic.dart';
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
|
|
||||||
class UserinfoPage extends StatefulWidget {
|
class UserinfoPage extends StatefulWidget {
|
||||||
@ -413,6 +414,11 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
logic.isBlack||logic.isDestroy||logic.isBlackBeen?Container(): GestureDetector(
|
logic.isBlack||logic.isDestroy||logic.isBlackBeen?Container(): GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
if(!logic.isShowAlbum){
|
||||||
|
List<MyConfigData> numbers = [];
|
||||||
|
var data = Get.toNamed(AppRoutes.Call_out, arguments: {'numbers': numbers});
|
||||||
|
return ;
|
||||||
|
}
|
||||||
if (controller.isMe) {
|
if (controller.isMe) {
|
||||||
controller.isEdit = !controller.isEdit;
|
controller.isEdit = !controller.isEdit;
|
||||||
controller.update();
|
controller.update();
|
||||||
@ -421,7 +427,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Visibility(
|
child: Visibility(
|
||||||
visible: logic.isShowAlbum,
|
// visible: logic.isShowAlbum,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(17),
|
borderRadius: BorderRadius.circular(17),
|
||||||
@ -439,13 +445,14 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
horizontal: 12.sp,
|
horizontal: 12.sp,
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
|
logic.isShowAlbum?
|
||||||
controller.isMe
|
controller.isMe
|
||||||
? controller.isEdit
|
? controller.isEdit
|
||||||
? "完成"
|
? "完成"
|
||||||
: "管理"
|
: "管理"
|
||||||
: controller.isUrgeStatus
|
: controller.isUrgeStatus
|
||||||
? "已催更"
|
? "已催更"
|
||||||
: "催更",
|
: "催更":"发布喊话",
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
@ -477,7 +484,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
style: const TextStyle(color: Colors.white30),
|
style: const TextStyle(color: Colors.white30),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
controller.state.imaglist.isEmpty && !controller.isEdit
|
controller.state.imaglist.isEmpty && !controller.isMe
|
||||||
? Center(
|
? Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
@ -510,19 +517,21 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
crossAxisCount: 3,
|
crossAxisCount: 3,
|
||||||
),
|
),
|
||||||
itemCount: controller.isMe
|
itemCount: controller.isMe
|
||||||
? controller.isEdit
|
// ? controller.isEdit
|
||||||
? controller.state.imaglist.length < 15
|
// ? controller.state.imaglist.length < 15
|
||||||
? controller.state.imaglist.length + 1
|
// ? controller.state.imaglist.length
|
||||||
: controller.state.imaglist.length
|
? controller.state.imaglist.length+1
|
||||||
: controller.state.imaglist.length
|
: controller.state.imaglist.length ,
|
||||||
: controller.state.imaglist.length,
|
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
if (controller.isMe &&
|
print("123123123123");
|
||||||
controller.isEdit &&
|
if (controller.isMe ) {
|
||||||
controller.state.imaglist.length < 15) {
|
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
if(controller.state.imaglist.length >= 15){
|
||||||
|
showOKToast("最大只可上传15张图片哦~");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
controller.getImageFile();
|
controller.getImageFile();
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|||||||
@ -255,7 +255,7 @@ class DioManager {
|
|||||||
// String? errorMsg = isNetworkConnected
|
// String? errorMsg = isNetworkConnected
|
||||||
// ? e.requestOptions.extra["errorMsg"]
|
// ? e.requestOptions.extra["errorMsg"]
|
||||||
// : "网络连接断开,请检查网络设置";
|
// : "网络连接断开,请检查网络设置";
|
||||||
return {'code': 500, 'msg': '加载中'};
|
return {'code': 500, 'msg': '加载中${e.message}'};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// 其他一些意外的报错
|
// 其他一些意外的报错
|
||||||
return {'code': 500, 'msg': '加载中...'};
|
return {'code': 500, 'msg': '加载中...'};
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import 'package:oktoast/oktoast.dart';
|
|||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
import 'package:video_compress/video_compress.dart';
|
import 'package:video_compress/video_compress.dart';
|
||||||
|
|
||||||
|
import '../app/select_circle/logic.dart';
|
||||||
import 'SharedPreferencesHelper.dart';
|
import 'SharedPreferencesHelper.dart';
|
||||||
|
|
||||||
class Util {}
|
class Util {}
|
||||||
@ -177,7 +178,19 @@ String getAgeCOntent(int gender, int age, int role, int orientation) {
|
|||||||
return "${getGenderContent(gender)}·${age}·${getRoleContent(role)}·${getOrientationContent(orientation)}";
|
return "${getGenderContent(gender)}·${age}·${getRoleContent(role)}·${getOrientationContent(orientation)}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
late ConfigBean configBean;
|
||||||
|
List<MyConfigData> numbers = [];
|
||||||
|
|
||||||
|
List<String> genderList = [];
|
||||||
|
|
||||||
|
List<String> orientationList = [];
|
||||||
|
|
||||||
|
List<String> roleList = [];
|
||||||
|
|
||||||
String getGenderContent(int number) {
|
String getGenderContent(int number) {
|
||||||
|
if(genderList.length!=0){
|
||||||
|
return genderList[number-1];
|
||||||
|
}else {
|
||||||
switch (number) {
|
switch (number) {
|
||||||
case 1:
|
case 1:
|
||||||
return "男";
|
return "男";
|
||||||
@ -194,9 +207,13 @@ String getGenderContent(int number) {
|
|||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String getOrientationContent(int number) {
|
String getOrientationContent(int number) {
|
||||||
|
if(orientationList.length!=0){
|
||||||
|
return orientationList[number-1];
|
||||||
|
}else {
|
||||||
switch (number) {
|
switch (number) {
|
||||||
case 1:
|
case 1:
|
||||||
return "异性恋";
|
return "异性恋";
|
||||||
@ -215,9 +232,13 @@ String getOrientationContent(int number) {
|
|||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String getRoleContent(int number) {
|
String getRoleContent(int number) {
|
||||||
|
if(roleList.length!=0){
|
||||||
|
return roleList[number-1];
|
||||||
|
}else {
|
||||||
switch (number) {
|
switch (number) {
|
||||||
case 1:
|
case 1:
|
||||||
return "Sado";
|
return "Sado";
|
||||||
@ -232,6 +253,7 @@ String getRoleContent(int number) {
|
|||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef void MyCallback(String path);
|
typedef void MyCallback(String path);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user