@@ -56,9 +56,9 @@ android { | |||
// manifestPlaceholders = [ | |||
// AMAP_KEY : "1fd4e93e3b4b13747da41f484c955fe2", /// 高德地图key | |||
// ] | |||
// ndk { | |||
// abiFilters 'armeabi-v7a' | |||
// } | |||
// ndk { | |||
// abiFilters 'armeabi-v7a' | |||
// } | |||
multiDexEnabled true | |||
manifestPlaceholders = [ | |||
JPUSH_PKGNAME : 'com.cyhd.henhoandroid', | |||
@@ -433,17 +433,19 @@ class _ChatPageItemState extends State<ChatPageItem> | |||
quoteItem['showTimeStr'], quoteItem['quoteContent'], true)); | |||
} | |||
var contentWidth = _getTextWidth(textList[curTextType]); | |||
width = min(max(contentWidth, width),maxWidth); | |||
width = min(max(contentWidth, width), maxWidth); | |||
showMsg.add(Container( | |||
constraints: BoxConstraints(maxWidth: maxWidth, minHeight: 22), | |||
alignment: Alignment.centerLeft, | |||
child: extendedText( | |||
textList[curTextType], | |||
color: isUrl ? Colors.blue : Constants.BlackTextColor, | |||
hideKeyboard: widget.hideKeyboard, | |||
fontSize: FontSize, | |||
))); | |||
if (textList[curTextType] != '') { | |||
showMsg.add(Container( | |||
constraints: BoxConstraints(maxWidth: maxWidth, minHeight: 22), | |||
alignment: Alignment.centerLeft, | |||
child: extendedText( | |||
textList[curTextType], | |||
color: isUrl ? Colors.blue : Constants.BlackTextColor, | |||
hideKeyboard: widget.hideKeyboard, | |||
fontSize: FontSize, | |||
))); | |||
} | |||
return Container( | |||
constraints: BoxConstraints(maxWidth: Screen.width - 120), | |||
@@ -397,18 +397,19 @@ class _GroupChatPageItemState extends State<GroupChatPageItem> | |||
quoteItem['showTimeStr'], quoteItem['quoteContent'], true)); | |||
} | |||
var contentWidth = _getTextWidth(textList[curTextType]); | |||
width = min(max(contentWidth, width),maxWidth); | |||
width = min(max(contentWidth, width), maxWidth); | |||
showMsg.add(Container( | |||
constraints: BoxConstraints(maxWidth: maxWidth, minHeight: 22), | |||
alignment: Alignment.centerLeft, | |||
child: extendedText( | |||
textList[curTextType], | |||
color: isUrl ? Colors.blue : Constants.BlackTextColor, | |||
hideKeyboard: widget.hideKeyboard, | |||
fontSize: FontSize, | |||
))); | |||
if (textList[curTextType] != '') { | |||
showMsg.add(Container( | |||
constraints: BoxConstraints(maxWidth: maxWidth, minHeight: 22), | |||
alignment: Alignment.centerLeft, | |||
child: extendedText( | |||
textList[curTextType], | |||
color: isUrl ? Colors.blue : Constants.BlackTextColor, | |||
hideKeyboard: widget.hideKeyboard, | |||
fontSize: FontSize, | |||
))); | |||
} | |||
return Container( | |||
constraints: BoxConstraints(maxWidth: Screen.width - 120), | |||
@@ -143,6 +143,7 @@ class InputBarState extends State<InputBar> | |||
print('处理引用消息'); | |||
setState(() { | |||
_isComposingMessage = true; | |||
showKeyBoard(); | |||
}); | |||
} | |||
@@ -196,7 +197,8 @@ class InputBarState extends State<InputBar> | |||
var postion = alterPosition[i]; | |||
if (currentIndex >= postion.startIndex && | |||
currentIndex < postion.endIndex) { | |||
result = originalInputStr.replaceRange(postion.startIndex, postion.endIndex, ''); | |||
result = originalInputStr.replaceRange( | |||
postion.startIndex, postion.endIndex, ''); | |||
starIndex = postion.startIndex; | |||
alterPosition.removeAt(i); | |||
break; | |||
@@ -893,7 +895,7 @@ class InputBarState extends State<InputBar> | |||
} | |||
bool checkMessage() { | |||
if (_textCtrl.text.length == 0) { | |||
if (_textCtrl.text.length == 0 && refMsg == null) { | |||
showToast(I18n.of(context).msg_not); | |||
return false; | |||
} | |||
@@ -23,7 +23,9 @@ import 'package:multi_image_picker/multi_image_picker.dart'; | |||
import 'package:oktoast/oktoast.dart'; | |||
import 'package:provider/provider.dart'; | |||
import 'VerificationCenter.dart'; | |||
import 'VipPage.dart'; | |||
import 'money_picture_view.dart'; | |||
const double LeftSize = 80; | |||
const MaxImgSize = 20; | |||
@@ -151,7 +153,47 @@ class _PhotoPageState extends State<PhotoPage> { | |||
leading: CustomUI.buildCustomLeading(context), | |||
titleSpacing: -10, | |||
centerTitle: true, | |||
elevation: 1), | |||
elevation: 1, | |||
actions: <Widget>[ | |||
!isMan && isMyself | |||
? Container( | |||
alignment: Alignment.center, | |||
child: new InkWell( | |||
child: new Padding( | |||
padding: EdgeInsets.only( | |||
right: 15, left: 15, top: 10, bottom: 10), | |||
child: new Text( | |||
I18n.of(context).set_photo, | |||
textScaleFactor: 1.0, | |||
style: TextStyle(color: Constants.BlueTextColor,fontSize: 12), | |||
), | |||
), | |||
onTap: () { | |||
if (!widget.userInfo.isAttestation) { | |||
_buildNotTrue(); | |||
return; | |||
} | |||
if (imgList.length == 0) { | |||
showToast(I18n.of(context).no_photos); | |||
return; | |||
} | |||
var moneyList = []; | |||
for (int i = 0; i < resultList.length; i++) { | |||
if (resultList[i]['Status'] == 1) { | |||
moneyList.add(resultList[i]); | |||
} | |||
} | |||
Navigator.of(context) | |||
.push(new MaterialPageRoute(builder: (context) { | |||
return MoneyPicture( | |||
imageList: moneyList, | |||
); | |||
})); | |||
}, | |||
), | |||
) | |||
: Container() | |||
]), | |||
backgroundColor: Colors.white, | |||
body: SafeArea( | |||
child: SingleChildScrollView( | |||
@@ -162,6 +204,20 @@ class _PhotoPageState extends State<PhotoPage> { | |||
return CustomUI.buildPageLoading(context, content, !isLoadingFinish); | |||
} | |||
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(); | |||
}, | |||
), | |||
); | |||
}); | |||
} | |||
buyPhoto() { | |||
//女性用户付费,男性用户会员的话免费解锁,非会员付费解锁 | |||
becomeVip() { | |||
@@ -194,6 +194,6 @@ class MsgModel { | |||
} | |||
} | |||
return textList; | |||
return textList.length == 0 ? [''] : textList; | |||
} | |||
} |