|
@@ -1,10 +1,8 @@ |
|
|
import 'dart:convert';
|
|
|
import 'dart:convert';
|
|
|
import 'dart:io';
|
|
|
|
|
|
import 'package:chat/home/fans_page.dart';
|
|
|
import 'package:chat/home/fans_page.dart';
|
|
|
import 'package:chat/home/goddess_hot.dart';
|
|
|
import 'package:chat/home/goddess_hot.dart';
|
|
|
import 'package:chat/home/my_headview.dart';
|
|
|
import 'package:chat/home/my_headview.dart';
|
|
|
import 'package:chat/home/photo_page.dart';
|
|
|
import 'package:chat/home/photo_page.dart';
|
|
|
import 'package:chat/home/rich_title.dart';
|
|
|
|
|
|
import 'package:chat/models/ChatMsg.dart';
|
|
|
import 'package:chat/models/ChatMsg.dart';
|
|
|
import 'package:chat/models/money_change.dart';
|
|
|
import 'package:chat/models/money_change.dart';
|
|
|
import 'package:chat/models/ref_name_provider.dart';
|
|
|
import 'package:chat/models/ref_name_provider.dart';
|
|
@@ -14,7 +12,6 @@ import 'package:chat/utils/ChargeMoney.dart'; |
|
|
import 'package:chat/utils/app_navigator.dart';
|
|
|
import 'package:chat/utils/app_navigator.dart';
|
|
|
import 'package:chat/utils/blacklist_mgr.dart';
|
|
|
import 'package:chat/utils/blacklist_mgr.dart';
|
|
|
import 'package:chat/utils/conversation_table.dart';
|
|
|
import 'package:chat/utils/conversation_table.dart';
|
|
|
import 'package:chat/utils/file_cache_mgr.dart';
|
|
|
|
|
|
import 'package:chat/utils/friend_list_mgr.dart';
|
|
|
import 'package:chat/utils/friend_list_mgr.dart';
|
|
|
import 'package:chat/utils/msgHandler.dart';
|
|
|
import 'package:chat/utils/msgHandler.dart';
|
|
|
import 'package:chat/utils/screen.dart';
|
|
|
import 'package:chat/utils/screen.dart';
|
|
@@ -34,10 +31,8 @@ import 'package:chat/utils/CustomUI.dart'; |
|
|
import 'package:chat/utils/MessageMgr.dart';
|
|
|
import 'package:chat/utils/MessageMgr.dart';
|
|
|
import 'package:chat/utils/TutorialOverlay.dart';
|
|
|
import 'package:chat/utils/TutorialOverlay.dart';
|
|
|
import 'package:cached_network_image/cached_network_image.dart';
|
|
|
import 'package:cached_network_image/cached_network_image.dart';
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:image_picker/image_picker.dart';
|
|
|
import 'package:image_picker/image_picker.dart';
|
|
|
import 'package:multi_image_picker/multi_image_picker.dart';
|
|
|
|
|
|
import 'package:oktoast/oktoast.dart';
|
|
|
import 'package:oktoast/oktoast.dart';
|
|
|
import 'package:permission_handler/permission_handler.dart';
|
|
|
import 'package:permission_handler/permission_handler.dart';
|
|
|
import 'package:provider/provider.dart';
|
|
|
import 'package:provider/provider.dart';
|
|
@@ -56,7 +51,6 @@ import "package:chat/utils/PicSwiper.dart"; |
|
|
import 'add_friend.dart';
|
|
|
import 'add_friend.dart';
|
|
|
import 'apply_content_view.dart';
|
|
|
import 'apply_content_view.dart';
|
|
|
import 'daily_bonus_page.dart';
|
|
|
import 'daily_bonus_page.dart';
|
|
|
import 'money_picture_view.dart';
|
|
|
|
|
|
import 'dart:math' as math;
|
|
|
import 'dart:math' as math;
|
|
|
|
|
|
|
|
|
var cardWidth;
|
|
|
var cardWidth;
|
|
@@ -176,7 +170,6 @@ class _ProfilePageState extends State<ProfilePage> |
|
|
});
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
getImg();
|
|
|
|
|
|
if (isMyself) {
|
|
|
if (isMyself) {
|
|
|
HttpUtil().getWealth(context, (data) {
|
|
|
HttpUtil().getWealth(context, (data) {
|
|
|
wealthData = data;
|
|
|
wealthData = data;
|
|
@@ -296,10 +289,6 @@ class _ProfilePageState extends State<ProfilePage> |
|
|
});
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
msgRefreshPhoto(data) {
|
|
|
|
|
|
getImg();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
msgUpdateData(data) {
|
|
|
msgUpdateData(data) {
|
|
|
print('msgUpdateData $data');
|
|
|
print('msgUpdateData $data');
|
|
|
getUserInfo(mymsg: data);
|
|
|
getUserInfo(mymsg: data);
|
|
@@ -326,7 +315,6 @@ class _ProfilePageState extends State<ProfilePage> |
|
|
void messageOn() {
|
|
|
void messageOn() {
|
|
|
MessageMgr().on('inform_sucess', msgInformSucess);
|
|
|
MessageMgr().on('inform_sucess', msgInformSucess);
|
|
|
MessageMgr().on('refresh_money', msgBuyVip);
|
|
|
MessageMgr().on('refresh_money', msgBuyVip);
|
|
|
MessageMgr().on('refresh_photo', msgRefreshPhoto);
|
|
|
|
|
|
MessageMgr().on('update_data', msgUpdateData);
|
|
|
MessageMgr().on('update_data', msgUpdateData);
|
|
|
MessageMgr().on('delete_program', msgListDelete);
|
|
|
MessageMgr().on('delete_program', msgListDelete);
|
|
|
MessageMgr().on('post_add_friend', msgAddFriend);
|
|
|
MessageMgr().on('post_add_friend', msgAddFriend);
|
|
@@ -338,7 +326,6 @@ class _ProfilePageState extends State<ProfilePage> |
|
|
void messageOff() {
|
|
|
void messageOff() {
|
|
|
MessageMgr().off('inform_sucess', msgInformSucess);
|
|
|
MessageMgr().off('inform_sucess', msgInformSucess);
|
|
|
MessageMgr().off('refresh_money', msgBuyVip);
|
|
|
MessageMgr().off('refresh_money', msgBuyVip);
|
|
|
MessageMgr().off('refresh_photo', msgRefreshPhoto);
|
|
|
|
|
|
MessageMgr().off('update_data', msgUpdateData);
|
|
|
MessageMgr().off('update_data', msgUpdateData);
|
|
|
MessageMgr().off('delete_program', msgListDelete);
|
|
|
MessageMgr().off('delete_program', msgListDelete);
|
|
|
MessageMgr().off('post_add_friend', msgAddFriend);
|
|
|
MessageMgr().off('post_add_friend', msgAddFriend);
|
|
@@ -386,97 +373,6 @@ class _ProfilePageState extends State<ProfilePage> |
|
|
super.dispose();
|
|
|
super.dispose();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
void getImg() async {
|
|
|
|
|
|
var data = {
|
|
|
|
|
|
"visitUserId": UserData().basicInfo.userId,
|
|
|
|
|
|
"userId": widget.userId,
|
|
|
|
|
|
};
|
|
|
|
|
|
data['sign'] = TokenMgr().getSign(data);
|
|
|
|
|
|
|
|
|
|
|
|
Response res = await HttpUtil().post('user/personal/album', data: data);
|
|
|
|
|
|
if (res == null) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
Map resData = res.data;
|
|
|
|
|
|
if (resData['code'] == 0) {
|
|
|
|
|
|
imgList = resData['data'] == null ? [] : resData['data'];
|
|
|
|
|
|
if (isMyself) {
|
|
|
|
|
|
UserData().picNum = 0;
|
|
|
|
|
|
for (int i = 0; i < imgList.length; i++) {
|
|
|
|
|
|
if (imgList[i]['Status'] == 1) {
|
|
|
|
|
|
UserData().picNum++;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (imgList[i]['Status'] == 0 || imgList[i]['Status'] == 2) {
|
|
|
|
|
|
UserData().haveReview = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (mounted) {
|
|
|
|
|
|
setState(() {});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//上传相册
|
|
|
|
|
|
void _uploadPhoto() async {
|
|
|
|
|
|
int leftLength = MaxImgSize - imgList.length;
|
|
|
|
|
|
if (leftLength <= 0) {
|
|
|
|
|
|
showToast(I18n.of(context)
|
|
|
|
|
|
.max_upload_size
|
|
|
|
|
|
.replaceFirst('/s1', MaxImgSize.toString()));
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
List<Asset> resultList = List<Asset>();
|
|
|
|
|
|
|
|
|
|
|
|
resultList = await MultiImagePicker.pickImages(
|
|
|
|
|
|
maxImages: leftLength > 9 ? 9 : leftLength,
|
|
|
|
|
|
enableCamera: false,
|
|
|
|
|
|
selectedAssets: [],
|
|
|
|
|
|
cupertinoOptions: CupertinoOptions(takePhotoIcon: "chat"),
|
|
|
|
|
|
materialOptions: MaterialOptions(
|
|
|
|
|
|
actionBarColor: "#50A7F9",
|
|
|
|
|
|
actionBarTitle: "Hibok",
|
|
|
|
|
|
allViewTitle: "",
|
|
|
|
|
|
useDetailsView: true,
|
|
|
|
|
|
selectCircleStrokeColor: "#000000",
|
|
|
|
|
|
),
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
if (resultList != null && resultList.length > 0) {
|
|
|
|
|
|
List<File> fileList = [];
|
|
|
|
|
|
for (var i = 0; i < resultList.length; i++) {
|
|
|
|
|
|
Asset photoEntity = resultList[i];
|
|
|
|
|
|
print('名字:${photoEntity.name}');
|
|
|
|
|
|
ByteData byteData = await photoEntity.getByteData();
|
|
|
|
|
|
File file = await FileCacheMgr().writeFile(
|
|
|
|
|
|
'temp-photo-${DateTime.now().millisecondsSinceEpoch}.png',
|
|
|
|
|
|
byteData.buffer.asInt8List(0));
|
|
|
|
|
|
|
|
|
|
|
|
fileList.add(file);
|
|
|
|
|
|
}
|
|
|
|
|
|
print('文件列表${fileList.length}');
|
|
|
|
|
|
Map data = {"type": 2, "userId": UserData().basicInfo.userId};
|
|
|
|
|
|
data['sign'] = TokenMgr().getSign(data);
|
|
|
|
|
|
data['sex'] = UserData().basicInfo.sex;
|
|
|
|
|
|
data['isBurn'] = 0;
|
|
|
|
|
|
Response res = await HttpUtil().uploadFiles(
|
|
|
|
|
|
fileList, data, 'upload/post/postfiles', 'image',
|
|
|
|
|
|
isShowLoading: true);
|
|
|
|
|
|
var resData = res.data;
|
|
|
|
|
|
if (resData['code'] == 0) {
|
|
|
|
|
|
if (resData['data']['msg'] != '' && resData['data']['msg'] != null) {
|
|
|
|
|
|
showToast(resData['data']['msg']);
|
|
|
|
|
|
}
|
|
|
|
|
|
if (resData['msg'].split('|').length != fileList.length) {
|
|
|
|
|
|
showToast(I18n.of(context).hava_error_photo);
|
|
|
|
|
|
}
|
|
|
|
|
|
MessageMgr().emit('refresh_photo');
|
|
|
|
|
|
} else {
|
|
|
|
|
|
showToast(resData['msg']);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
showHeadView() {
|
|
|
showHeadView() {
|
|
|
Navigator.of(context).push(
|
|
|
Navigator.of(context).push(
|
|
|
new MaterialPageRoute(
|
|
|
new MaterialPageRoute(
|
|
@@ -796,7 +692,7 @@ class _ProfilePageState extends State<ProfilePage> |
|
|
return InkWell(
|
|
|
return InkWell(
|
|
|
onTap: callback,
|
|
|
onTap: callback,
|
|
|
child: Container(
|
|
|
child: Container(
|
|
|
width: (Screen.width - 130) / 3,
|
|
|
|
|
|
|
|
|
width: (Screen.width - 105) / 3,
|
|
|
child: Column(
|
|
|
child: Column(
|
|
|
children: <Widget>[
|
|
|
children: <Widget>[
|
|
|
Stack(
|
|
|
Stack(
|
|
@@ -808,7 +704,7 @@ class _ProfilePageState extends State<ProfilePage> |
|
|
style: TextStyle(
|
|
|
style: TextStyle(
|
|
|
fontSize: 15,
|
|
|
fontSize: 15,
|
|
|
color: Constants.BlackTextColor,
|
|
|
color: Constants.BlackTextColor,
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w400),
|
|
|
)),
|
|
|
)),
|
|
|
isShowDot
|
|
|
isShowDot
|
|
|
? Positioned(
|
|
|
? Positioned(
|
|
@@ -996,241 +892,6 @@ class _ProfilePageState extends State<ProfilePage> |
|
|
);
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
Widget _buildMyPicture() {
|
|
|
|
|
|
var pisc = imgList
|
|
|
|
|
|
.map((f) => PicSwiperItem(
|
|
|
|
|
|
f['ImgUrl'],
|
|
|
|
|
|
id: f['Id'],
|
|
|
|
|
|
type: f['Type'],
|
|
|
|
|
|
isWatch: f['IsCheck'] == 1,
|
|
|
|
|
|
userId: userInfo.userId,
|
|
|
|
|
|
isBuy: f['PayStatus'] == 1,
|
|
|
|
|
|
isCheck: f['Status'] == 0,
|
|
|
|
|
|
))
|
|
|
|
|
|
.toList();
|
|
|
|
|
|
var list = imgList.map((data) {
|
|
|
|
|
|
var width = MediaQuery.of(context).size.width / 4 - 15;
|
|
|
|
|
|
bool isWatch = data['IsCheck'] == 1;
|
|
|
|
|
|
double raduis = 10;
|
|
|
|
|
|
return CustomUI.buildImgCover(data['Id'], pisc, data['ImgUrl'], width,
|
|
|
|
|
|
raduis, isWatch, context, data['Type'],
|
|
|
|
|
|
isMyself: isMyself,
|
|
|
|
|
|
payStatus: data['PayStatus'],
|
|
|
|
|
|
state: isMan ? 1 : data['Status']);
|
|
|
|
|
|
}).toList();
|
|
|
|
|
|
if (!isBuyPicture && list.length > 4) {
|
|
|
|
|
|
list.length = 4;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TitleItem title;
|
|
|
|
|
|
if (!isMan) {
|
|
|
|
|
|
title = UserData().isVip
|
|
|
|
|
|
? TitleItem(
|
|
|
|
|
|
title: I18n.of(context).unlock_user,
|
|
|
|
|
|
name: Provider.of<RefNameProvider>(context)
|
|
|
|
|
|
.getRefName(userInfo.userId, userInfo.nickName),
|
|
|
|
|
|
)
|
|
|
|
|
|
: TitleItem(
|
|
|
|
|
|
title: I18n.of(context).free_unlock,
|
|
|
|
|
|
name: userInfo.price.toString() + I18n.of(context).mask_coin);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
title = TitleItem(
|
|
|
|
|
|
title: I18n.of(context).pay_unlock, name: userInfo.price.toString());
|
|
|
|
|
|
}
|
|
|
|
|
|
//我的相册
|
|
|
|
|
|
return Container(
|
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
|
margin: EdgeInsets.only(top: Separate_Size),
|
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10),
|
|
|
|
|
|
width: isMyself ? Screen.width : cardWidth,
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
FullWidthButton(
|
|
|
|
|
|
title: (isMyself
|
|
|
|
|
|
? I18n.of(context).my_album
|
|
|
|
|
|
: (isMan
|
|
|
|
|
|
? I18n.of(context).his_photo
|
|
|
|
|
|
: I18n.of(context).her_photo)),
|
|
|
|
|
|
description: isMyself
|
|
|
|
|
|
? '${I18n.of(context).upload}(${imgList.length}/$MaxImgSize)'
|
|
|
|
|
|
: '',
|
|
|
|
|
|
descriptionColor: Constants.BlueTextColor,
|
|
|
|
|
|
showDivider: true,
|
|
|
|
|
|
showRightIcon: false,
|
|
|
|
|
|
onPressed: isMyself ? _uploadPhoto : () {},
|
|
|
|
|
|
),
|
|
|
|
|
|
list.length == 0
|
|
|
|
|
|
? (isMyself
|
|
|
|
|
|
? InkWell(
|
|
|
|
|
|
onTap: _uploadPhoto,
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
height: 100,
|
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
Text(I18n.of(context).first_photo,
|
|
|
|
|
|
textScaleFactor: 1.0),
|
|
|
|
|
|
Text(
|
|
|
|
|
|
isMan
|
|
|
|
|
|
? I18n.of(context).have_picture
|
|
|
|
|
|
: I18n.of(context).no_photo,
|
|
|
|
|
|
textScaleFactor: 1.0,
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
fontSize: 12, color: Colors.grey))
|
|
|
|
|
|
],
|
|
|
|
|
|
)))
|
|
|
|
|
|
: Container(
|
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
|
height: 120,
|
|
|
|
|
|
child: Text(
|
|
|
|
|
|
isMan
|
|
|
|
|
|
? I18n.of(context).not_up_man
|
|
|
|
|
|
: I18n.of(context).not_up_women,
|
|
|
|
|
|
textScaleFactor: 1.0,
|
|
|
|
|
|
style: TextStyle(fontSize: 14),
|
|
|
|
|
|
),
|
|
|
|
|
|
))
|
|
|
|
|
|
: (isBuyPicture
|
|
|
|
|
|
? Container(
|
|
|
|
|
|
//alignment: Alignment.center,
|
|
|
|
|
|
child: Wrap(
|
|
|
|
|
|
crossAxisAlignment: WrapCrossAlignment.start,
|
|
|
|
|
|
children: list,
|
|
|
|
|
|
))
|
|
|
|
|
|
: Container(
|
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
|
child: Stack(
|
|
|
|
|
|
//alignment: Alignment.center,
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
Wrap(
|
|
|
|
|
|
crossAxisAlignment: WrapCrossAlignment.start,
|
|
|
|
|
|
children: list,
|
|
|
|
|
|
),
|
|
|
|
|
|
Opacity(
|
|
|
|
|
|
opacity: 0.96,
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
decoration: BoxDecoration(color: Colors.white),
|
|
|
|
|
|
height: 200,
|
|
|
|
|
|
),
|
|
|
|
|
|
),
|
|
|
|
|
|
Container(
|
|
|
|
|
|
height: 200,
|
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
Image.asset(
|
|
|
|
|
|
'assets/images/suo.png',
|
|
|
|
|
|
width: 35,
|
|
|
|
|
|
color: Colors.grey[700],
|
|
|
|
|
|
),
|
|
|
|
|
|
Container(
|
|
|
|
|
|
margin: EdgeInsets.only(top: 10),
|
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
|
child: Text(
|
|
|
|
|
|
isMan
|
|
|
|
|
|
? I18n.of(context).set_lock
|
|
|
|
|
|
: I18n.of(context).set_lock2,
|
|
|
|
|
|
textScaleFactor: 1.0,
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
color: Colors.grey[700],
|
|
|
|
|
|
fontSize: 15),
|
|
|
|
|
|
),
|
|
|
|
|
|
),
|
|
|
|
|
|
Container(
|
|
|
|
|
|
margin: EdgeInsets.only(top: 8),
|
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
|
child: RichText(
|
|
|
|
|
|
text: TextSpan(
|
|
|
|
|
|
children: RichTitle.getRichText(title,
|
|
|
|
|
|
titleStyle: TextStyle(
|
|
|
|
|
|
color: Colors.grey[700],
|
|
|
|
|
|
fontSize: 13),
|
|
|
|
|
|
nameStyle: TextStyle(
|
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
|
fontSize: 13))),
|
|
|
|
|
|
),
|
|
|
|
|
|
),
|
|
|
|
|
|
InkWell(
|
|
|
|
|
|
onTap: buyPhoto,
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
margin: EdgeInsets.only(top: 10),
|
|
|
|
|
|
padding:
|
|
|
|
|
|
EdgeInsets.only(top: 6, bottom: 6),
|
|
|
|
|
|
width: 100,
|
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
|
decoration: Constants
|
|
|
|
|
|
.ConfirmBUttonBoxDecoration,
|
|
|
|
|
|
child: Text(
|
|
|
|
|
|
I18n.of(context).unlock,
|
|
|
|
|
|
textScaleFactor: 1.0,
|
|
|
|
|
|
style: TextStyle(color: Colors.white),
|
|
|
|
|
|
),
|
|
|
|
|
|
)),
|
|
|
|
|
|
],
|
|
|
|
|
|
))
|
|
|
|
|
|
],
|
|
|
|
|
|
))),
|
|
|
|
|
|
!isMan && isMyself
|
|
|
|
|
|
? InkWell(
|
|
|
|
|
|
onTap: () {
|
|
|
|
|
|
if (!userInfo.isAttestation) {
|
|
|
|
|
|
_buildNotTrue();
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (imgList.length == 0) {
|
|
|
|
|
|
showToast(I18n.of(context).no_photos);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
var moneyList = [];
|
|
|
|
|
|
for (int i = 0; i < imgList.length; i++) {
|
|
|
|
|
|
if (imgList[i]['Status'] == 1) {
|
|
|
|
|
|
moneyList.add(imgList[i]);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
Navigator.of(context)
|
|
|
|
|
|
.push(new MaterialPageRoute(builder: (context) {
|
|
|
|
|
|
return MoneyPicture(
|
|
|
|
|
|
imageList: moneyList,
|
|
|
|
|
|
);
|
|
|
|
|
|
}));
|
|
|
|
|
|
},
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
|
|
margin: EdgeInsets.only(top: 10, right: 10, bottom: 10),
|
|
|
|
|
|
padding: EdgeInsets.only(top: 10),
|
|
|
|
|
|
child: Text(
|
|
|
|
|
|
I18n.of(context).set_photo,
|
|
|
|
|
|
textScaleFactor: 1.0,
|
|
|
|
|
|
style: TextStyle(color: Colors.red),
|
|
|
|
|
|
),
|
|
|
|
|
|
))
|
|
|
|
|
|
: Container(),
|
|
|
|
|
|
],
|
|
|
|
|
|
),
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
border: Border(
|
|
|
|
|
|
top: Constants.GreyBorderSide, bottom: Constants.GreyBorderSide)),
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void _buildNotTrue() {
|
|
|
|
|
|
CustomUI.buildOneConfirm(context, I18n.of(context).moneyPageTip,
|
|
|
|
|
|
I18n.of(context).authenticate_now, () {
|
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
|
new MaterialPageRoute(
|
|
|
|
|
|
builder: (context) {
|
|
|
|
|
|
return VerificationCenterPage();
|
|
|
|
|
|
},
|
|
|
|
|
|
),
|
|
|
|
|
|
);
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void _buildConfirmBlack() {
|
|
|
void _buildConfirmBlack() {
|
|
|
Navigator.of(context).pop();
|
|
|
Navigator.of(context).pop();
|
|
|
CustomUI.buildOneConfirm(
|
|
|
CustomUI.buildOneConfirm(
|
|
@@ -1448,7 +1109,7 @@ class _ProfilePageState extends State<ProfilePage> |
|
|
'UserName': userInfo.nickName
|
|
|
'UserName': userInfo.nickName
|
|
|
});
|
|
|
});
|
|
|
FriendListMgr().addFriend(friendModel);
|
|
|
FriendListMgr().addFriend(friendModel);
|
|
|
FriendListMgr().deleteLocalUserId();
|
|
|
|
|
|
|
|
|
FriendListMgr().deleteLocalUserIdById(userInfo.userId);
|
|
|
MessageMgr().emit('do_friend_apply',
|
|
|
MessageMgr().emit('do_friend_apply',
|
|
|
{'userId': userInfo.userId, 'state': 1});
|
|
|
{'userId': userInfo.userId, 'state': 1});
|
|
|
MessageMgr().emit('Add friend');
|
|
|
MessageMgr().emit('Add friend');
|
|
@@ -1482,6 +1143,7 @@ class _ProfilePageState extends State<ProfilePage> |
|
|
doFriendApply(2, (msg) {
|
|
|
doFriendApply(2, (msg) {
|
|
|
showToast(msg);
|
|
|
showToast(msg);
|
|
|
Navigator.of(context).pop();
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
|
FriendListMgr().deleteLocalUserIdById(userInfo.userId);
|
|
|
MessageMgr().emit('do_friend_apply',
|
|
|
MessageMgr().emit('do_friend_apply',
|
|
|
{'userId': userInfo.userId, 'state': 2});
|
|
|
{'userId': userInfo.userId, 'state': 2});
|
|
|
});
|
|
|
});
|
|
|