提交 18dec114 authored 作者: yueweilu's avatar yueweilu

笔记超长展示问题

上级 958ccddd
...@@ -117,6 +117,7 @@ class LoginController extends GetxController { ...@@ -117,6 +117,7 @@ class LoginController extends GetxController {
/// 登录 /// 登录
void onLogin(BuildContext context) async { void onLogin(BuildContext context) async {
Tools.unfocus();
if (!agree) { if (!agree) {
Toast.show('请先阅读并同意《用户协议》和《隐私政策》'); Toast.show('请先阅读并同意《用户协议》和《隐私政策》');
return; return;
......
...@@ -136,6 +136,7 @@ class _ReadDiscussPageState extends State<ReadDiscussPage> { ...@@ -136,6 +136,7 @@ class _ReadDiscussPageState extends State<ReadDiscussPage> {
top: 0, top: 0,
child: GestureDetector( child: GestureDetector(
onTap: (){ onTap: (){
Tools.unfocus();
controller.setShow(); controller.setShow();
}, },
child: Container( child: Container(
......
...@@ -198,7 +198,7 @@ class _ReadInputDiscussState extends State<ReadInputDiscuss> { ...@@ -198,7 +198,7 @@ class _ReadInputDiscussState extends State<ReadInputDiscuss> {
); );
widget.controller.addDiscussInputImages(assets!.path); widget.controller.addDiscussInputImages(assets!.path);
}, },
child: Container( child: SizedBox(
// color: Colors.red, // color: Colors.red,
width: 25, width: 25,
height: 25, height: 25,
...@@ -215,7 +215,7 @@ class _ReadInputDiscussState extends State<ReadInputDiscuss> { ...@@ -215,7 +215,7 @@ class _ReadInputDiscussState extends State<ReadInputDiscuss> {
} }
}, },
child: Container( child: SizedBox(
// color: Colors.red, // color: Colors.red,
width: 23, width: 23,
height: 23, height: 23,
......
...@@ -34,6 +34,7 @@ class UserEditNoteController extends GetxController { ...@@ -34,6 +34,7 @@ class UserEditNoteController extends GetxController {
void onClose() { void onClose() {
contentInput.dispose(); contentInput.dispose();
audioPlayer.dispose(); audioPlayer.dispose();
Tools.unfocus();
super.onClose(); super.onClose();
} }
...@@ -186,6 +187,7 @@ class UserEditNoteController extends GetxController { ...@@ -186,6 +187,7 @@ class UserEditNoteController extends GetxController {
// 提交 // 提交
Future<bool> submit() async { Future<bool> submit() async {
CustomToast.loading();
// 循环上传图片获取地址 // 循环上传图片获取地址
for(MediaModel mediaModel in model.noteContent!.image!){ for(MediaModel mediaModel in model.noteContent!.image!){
if (mediaModel.id == 0){ if (mediaModel.id == 0){
...@@ -201,6 +203,7 @@ class UserEditNoteController extends GetxController { ...@@ -201,6 +203,7 @@ class UserEditNoteController extends GetxController {
mediaModel.content = url; mediaModel.content = url;
} }
} }
CustomToast.dismiss();
// 组织图片 // 组织图片
List<Map> images = []; List<Map> images = [];
......
...@@ -28,7 +28,9 @@ class _UserEditNotePageState extends State<UserEditNotePage> { ...@@ -28,7 +28,9 @@ class _UserEditNotePageState extends State<UserEditNotePage> {
margin: EdgeInsets.symmetric(horizontal: 10.w), margin: EdgeInsets.symmetric(horizontal: 10.w),
child: Stack( child: Stack(
children: [ children: [
Container( SingleChildScrollView(
padding:EdgeInsets.only(bottom: 100.w),
child: Container(
// color: Colours.cF8, // color: Colours.cF8,
constraints: BoxConstraints( constraints: BoxConstraints(
minHeight: 100.w minHeight: 100.w
...@@ -88,9 +90,7 @@ class _UserEditNotePageState extends State<UserEditNotePage> { ...@@ -88,9 +90,7 @@ class _UserEditNotePageState extends State<UserEditNotePage> {
}, },
itemCount: controller.model.noteContent?.image?.length, itemCount: controller.model.noteContent?.image?.length,
), ),
Container( MediaQuery.removePadding(
// color: Colors.red,
child: MediaQuery.removePadding(
context: context, context: context,
removeTop: true, removeTop: true,
child: ListView.builder( child: ListView.builder(
...@@ -141,20 +141,21 @@ class _UserEditNotePageState extends State<UserEditNotePage> { ...@@ -141,20 +141,21 @@ class _UserEditNotePageState extends State<UserEditNotePage> {
}, },
itemCount: controller.model.noteContent?.audio?.length, itemCount: controller.model.noteContent?.audio?.length,
), ),
),
) )
], ],
) )
], ],
), ),
), ),
),
Visibility( Visibility(
visible: true, visible: true,
child: Positioned( child: Positioned(
left: 10, left: 0,
right: 10, right: 0,
bottom: 0, bottom: 0,
child: Container( child: Container(
color: Colors.white,
padding: EdgeInsets.symmetric(vertical: 10.w), padding: EdgeInsets.symmetric(vertical: 10.w),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
...@@ -169,7 +170,12 @@ class _UserEditNotePageState extends State<UserEditNotePage> { ...@@ -169,7 +170,12 @@ class _UserEditNotePageState extends State<UserEditNotePage> {
); );
controller.addImage(assets!.path); controller.addImage(assets!.path);
}, },
child: Image.asset('assets/images/read_add_img.png')), child: SizedBox(
// color: Colors.red,
width: 25,
height: 25,
child: Image.asset('assets/images/read_add_img.png',fit: BoxFit.contain,)),
),
Gaps.hGaps10, Gaps.hGaps10,
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
...@@ -181,7 +187,11 @@ class _UserEditNotePageState extends State<UserEditNotePage> { ...@@ -181,7 +187,11 @@ class _UserEditNotePageState extends State<UserEditNotePage> {
} }
}, },
child: Image.asset(controller.startRecording?'assets/images/stop.png':'assets/images/read_add_audio.png') child: SizedBox(
width: 23,
height: 23,
child: Image.asset(controller.startRecording?'assets/images/stop.png':'assets/images/read_add_audio.png',fit: BoxFit.contain,)
)
), ),
GestureDetector( GestureDetector(
onTap: (){ onTap: (){
...@@ -191,7 +201,11 @@ class _UserEditNotePageState extends State<UserEditNotePage> { ...@@ -191,7 +201,11 @@ class _UserEditNotePageState extends State<UserEditNotePage> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Gaps.hGaps10, Gaps.hGaps10,
Image.asset(controller.isPublic?'assets/images/pay_check.png':'assets/images/pay_uncheck.png'), SizedBox(
width: 15,
height: 15,
child: Image.asset(controller.isPublic?'assets/images/pay_check.png':'assets/images/public.png',fit: BoxFit.contain,)
),
SizedBox(width: 3.w,), SizedBox(width: 3.w,),
Text('公开',style: TextStyle(fontSize: 13.w,height: 1.3,color: Colours.c9),) Text('公开',style: TextStyle(fontSize: 13.w,height: 1.3,color: Colours.c9),)
], ],
......
...@@ -40,6 +40,7 @@ class _UserNickPageState extends State<UserNickPage> { ...@@ -40,6 +40,7 @@ class _UserNickPageState extends State<UserNickPage> {
// print("保存昵称"); // print("保存昵称");
controller.changeInfo(_textFieldController.text); controller.changeInfo(_textFieldController.text);
_focusNode.unfocus(); _focusNode.unfocus();
Tools.unfocus();
}, },
child: Text( child: Text(
'保存', '保存',
......
...@@ -66,18 +66,20 @@ class BuildNote extends StatelessWidget { ...@@ -66,18 +66,20 @@ class BuildNote extends StatelessWidget {
_showText(model).isEmpty?const SizedBox():Row( _showText(model).isEmpty?const SizedBox():Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text(_showText(model),style: TextStyle( Expanded(
child: Text(_showText(model),style: TextStyle(
fontSize: 14.w, fontSize: 14.w,
height: 1.5, height: 1.5,
// color: Colors.red, // color: Colors.red,
color:Colours.c3 color:Colours.c3
),), ),maxLines: 999,overflow: TextOverflow.ellipsis,),
),
Text(_showStatus(model),style: TextStyle(fontSize: 11.w,height: 1.5,color: AppTheme.primary),), Text(_showStatus(model),style: TextStyle(fontSize: 11.w,height: 1.5,color: AppTheme.primary),),
], ],
), ),
Gaps.vGaps13, model.noteContent!.image!.isEmpty?const SizedBox():Gaps.vGaps13,
_buildImageGridView(), _buildImageGridView(),
Gaps.vGaps13, model.noteContent!.audio!.isEmpty?const SizedBox():Gaps.vGaps13,
_buildAudioListView(), _buildAudioListView(),
Gaps.vGaps13, Gaps.vGaps13,
Container( Container(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论