Showing
6 changed files
with
614 additions
and
354 deletions
| @@ -47,6 +47,10 @@ class CommentsSunModel { | @@ -47,6 +47,10 @@ class CommentsSunModel { | ||
| 47 | String isnoshow; | 47 | String isnoshow; |
| 48 | Reply reply; | 48 | Reply reply; |
| 49 | 49 | ||
| 50 | + String ddate; | ||
| 51 | + String ddateSolt; | ||
| 52 | + String tableinfo; | ||
| 53 | + | ||
| 50 | String get createTimeStr { | 54 | String get createTimeStr { |
| 51 | DateTime dateTime = DateTime.fromMillisecondsSinceEpoch( | 55 | DateTime dateTime = DateTime.fromMillisecondsSinceEpoch( |
| 52 | int.parse(createTime.toString()) * 1000); | 56 | int.parse(createTime.toString()) * 1000); |
| @@ -67,7 +71,10 @@ class CommentsSunModel { | @@ -67,7 +71,10 @@ class CommentsSunModel { | ||
| 67 | this.createTime, | 71 | this.createTime, |
| 68 | this.enclosure, | 72 | this.enclosure, |
| 69 | this.isnoshow, | 73 | this.isnoshow, |
| 70 | - this.reply}); | 74 | + this.reply, |
| 75 | + this.ddate, | ||
| 76 | + this.ddateSolt, | ||
| 77 | + this.tableinfo}); | ||
| 71 | 78 | ||
| 72 | CommentsSunModel.fromJson(Map<String, dynamic> json) { | 79 | CommentsSunModel.fromJson(Map<String, dynamic> json) { |
| 73 | id = json['id']; | 80 | id = json['id']; |
| @@ -93,6 +100,10 @@ class CommentsSunModel { | @@ -93,6 +100,10 @@ class CommentsSunModel { | ||
| 93 | 100 | ||
| 94 | isnoshow = json['isnoshow']; | 101 | isnoshow = json['isnoshow']; |
| 95 | reply = json['reply'] != null ? new Reply.fromJson(json['reply']) : null; | 102 | reply = json['reply'] != null ? new Reply.fromJson(json['reply']) : null; |
| 103 | + | ||
| 104 | + ddate = json['ddate']; | ||
| 105 | + ddateSolt = json['ddate_solt']; | ||
| 106 | + tableinfo = json['tableinfo']; | ||
| 96 | } | 107 | } |
| 97 | 108 | ||
| 98 | Map<String, dynamic> toJson() { | 109 | Map<String, dynamic> toJson() { |
| @@ -116,6 +127,10 @@ class CommentsSunModel { | @@ -116,6 +127,10 @@ class CommentsSunModel { | ||
| 116 | if (this.enclosure != null) { | 127 | if (this.enclosure != null) { |
| 117 | data['enclosure'] = jsonEncode(this.enclosure); | 128 | data['enclosure'] = jsonEncode(this.enclosure); |
| 118 | } | 129 | } |
| 130 | + | ||
| 131 | + data['ddate'] = this.ddate; | ||
| 132 | + data['ddate_solt'] = this.ddateSolt; | ||
| 133 | + data['tableinfo'] = this.tableinfo; | ||
| 119 | return data; | 134 | return data; |
| 120 | } | 135 | } |
| 121 | } | 136 | } |
| @@ -3,6 +3,8 @@ import 'package:flutter/material.dart'; | @@ -3,6 +3,8 @@ import 'package:flutter/material.dart'; | ||
| 3 | import 'package:flutter/rendering.dart'; | 3 | import 'package:flutter/rendering.dart'; |
| 4 | import 'package:one_key/models/comments_label_model.dart'; | 4 | import 'package:one_key/models/comments_label_model.dart'; |
| 5 | import 'package:one_key/models/comments_model.dart'; | 5 | import 'package:one_key/models/comments_model.dart'; |
| 6 | +import 'package:one_key/pages/my/comment_manage/input_buttom_widget.dart'; | ||
| 7 | +import 'package:one_key/pages/my/comment_manage/pop_route.dart'; | ||
| 6 | import 'package:one_key/provider/user_model.dart'; | 8 | import 'package:one_key/provider/user_model.dart'; |
| 7 | import 'package:one_key/res/colors.dart'; | 9 | import 'package:one_key/res/colors.dart'; |
| 8 | import 'package:one_key/utils/dialog_util.dart'; | 10 | import 'package:one_key/utils/dialog_util.dart'; |
| @@ -36,7 +38,8 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -36,7 +38,8 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 36 | Map<String, String> starTextMap = {}; | 38 | Map<String, String> starTextMap = {}; |
| 37 | bool allSelect = true; | 39 | bool allSelect = true; |
| 38 | String label = ''; | 40 | String label = ''; |
| 39 | - bool showInput = false; | 41 | + |
| 42 | + TextEditingController replyController = TextEditingController(); | ||
| 40 | @override | 43 | @override |
| 41 | void initState() { | 44 | void initState() { |
| 42 | super.initState(); | 45 | super.initState(); |
| @@ -81,6 +84,24 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -81,6 +84,24 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 81 | isShowLoading: isShowLoading); | 84 | isShowLoading: isShowLoading); |
| 82 | } | 85 | } |
| 83 | 86 | ||
| 87 | + _setComment(String pid, String rid, String text, | ||
| 88 | + {bool isShowLoading = true}) async { | ||
| 89 | + Map<String, String> pramas = { | ||
| 90 | + 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid, | ||
| 91 | + 'identity': '0', | ||
| 92 | + 'pid': pid, | ||
| 93 | + 'rid': rid, | ||
| 94 | + 'text': text, | ||
| 95 | + }; | ||
| 96 | + | ||
| 97 | + bool success = await commentManageProvider.setComment(context, pramas, | ||
| 98 | + isShowLoading: isShowLoading); | ||
| 99 | + if (success) { | ||
| 100 | + //成功 刷新列表 | ||
| 101 | + _getSellerComments(isShowLoading: false); | ||
| 102 | + } | ||
| 103 | + } | ||
| 104 | + | ||
| 84 | List<Widget> _labelWidget() { | 105 | List<Widget> _labelWidget() { |
| 85 | List<Widget> data = []; | 106 | List<Widget> data = []; |
| 86 | data.add(InkWell( | 107 | data.add(InkWell( |
| @@ -145,6 +166,7 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -145,6 +166,7 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 145 | 166 | ||
| 146 | /// 九宫格 | 167 | /// 九宫格 |
| 147 | Widget _getGridImg(List<CommentsImageModel> imags) { | 168 | Widget _getGridImg(List<CommentsImageModel> imags) { |
| 169 | + imags.removeWhere((element) => element.url == null || element.url == ''); | ||
| 148 | return GridView.builder( | 170 | return GridView.builder( |
| 149 | controller: controller, | 171 | controller: controller, |
| 150 | padding: EdgeInsets.symmetric(vertical: w(7)), | 172 | padding: EdgeInsets.symmetric(vertical: w(7)), |
| @@ -253,287 +275,298 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -253,287 +275,298 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 253 | itemBuilder: (context, index) { | 275 | itemBuilder: (context, index) { |
| 254 | CommentsSunModel sunModel = | 276 | CommentsSunModel sunModel = |
| 255 | commentManageProvider.commentsData[index]; | 277 | commentManageProvider.commentsData[index]; |
| 256 | - return Container( | ||
| 257 | - margin: EdgeInsets.only(top: w(10)), | ||
| 258 | - decoration: BoxDecoration( | ||
| 259 | - border: Border( | ||
| 260 | - bottom: BorderSide( | ||
| 261 | - width: w(0.5), | ||
| 262 | - color: MyColours.color_DBDBDB))), | ||
| 263 | - child: Row( | ||
| 264 | - crossAxisAlignment: CrossAxisAlignment.start, | ||
| 265 | - children: [ | ||
| 266 | - Container( | ||
| 267 | - width: w(50), | ||
| 268 | - height: w(50), | ||
| 269 | - margin: EdgeInsets.only( | ||
| 270 | - left: w(8), | ||
| 271 | - right: w(8), | ||
| 272 | - top: w(20)), | ||
| 273 | - child: ClipRRect( | ||
| 274 | - borderRadius: | ||
| 275 | - BorderRadius.circular(w(50)), | ||
| 276 | - child: sunModel.authorImage != | ||
| 277 | - null && | ||
| 278 | - sunModel.authorImage != '' | ||
| 279 | - ? CachedNetworkImage( | ||
| 280 | - imageUrl: | ||
| 281 | - sunModel.authorImage, | ||
| 282 | - width: w(50), | ||
| 283 | - height: w(50), | ||
| 284 | - ) | ||
| 285 | - : Container( | ||
| 286 | - width: w(50), | ||
| 287 | - height: w(50), | ||
| 288 | - decoration: BoxDecoration( | ||
| 289 | - color: MyColours | ||
| 290 | - .color_d9d9d9, | ||
| 291 | - borderRadius: | ||
| 292 | - BorderRadius | ||
| 293 | - .circular( | ||
| 294 | - r(50))), | ||
| 295 | - ))), | ||
| 296 | - HEmptyView(34), | ||
| 297 | - Expanded( | ||
| 298 | - child: Padding( | ||
| 299 | - padding: EdgeInsets.symmetric( | ||
| 300 | - vertical: w(4)), | ||
| 301 | - child: Column( | ||
| 302 | - crossAxisAlignment: | ||
| 303 | - CrossAxisAlignment.start, | ||
| 304 | - children: [ | ||
| 305 | - Row( | ||
| 306 | - children: [ | ||
| 307 | - Container( | ||
| 308 | - padding: EdgeInsets | ||
| 309 | - .symmetric( | ||
| 310 | - vertical: | ||
| 311 | - w(4)), | ||
| 312 | - constraints: | ||
| 313 | - BoxConstraints( | ||
| 314 | - maxWidth: | ||
| 315 | - w(120)), | ||
| 316 | - child: Text( | ||
| 317 | - sunModel.author ?? | ||
| 318 | - '', | ||
| 319 | - maxLines: 10, | ||
| 320 | - overflow: | ||
| 321 | - TextOverflow | ||
| 322 | - .ellipsis, | ||
| 323 | - style: TextStyle( | ||
| 324 | - fontSize: | ||
| 325 | - font(14), | ||
| 326 | - fontWeight: | ||
| 327 | - FontWeight | ||
| 328 | - .bold, | ||
| 329 | - color: MyColours | ||
| 330 | - .color_515151), | ||
| 331 | - )), | ||
| 332 | - Spacer(), | ||
| 333 | - Container( | ||
| 334 | - width: w(75), | ||
| 335 | - height: w(24), | ||
| 336 | - child: | ||
| 337 | - ListView.builder( | ||
| 338 | - itemCount: 5, | ||
| 339 | - shrinkWrap: | ||
| 340 | - true, | ||
| 341 | - scrollDirection: | ||
| 342 | - Axis | ||
| 343 | - .horizontal, | ||
| 344 | - itemBuilder: | ||
| 345 | - (context, | ||
| 346 | - index) { | ||
| 347 | - return Image | ||
| 348 | - .asset( | ||
| 349 | - Utils.getImgPath(index <= | ||
| 350 | - int.parse(sunModel.grade) - 1 | ||
| 351 | - ? 'zwzp' | ||
| 352 | - : 'apple'), | ||
| 353 | - width: | ||
| 354 | - w(15), | ||
| 355 | - ); | ||
| 356 | - })), | 278 | + return Stack(children: [ |
| 279 | + Container( | ||
| 280 | + margin: EdgeInsets.only(top: w(10)), | ||
| 281 | + decoration: BoxDecoration( | ||
| 282 | + border: Border( | ||
| 283 | + bottom: BorderSide( | ||
| 284 | + width: w(0.5), | ||
| 285 | + color: MyColours.color_DBDBDB))), | ||
| 286 | + child: Row( | ||
| 287 | + crossAxisAlignment: | ||
| 288 | + CrossAxisAlignment.start, | ||
| 289 | + children: [ | ||
| 290 | + Container( | ||
| 291 | + width: w(50), | ||
| 292 | + height: w(50), | ||
| 293 | + margin: EdgeInsets.only( | ||
| 294 | + left: w(8), | ||
| 295 | + right: w(8), | ||
| 296 | + top: w(20)), | ||
| 297 | + child: ClipRRect( | ||
| 298 | + borderRadius: | ||
| 299 | + BorderRadius.circular(w(50)), | ||
| 300 | + child: sunModel.authorImage != | ||
| 301 | + null && | ||
| 302 | + sunModel.authorImage != | ||
| 303 | + '' && | ||
| 304 | + !sunModel.authorImage | ||
| 305 | + .endsWith('.mp4') | ||
| 306 | + ? CachedNetworkImage( | ||
| 307 | + imageUrl: | ||
| 308 | + sunModel.authorImage, | ||
| 309 | + width: w(50), | ||
| 310 | + height: w(50), | ||
| 311 | + ) | ||
| 312 | + : Container( | ||
| 313 | + width: w(50), | ||
| 314 | + height: w(50), | ||
| 315 | + decoration: BoxDecoration( | ||
| 316 | + color: MyColours | ||
| 317 | + .color_d9d9d9, | ||
| 318 | + borderRadius: | ||
| 319 | + BorderRadius | ||
| 320 | + .circular( | ||
| 321 | + r(50))), | ||
| 322 | + ))), | ||
| 323 | + HEmptyView(34), | ||
| 324 | + Expanded( | ||
| 325 | + child: Padding( | ||
| 326 | + padding: EdgeInsets.symmetric( | ||
| 327 | + vertical: w(4)), | ||
| 328 | + child: Column( | ||
| 329 | + crossAxisAlignment: | ||
| 330 | + CrossAxisAlignment.start, | ||
| 331 | + children: [ | ||
| 332 | + Row( | ||
| 333 | + children: [ | ||
| 334 | + Container( | ||
| 335 | + padding: EdgeInsets | ||
| 336 | + .symmetric( | ||
| 337 | + vertical: | ||
| 338 | + w(4)), | ||
| 339 | + constraints: | ||
| 340 | + BoxConstraints( | ||
| 341 | + maxWidth: | ||
| 342 | + w(120)), | ||
| 343 | + child: Text( | ||
| 344 | + sunModel.author ?? | ||
| 345 | + '', | ||
| 346 | + maxLines: 10, | ||
| 347 | + overflow: | ||
| 348 | + TextOverflow | ||
| 349 | + .ellipsis, | ||
| 350 | + style: TextStyle( | ||
| 351 | + fontSize: | ||
| 352 | + font(14), | ||
| 353 | + fontWeight: | ||
| 354 | + FontWeight | ||
| 355 | + .bold, | ||
| 356 | + color: MyColours | ||
| 357 | + .color_515151), | ||
| 358 | + )), | ||
| 359 | + Spacer(), | ||
| 360 | + Container( | ||
| 361 | + width: w(75), | ||
| 362 | + height: w(24), | ||
| 363 | + child: ListView | ||
| 364 | + .builder( | ||
| 365 | + itemCount: | ||
| 366 | + 5, | ||
| 367 | + shrinkWrap: | ||
| 368 | + true, | ||
| 369 | + scrollDirection: | ||
| 370 | + Axis | ||
| 371 | + .horizontal, | ||
| 372 | + itemBuilder: | ||
| 373 | + (context, | ||
| 374 | + index) { | ||
| 375 | + return Image | ||
| 376 | + .asset( | ||
| 377 | + Utils.getImgPath(index <= | ||
| 378 | + int.parse(sunModel.grade) - 1 | ||
| 379 | + ? 'zwzp' | ||
| 380 | + : 'apple'), | ||
| 381 | + width: w( | ||
| 382 | + 15), | ||
| 383 | + ); | ||
| 384 | + })), | ||
| 385 | + Container( | ||
| 386 | + padding: EdgeInsets | ||
| 387 | + .symmetric( | ||
| 388 | + vertical: | ||
| 389 | + w(4)), | ||
| 390 | + child: Text( | ||
| 391 | + starTextMap[ | ||
| 392 | + '${sunModel.grade}'] ?? | ||
| 393 | + '', | ||
| 394 | + maxLines: 2, | ||
| 395 | + overflow: | ||
| 396 | + TextOverflow | ||
| 397 | + .ellipsis, | ||
| 398 | + style: TextStyle( | ||
| 399 | + fontSize: | ||
| 400 | + font(12), | ||
| 401 | + color: MyColours | ||
| 402 | + .color_999999), | ||
| 403 | + )), | ||
| 404 | + ], | ||
| 405 | + ), | ||
| 406 | + VEmptyView(8), | ||
| 407 | + Container( | ||
| 408 | + padding: EdgeInsets | ||
| 409 | + .symmetric( | ||
| 410 | + vertical: w(4)), | ||
| 411 | + child: Text( | ||
| 412 | + '就餐于 ${sunModel.ddate} ${sunModel.ddateSolt} ${sunModel.tableinfo}', | ||
| 413 | + maxLines: 10, | ||
| 414 | + overflow: TextOverflow | ||
| 415 | + .ellipsis, | ||
| 416 | + style: TextStyle( | ||
| 417 | + fontSize: | ||
| 418 | + font(12), | ||
| 419 | + color: MyColours | ||
| 420 | + .color_999999), | ||
| 421 | + )), | ||
| 422 | + Container( | ||
| 423 | + padding: EdgeInsets | ||
| 424 | + .symmetric( | ||
| 425 | + vertical: w(4)), | ||
| 426 | + child: Text( | ||
| 427 | + '发表于 ${sunModel.createTimeStr}', | ||
| 428 | + maxLines: 10, | ||
| 429 | + overflow: TextOverflow | ||
| 430 | + .ellipsis, | ||
| 431 | + style: TextStyle( | ||
| 432 | + fontSize: | ||
| 433 | + font(12), | ||
| 434 | + color: MyColours | ||
| 435 | + .color_999999), | ||
| 436 | + )), | ||
| 437 | + VEmptyView(8), | ||
| 438 | + if (sunModel.text != null && | ||
| 439 | + sunModel.text.length > | ||
| 440 | + 0) | ||
| 357 | Container( | 441 | Container( |
| 358 | padding: EdgeInsets | 442 | padding: EdgeInsets |
| 359 | .symmetric( | 443 | .symmetric( |
| 360 | vertical: | 444 | vertical: |
| 361 | w(4)), | 445 | w(4)), |
| 362 | child: Text( | 446 | child: Text( |
| 363 | - starTextMap[ | ||
| 364 | - '${sunModel.grade}'] ?? | ||
| 365 | - '', | ||
| 366 | - maxLines: 2, | ||
| 367 | - overflow: | ||
| 368 | - TextOverflow | ||
| 369 | - .ellipsis, | 447 | + sunModel.text ?? '', |
| 370 | style: TextStyle( | 448 | style: TextStyle( |
| 449 | + height: 1.8, | ||
| 371 | fontSize: | 450 | fontSize: |
| 372 | font(12), | 451 | font(12), |
| 373 | color: MyColours | 452 | color: MyColours |
| 374 | - .color_999999), | 453 | + .color_515151), |
| 375 | )), | 454 | )), |
| 376 | - ], | ||
| 377 | - ), | ||
| 378 | - VEmptyView(8), | ||
| 379 | - Container( | ||
| 380 | - padding: | ||
| 381 | - EdgeInsets.symmetric( | ||
| 382 | - vertical: w(4)), | ||
| 383 | - child: Text( | ||
| 384 | - '就餐于 2023-8-24 午餐 二楼205', | ||
| 385 | - maxLines: 10, | ||
| 386 | - overflow: TextOverflow | ||
| 387 | - .ellipsis, | ||
| 388 | - style: TextStyle( | ||
| 389 | - fontSize: font(12), | ||
| 390 | - color: MyColours | ||
| 391 | - .color_999999), | ||
| 392 | - )), | ||
| 393 | - Container( | ||
| 394 | - padding: | ||
| 395 | - EdgeInsets.symmetric( | ||
| 396 | - vertical: w(4)), | ||
| 397 | - child: Text( | ||
| 398 | - '发表于 ${sunModel.createTimeStr}', | ||
| 399 | - maxLines: 10, | ||
| 400 | - overflow: TextOverflow | ||
| 401 | - .ellipsis, | ||
| 402 | - style: TextStyle( | ||
| 403 | - fontSize: font(12), | ||
| 404 | - color: MyColours | ||
| 405 | - .color_999999), | ||
| 406 | - )), | ||
| 407 | - VEmptyView(8), | ||
| 408 | - if (sunModel.text != null && | ||
| 409 | - sunModel.text.length > 0) | ||
| 410 | Container( | 455 | Container( |
| 411 | padding: EdgeInsets | 456 | padding: EdgeInsets |
| 412 | .symmetric( | 457 | .symmetric( |
| 413 | vertical: w(4)), | 458 | vertical: w(4)), |
| 414 | child: Text( | 459 | child: Text( |
| 415 | - sunModel.text ?? '', | 460 | + '#${sunModel.evalLabel ?? ''}', |
| 416 | style: TextStyle( | 461 | style: TextStyle( |
| 417 | height: 1.8, | 462 | height: 1.8, |
| 418 | fontSize: | 463 | fontSize: |
| 419 | font(12), | 464 | font(12), |
| 420 | color: MyColours | 465 | color: MyColours |
| 421 | - .color_515151), | 466 | + .color_438E93), |
| 422 | )), | 467 | )), |
| 423 | - Container( | ||
| 424 | - padding: | ||
| 425 | - EdgeInsets.symmetric( | ||
| 426 | - vertical: w(4)), | ||
| 427 | - child: Text( | ||
| 428 | - '#${sunModel.evalLabel ?? ''}', | ||
| 429 | - style: TextStyle( | ||
| 430 | - height: 1.8, | ||
| 431 | - fontSize: font(12), | ||
| 432 | - color: MyColours | ||
| 433 | - .color_438E93), | ||
| 434 | - )), | ||
| 435 | - if (sunModel | ||
| 436 | - .enclosure.length > | ||
| 437 | - 0) | ||
| 438 | - _getGridImg( | ||
| 439 | - sunModel.enclosure), | ||
| 440 | - VEmptyView(8), | ||
| 441 | - sunModel.reply != null | ||
| 442 | - ? Container( | ||
| 443 | - width: | ||
| 444 | - double.infinity, | ||
| 445 | - padding: | ||
| 446 | - EdgeInsets.all( | ||
| 447 | - w(4)), | ||
| 448 | - decoration: BoxDecoration( | ||
| 449 | - color: MyColours | ||
| 450 | - .color_33438E93, | ||
| 451 | - borderRadius: | ||
| 452 | - BorderRadius | ||
| 453 | - .circular( | ||
| 454 | - r(8))), | ||
| 455 | - child: Column( | ||
| 456 | - crossAxisAlignment: | ||
| 457 | - CrossAxisAlignment | ||
| 458 | - .start, | ||
| 459 | - children: [ | ||
| 460 | - Text( | ||
| 461 | - '回复内容', | ||
| 462 | - style: TextStyle( | ||
| 463 | - color: MyColours | ||
| 464 | - .color_515151, | ||
| 465 | - fontWeight: | ||
| 466 | - FontWeight | ||
| 467 | - .bold, | ||
| 468 | - fontSize: | ||
| 469 | - font( | ||
| 470 | - 12)), | ||
| 471 | - ), | ||
| 472 | - VEmptyView(6), | ||
| 473 | - Container( | ||
| 474 | - padding: EdgeInsets | ||
| 475 | - .symmetric( | ||
| 476 | - vertical: | ||
| 477 | - w(4)), | ||
| 478 | - child: Text( | ||
| 479 | - sunModel.reply | ||
| 480 | - .text ?? | ||
| 481 | - "", | ||
| 482 | - style: TextStyle( | ||
| 483 | - height: | ||
| 484 | - 1.8, | ||
| 485 | - fontSize: | ||
| 486 | - font( | ||
| 487 | - 12), | ||
| 488 | - color: MyColours | ||
| 489 | - .color_515151), | ||
| 490 | - )), | ||
| 491 | - ], | ||
| 492 | - ), | ||
| 493 | - ) | ||
| 494 | - : | ||
| 495 | - // showInput | ||
| 496 | - // ? SlidingUpPanel( | ||
| 497 | - // panel: Center( | ||
| 498 | - // child: Text( | ||
| 499 | - // "This is the sliding Widget"), | ||
| 500 | - // ), | ||
| 501 | - // ) | ||
| 502 | - // : | ||
| 503 | - Align( | ||
| 504 | - alignment: Alignment | ||
| 505 | - .centerRight, | ||
| 506 | - child: RoundButton( | ||
| 507 | - text: '回复', | ||
| 508 | - width: w(54), | ||
| 509 | - height: w(24), | ||
| 510 | - gradientStart: | ||
| 511 | - MyColours | ||
| 512 | - .color_ffffff, | ||
| 513 | - gradientEnd: MyColours | ||
| 514 | - .color_ffffff, | ||
| 515 | - textColor: MyColours | ||
| 516 | - .color_000000, | ||
| 517 | - fontSize: 24, | ||
| 518 | - borderColor: MyColours | ||
| 519 | - .color_999999, | ||
| 520 | - radius: r(15), | ||
| 521 | - onPressed: () { | ||
| 522 | - setState(() { | ||
| 523 | - showInput = | ||
| 524 | - !showInput; | ||
| 525 | - }); | ||
| 526 | - DialogUtil | ||
| 527 | - .openCommentsModalBottomSheet( | ||
| 528 | - context); | ||
| 529 | - }, | 468 | + if (sunModel |
| 469 | + .enclosure.length > | ||
| 470 | + 0) | ||
| 471 | + _getGridImg( | ||
| 472 | + sunModel.enclosure), | ||
| 473 | + VEmptyView(8), | ||
| 474 | + sunModel.reply != null | ||
| 475 | + ? Container( | ||
| 476 | + width: | ||
| 477 | + double.infinity, | ||
| 478 | + padding: | ||
| 479 | + EdgeInsets.all( | ||
| 480 | + w(4)), | ||
| 481 | + decoration: BoxDecoration( | ||
| 482 | + color: MyColours | ||
| 483 | + .color_33438E93, | ||
| 484 | + borderRadius: | ||
| 485 | + BorderRadius | ||
| 486 | + .circular( | ||
| 487 | + r(8))), | ||
| 488 | + child: Column( | ||
| 489 | + crossAxisAlignment: | ||
| 490 | + CrossAxisAlignment | ||
| 491 | + .start, | ||
| 492 | + children: [ | ||
| 493 | + Text( | ||
| 494 | + '回复内容', | ||
| 495 | + style: TextStyle( | ||
| 496 | + color: MyColours | ||
| 497 | + .color_515151, | ||
| 498 | + fontWeight: | ||
| 499 | + FontWeight | ||
| 500 | + .bold, | ||
| 501 | + fontSize: | ||
| 502 | + font( | ||
| 503 | + 12)), | ||
| 504 | + ), | ||
| 505 | + VEmptyView(6), | ||
| 506 | + Container( | ||
| 507 | + padding: EdgeInsets.symmetric( | ||
| 508 | + vertical: | ||
| 509 | + w(4)), | ||
| 510 | + child: Text( | ||
| 511 | + sunModel.reply | ||
| 512 | + .text ?? | ||
| 513 | + "", | ||
| 514 | + style: TextStyle( | ||
| 515 | + height: | ||
| 516 | + 1.8, | ||
| 517 | + fontSize: font( | ||
| 518 | + 12), | ||
| 519 | + color: | ||
| 520 | + MyColours.color_515151), | ||
| 521 | + )), | ||
| 522 | + ], | ||
| 523 | + ), | ||
| 524 | + ) | ||
| 525 | + : Align( | ||
| 526 | + alignment: Alignment | ||
| 527 | + .centerRight, | ||
| 528 | + child: RoundButton( | ||
| 529 | + text: '回复', | ||
| 530 | + width: w(54), | ||
| 531 | + height: w(24), | ||
| 532 | + gradientStart: | ||
| 533 | + MyColours | ||
| 534 | + .color_ffffff, | ||
| 535 | + gradientEnd: MyColours | ||
| 536 | + .color_ffffff, | ||
| 537 | + textColor: MyColours | ||
| 538 | + .color_000000, | ||
| 539 | + fontSize: 24, | ||
| 540 | + borderColor: MyColours | ||
| 541 | + .color_999999, | ||
| 542 | + radius: r(15), | ||
| 543 | + onPressed: () { | ||
| 544 | + Navigator.push( | ||
| 545 | + context, | ||
| 546 | + PopRoute(child: | ||
| 547 | + InputButtomWidget( | ||
| 548 | + onEditingCompleteText: | ||
| 549 | + (text) { | ||
| 550 | + print( | ||
| 551 | + '点击发送 ---$text'); | ||
| 552 | + _setComment( | ||
| 553 | + sunModel | ||
| 554 | + .id, | ||
| 555 | + sunModel | ||
| 556 | + .rid, | ||
| 557 | + text, | ||
| 558 | + ); | ||
| 559 | + }, | ||
| 560 | + ))); | ||
| 561 | + }, | ||
| 562 | + ), | ||
| 530 | ), | 563 | ), |
| 531 | - ), | ||
| 532 | - VEmptyView(26), | ||
| 533 | - ]))), | ||
| 534 | - ], | 564 | + VEmptyView(26), |
| 565 | + ]))), | ||
| 566 | + ], | ||
| 567 | + ), | ||
| 535 | ), | 568 | ), |
| 536 | - ); | 569 | + ]); |
| 537 | })) | 570 | })) |
| 538 | ], | 571 | ], |
| 539 | )); | 572 | )); |
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | + | ||
| 3 | +import '../../../res/colors.dart'; | ||
| 4 | +import '../../../utils/screen_util.dart'; | ||
| 5 | +import '../../../widgets/h_empty_view.dart'; | ||
| 6 | +import '../../../widgets/round_button.dart'; | ||
| 7 | + | ||
| 8 | +class InputButtomWidget extends StatefulWidget { | ||
| 9 | + final ValueChanged onEditingCompleteText; | ||
| 10 | + | ||
| 11 | + InputButtomWidget({Key key, this.onEditingCompleteText}) : super(key: key); | ||
| 12 | + | ||
| 13 | + @override | ||
| 14 | + _InputButtomWidgetState createState() => _InputButtomWidgetState(); | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +class _InputButtomWidgetState extends State<InputButtomWidget> { | ||
| 18 | + final TextEditingController controller = TextEditingController(); | ||
| 19 | + @override | ||
| 20 | + Widget build(BuildContext context) { | ||
| 21 | + return new Scaffold( | ||
| 22 | + backgroundColor: Colors.transparent, | ||
| 23 | + body: new Column( | ||
| 24 | + children: <Widget>[ | ||
| 25 | + Expanded( | ||
| 26 | + child: new GestureDetector( | ||
| 27 | + child: new Container( | ||
| 28 | + color: Colors.transparent, | ||
| 29 | + ), | ||
| 30 | + onTap: () { | ||
| 31 | + Navigator.pop(context); | ||
| 32 | + }, | ||
| 33 | + )), | ||
| 34 | + new Container( | ||
| 35 | + color: Color(0xFFF4F4F4), | ||
| 36 | + padding: EdgeInsets.only(left: 16, top: 8, bottom: 8, right: 16), | ||
| 37 | + child: Row(children: [ | ||
| 38 | + // Container( | ||
| 39 | + // decoration: BoxDecoration(color: Colors.white), | ||
| 40 | + // child: TextField( | ||
| 41 | + // controller: controller, | ||
| 42 | + // autofocus: true, | ||
| 43 | + // style: TextStyle(fontSize: 16), | ||
| 44 | + // //设置键盘按钮为发送 | ||
| 45 | + // textInputAction: TextInputAction.send, | ||
| 46 | + // keyboardType: TextInputType.multiline, | ||
| 47 | + // onEditingComplete: () { | ||
| 48 | + // //点击发送调用 | ||
| 49 | + // print('onEditingComplete'); | ||
| 50 | + // onEditingCompleteText(controller.text); | ||
| 51 | + // Navigator.pop(context); | ||
| 52 | + // }, | ||
| 53 | + // decoration: InputDecoration( | ||
| 54 | + // hintText: '评论', | ||
| 55 | + // isDense: true, | ||
| 56 | + // contentPadding: EdgeInsets.only( | ||
| 57 | + // left: 10, top: 5, bottom: 5, right: 10), | ||
| 58 | + // border: const OutlineInputBorder( | ||
| 59 | + // gapPadding: 0, | ||
| 60 | + // borderSide: BorderSide( | ||
| 61 | + // width: 0, | ||
| 62 | + // style: BorderStyle.none, | ||
| 63 | + // ), | ||
| 64 | + // ), | ||
| 65 | + // ), | ||
| 66 | + | ||
| 67 | + // minLines: 1, | ||
| 68 | + // maxLines: 5, | ||
| 69 | + // ), | ||
| 70 | + // ), | ||
| 71 | + Expanded( | ||
| 72 | + child: Container( | ||
| 73 | + decoration: BoxDecoration( | ||
| 74 | + color: MyColours.color_ffffff, | ||
| 75 | + borderRadius: BorderRadius.circular(r(8))), | ||
| 76 | + padding: | ||
| 77 | + EdgeInsets.symmetric(horizontal: w(4), vertical: 0), | ||
| 78 | + child: TextField( | ||
| 79 | + controller: controller, | ||
| 80 | + minLines: 1, | ||
| 81 | + maxLines: 5, | ||
| 82 | + autofocus: true, | ||
| 83 | + | ||
| 84 | + // //光标颜色 | ||
| 85 | + // cursorColor: | ||
| 86 | + // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 87 | + //输入文本的样式 | ||
| 88 | + // inputFormatters: lenghtLimit | ||
| 89 | + // ? [ | ||
| 90 | + // LengthLimitingTextInputFormatter(10), | ||
| 91 | + // ] | ||
| 92 | + // : [], | ||
| 93 | + // textAlignVertical: TextAlignVertical.center, | ||
| 94 | + textAlign: TextAlign.left, | ||
| 95 | + style: TextStyle( | ||
| 96 | + fontSize: font(14), | ||
| 97 | + ), | ||
| 98 | + | ||
| 99 | + decoration: InputDecoration( | ||
| 100 | + contentPadding: EdgeInsets.zero, | ||
| 101 | + border: | ||
| 102 | + OutlineInputBorder(borderSide: BorderSide.none), | ||
| 103 | + hintText: '评论', | ||
| 104 | + hintStyle: TextStyle( | ||
| 105 | + color: MyColours.color_999999, | ||
| 106 | + fontSize: font(14), | ||
| 107 | + ), | ||
| 108 | + enabledBorder: new UnderlineInputBorder( | ||
| 109 | + borderSide: BorderSide.none, | ||
| 110 | + ), | ||
| 111 | + focusedBorder: new UnderlineInputBorder( | ||
| 112 | + borderSide: BorderSide.none, | ||
| 113 | + ), | ||
| 114 | + ), | ||
| 115 | + onChanged: (value) { | ||
| 116 | + // name = value; | ||
| 117 | + setState(() {}); | ||
| 118 | + }, | ||
| 119 | + //设置键盘按钮为发送 | ||
| 120 | + // textInputAction: TextInputAction.send, | ||
| 121 | + keyboardType: TextInputType.multiline, | ||
| 122 | + | ||
| 123 | + onEditingComplete: () { | ||
| 124 | + //点击发送调用 | ||
| 125 | + // print('onEditingComplete'); | ||
| 126 | + // onEditingCompleteText(controller.text); | ||
| 127 | + // Navigator.pop(context); | ||
| 128 | + }, | ||
| 129 | + ))), | ||
| 130 | + HEmptyView(20), | ||
| 131 | + RoundButton( | ||
| 132 | + text: '发送', | ||
| 133 | + width: w(54), | ||
| 134 | + height: w(28), | ||
| 135 | + gradientStart: controller.text.trim().length > 0 | ||
| 136 | + ? MyColours.color_438E93 | ||
| 137 | + : MyColours.color_ffffff, | ||
| 138 | + gradientEnd: controller.text.trim().length > 0 | ||
| 139 | + ? MyColours.color_438E93 | ||
| 140 | + : MyColours.color_ffffff, | ||
| 141 | + textColor: controller.text.trim().length > 0 | ||
| 142 | + ? MyColours.color_F8F9FD | ||
| 143 | + : MyColours.color_999999, | ||
| 144 | + fontSize: 24, | ||
| 145 | + borderColor: controller.text.trim().length > 0 | ||
| 146 | + ? MyColours.color_438E93 | ||
| 147 | + : MyColours.color_999999, | ||
| 148 | + radius: r(15), | ||
| 149 | + onPressed: () { | ||
| 150 | + if (controller.text.trim().length == 0) { | ||
| 151 | + return; | ||
| 152 | + } | ||
| 153 | + print('onEditingComplete'); | ||
| 154 | + widget.onEditingCompleteText(controller.text); | ||
| 155 | + Navigator.pop(context); | ||
| 156 | + }, | ||
| 157 | + ), | ||
| 158 | + ])) | ||
| 159 | + ], | ||
| 160 | + ), | ||
| 161 | + ); | ||
| 162 | + } | ||
| 163 | +} |
lib/pages/my/comment_manage/pop_route.dart
0 → 100644
| 1 | +//过度路由 | ||
| 2 | +import 'package:flutter/material.dart'; | ||
| 3 | + | ||
| 4 | +class PopRoute extends PopupRoute{ | ||
| 5 | + final Duration _duration = Duration(milliseconds: 300); | ||
| 6 | + Widget child; | ||
| 7 | + | ||
| 8 | + PopRoute({@required this.child}); | ||
| 9 | + | ||
| 10 | + @override | ||
| 11 | + Color get barrierColor => null; | ||
| 12 | + | ||
| 13 | + @override | ||
| 14 | + bool get barrierDismissible => true; | ||
| 15 | + | ||
| 16 | + @override | ||
| 17 | + String get barrierLabel => null; | ||
| 18 | + | ||
| 19 | + @override | ||
| 20 | + Widget buildPage(BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation) { | ||
| 21 | + return child; | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + @override | ||
| 25 | + Duration get transitionDuration => _duration; | ||
| 26 | + | ||
| 27 | +} | ||
| 28 | + |
| @@ -1304,32 +1304,32 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -1304,32 +1304,32 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 1304 | isRowLow: outDay == '0' || | 1304 | isRowLow: outDay == '0' || |
| 1305 | !Utils.getAuthority( | 1305 | !Utils.getAuthority( |
| 1306 | context, '营销中心'))), | 1306 | context, '营销中心'))), |
| 1307 | - // InkWell( | ||
| 1308 | - // onTap: () { | ||
| 1309 | - // if (outDay == '0') { | ||
| 1310 | - // return; | ||
| 1311 | - // } | ||
| 1312 | - // if (Utils.getAuthority( | ||
| 1313 | - // context, '评价管理')) { | ||
| 1314 | - // NavigatorUtil | ||
| 1315 | - // .goCommentManageHomePage( | ||
| 1316 | - // context); | ||
| 1317 | - // } | ||
| 1318 | - // }, | ||
| 1319 | - // child: _item( | ||
| 1320 | - // outDay == '0' || | ||
| 1321 | - // !Utils.getAuthority( | ||
| 1322 | - // context, '评价管理') | ||
| 1323 | - // ? Utils.getImgPath( | ||
| 1324 | - // 'my_comment_un') | ||
| 1325 | - // : Utils.getImgPath( | ||
| 1326 | - // 'my_comment'), | ||
| 1327 | - // '评价管理', | ||
| 1328 | - // isRowLow: outDay == '0' || | ||
| 1329 | - // !Utils.getAuthority( | ||
| 1330 | - // context, '评价管理'))), | ||
| 1331 | InkWell( | 1307 | InkWell( |
| 1332 | - onTap: () {}, child: _item('', '空空空空')), | 1308 | + onTap: () { |
| 1309 | + if (outDay == '0') { | ||
| 1310 | + return; | ||
| 1311 | + } | ||
| 1312 | + if (Utils.getAuthority( | ||
| 1313 | + context, '评价管理')) { | ||
| 1314 | + NavigatorUtil | ||
| 1315 | + .goCommentManageHomePage( | ||
| 1316 | + context); | ||
| 1317 | + } | ||
| 1318 | + }, | ||
| 1319 | + child: _item( | ||
| 1320 | + outDay == '0' || | ||
| 1321 | + !Utils.getAuthority( | ||
| 1322 | + context, '评价管理') | ||
| 1323 | + ? Utils.getImgPath( | ||
| 1324 | + 'my_comment_un') | ||
| 1325 | + : Utils.getImgPath( | ||
| 1326 | + 'my_comment'), | ||
| 1327 | + '评价管理', | ||
| 1328 | + isRowLow: outDay == '0' || | ||
| 1329 | + !Utils.getAuthority( | ||
| 1330 | + context, '评价管理'))), | ||
| 1331 | + // InkWell( | ||
| 1332 | + // onTap: () {}, child: _item('', '空空空空')), | ||
| 1333 | InkWell( | 1333 | InkWell( |
| 1334 | onTap: () {}, child: _item('', '空空空空')), | 1334 | onTap: () {}, child: _item('', '空空空空')), |
| 1335 | ], | 1335 | ], |
| @@ -55,87 +55,108 @@ typedef ClickCallback = void Function(String value); | @@ -55,87 +55,108 @@ typedef ClickCallback = void Function(String value); | ||
| 55 | // }; | 55 | // }; |
| 56 | 56 | ||
| 57 | class DialogUtil { | 57 | class DialogUtil { |
| 58 | - | ||
| 59 | //回复评论弹框 | 58 | //回复评论弹框 |
| 60 | - static openCommentsModalBottomSheet(context, | 59 | + static openCommentsModalBottomSheet(context, TextEditingController controller, |
| 61 | {VoidCallback lCallback, VoidCallback rCallback}) async { | 60 | {VoidCallback lCallback, VoidCallback rCallback}) async { |
| 62 | final option = await showModalBottomSheet( | 61 | final option = await showModalBottomSheet( |
| 63 | context: context, | 62 | context: context, |
| 64 | backgroundColor: Colors.transparent, | 63 | backgroundColor: Colors.transparent, |
| 65 | - isDismissible: false, | 64 | + isDismissible: true, |
| 66 | builder: (BuildContext context) { | 65 | builder: (BuildContext context) { |
| 67 | - return Container( | ||
| 68 | - // height: ScreenUtil().setWidth(180 * 2), | ||
| 69 | - decoration: BoxDecoration( | ||
| 70 | - color: MyColours.color_DBDBDB, | 66 | + return Scaffold( |
| 67 | + resizeToAvoidBottomInset: false, | ||
| 68 | + body: Column(mainAxisSize: MainAxisSize.min, children: [ | ||
| 69 | + Container( | ||
| 70 | + // height: ScreenUtil().setWidth(180 * 2), | ||
| 71 | + // constraints: BoxConstraints(minHeight: w(40), maxHeight: w(500)), | ||
| 72 | + decoration: BoxDecoration( | ||
| 73 | + color: MyColours.color_F7F7F7, | ||
| 71 | // borderRadius: BorderRadius.only( | 74 | // borderRadius: BorderRadius.only( |
| 72 | // topLeft: Radius.circular(ScreenUtil().setWidth(24)), | 75 | // topLeft: Radius.circular(ScreenUtil().setWidth(24)), |
| 73 | // topRight: Radius.circular(ScreenUtil().setWidth(24))) | 76 | // topRight: Radius.circular(ScreenUtil().setWidth(24))) |
| 74 | - ), | ||
| 75 | - child: Row( | ||
| 76 | - | ||
| 77 | - children: <Widget>[ | ||
| 78 | - InkWell( | ||
| 79 | - onTap: lCallback, | ||
| 80 | - child: Container( | ||
| 81 | - width: double.infinity, | ||
| 82 | - height: ScreenUtil().setWidth(58 * 2), | ||
| 83 | - child: Center( | ||
| 84 | - child: Text( | ||
| 85 | - '拍摄', | ||
| 86 | - style: TextStyle( | ||
| 87 | - fontSize: ScreenUtil().setSp(32), | ||
| 88 | - color: MyColours.color_353535, | ||
| 89 | - fontWeight: FontWeight.bold), | ||
| 90 | - ), | ||
| 91 | - )), | ||
| 92 | - ), | ||
| 93 | - MyDivider( | ||
| 94 | - double.infinity, | ||
| 95 | - ScreenUtil().setWidth(2), | ||
| 96 | - color: MyColours.color_EEEEEE, | ||
| 97 | - ), | ||
| 98 | - InkWell( | ||
| 99 | - onTap: rCallback, | ||
| 100 | - child: Container( | ||
| 101 | - width: double.infinity, | ||
| 102 | - height: ScreenUtil().setWidth(58 * 2), | ||
| 103 | - child: Center( | ||
| 104 | - child: Text( | ||
| 105 | - '从相册选择', | ||
| 106 | - style: TextStyle( | ||
| 107 | - fontSize: ScreenUtil().setSp(32), | ||
| 108 | - color: MyColours.color_353535, | ||
| 109 | - fontWeight: FontWeight.bold), | ||
| 110 | - ), | ||
| 111 | - )), | ||
| 112 | - ), | ||
| 113 | - MyDivider( | ||
| 114 | - double.infinity, | ||
| 115 | - ScreenUtil().setWidth(10), | ||
| 116 | - color: MyColours.color_EEEEEE, | ||
| 117 | - ), | ||
| 118 | - InkWell( | ||
| 119 | - onTap: () { | ||
| 120 | - Navigator.pop(context, '取消'); | ||
| 121 | - }, | ||
| 122 | - child: Container( | ||
| 123 | - width: double.infinity, | ||
| 124 | - height: ScreenUtil().setWidth(58 * 2), | ||
| 125 | - child: Center( | ||
| 126 | - child: Text( | ||
| 127 | - '取消', | ||
| 128 | - style: TextStyle( | ||
| 129 | - fontSize: ScreenUtil().setSp(32), | ||
| 130 | - color: MyColours.color_353535, | ||
| 131 | - fontWeight: FontWeight.bold), | ||
| 132 | - ), | ||
| 133 | - ))) | ||
| 134 | - ], | ||
| 135 | - ), | ||
| 136 | - ); | 77 | + ), |
| 78 | + child: Row( | ||
| 79 | + crossAxisAlignment: CrossAxisAlignment.end, | ||
| 80 | + children: <Widget>[ | ||
| 81 | + Expanded( | ||
| 82 | + child: Container( | ||
| 83 | + margin: EdgeInsets.symmetric( | ||
| 84 | + horizontal: w(15), vertical: w(8)), | ||
| 85 | + decoration: BoxDecoration( | ||
| 86 | + color: MyColours.color_ffffff, | ||
| 87 | + borderRadius: BorderRadius.circular(r(8))), | ||
| 88 | + padding: EdgeInsets.symmetric(horizontal: w(4)), | ||
| 89 | + child: TextField( | ||
| 90 | + controller: controller, | ||
| 91 | + maxLines: null, | ||
| 92 | + autofocus: true, | ||
| 93 | + | ||
| 94 | + // //光标颜色 | ||
| 95 | + // cursorColor: | ||
| 96 | + // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 97 | + //输入文本的样式 | ||
| 98 | + // inputFormatters: lenghtLimit | ||
| 99 | + // ? [ | ||
| 100 | + // LengthLimitingTextInputFormatter(10), | ||
| 101 | + // ] | ||
| 102 | + // : [], | ||
| 103 | + textAlignVertical: TextAlignVertical.bottom, | ||
| 104 | + textAlign: TextAlign.left, | ||
| 105 | + style: TextStyle( | ||
| 106 | + fontSize: ScreenUtil().setSp(28), | ||
| 107 | + ), | ||
| 108 | + decoration: InputDecoration( | ||
| 109 | + border: OutlineInputBorder( | ||
| 110 | + borderSide: BorderSide.none), | ||
| 111 | + hintText: '评论', | ||
| 112 | + hintStyle: TextStyle( | ||
| 113 | + color: MyColours.color_999999, | ||
| 114 | + fontSize: ScreenUtil().setSp(28), | ||
| 115 | + ), | ||
| 116 | + enabledBorder: new UnderlineInputBorder( | ||
| 117 | + borderSide: BorderSide.none, | ||
| 118 | + ), | ||
| 119 | + focusedBorder: new UnderlineInputBorder( | ||
| 120 | + borderSide: BorderSide.none, | ||
| 121 | + ), | ||
| 122 | + ), | ||
| 123 | + onChanged: (value) { | ||
| 124 | + // name = value; | ||
| 125 | + }, | ||
| 126 | + onEditingComplete: () { | ||
| 127 | + FocusScope.of(context) | ||
| 128 | + .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 129 | + }, | ||
| 130 | + keyboardType: TextInputType.text))), | ||
| 131 | + HEmptyView(20), | ||
| 132 | + RoundButton( | ||
| 133 | + text: '发送', | ||
| 134 | + width: w(54), | ||
| 135 | + height: w(24), | ||
| 136 | + gradientStart: controller.text.trim().length > 0 | ||
| 137 | + ? MyColours.color_438E93 | ||
| 138 | + : MyColours.color_ffffff, | ||
| 139 | + gradientEnd: controller.text.trim().length > 0 | ||
| 140 | + ? MyColours.color_438E93 | ||
| 141 | + : MyColours.color_ffffff, | ||
| 142 | + textColor: controller.text.trim().length > 0 | ||
| 143 | + ? MyColours.color_F8F9FD | ||
| 144 | + : MyColours.color_000000, | ||
| 145 | + fontSize: 24, | ||
| 146 | + borderColor: controller.text.trim().length > 0 | ||
| 147 | + ? MyColours.color_438E93 | ||
| 148 | + : MyColours.color_999999, | ||
| 149 | + radius: r(15), | ||
| 150 | + onPressed: () {}, | ||
| 151 | + ), | ||
| 152 | + HEmptyView(20), | ||
| 153 | + ], | ||
| 154 | + ), | ||
| 155 | + ) | ||
| 156 | + ])); | ||
| 137 | }); | 157 | }); |
| 138 | } | 158 | } |
| 159 | + | ||
| 139 | static List<Widget> menuSelectBtn(MenuSunModel menuSunModel, state) { | 160 | static List<Widget> menuSelectBtn(MenuSunModel menuSunModel, state) { |
| 140 | List<Widget> temp = []; | 161 | List<Widget> temp = []; |
| 141 | for (int i = 0; i < menuSunModel.practice.length; i++) { | 162 | for (int i = 0; i < menuSunModel.practice.length; i++) { |
-
Please register or login to post a comment