order_comment.dart 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. import 'package:flutter/material.dart';
  2. import 'package:twong/config/style.dart';
  3. import 'package:twong/utils/index.dart';
  4. import 'package:twong/models/index.dart';
  5. import 'package:twong/widgets/app_bar.dart';
  6. import 'package:twong/widgets/cart_item.dart';
  7. import 'package:twong/widgets/rank_stars.dart';
  8. class OrderCommentPage extends StatefulWidget {
  9. final CartInfo info;
  10. OrderCommentPage(this.info);
  11. @override
  12. State<StatefulWidget> createState() {
  13. return _OrderCommentState();
  14. }
  15. }
  16. class _OrderCommentState extends State<OrderCommentPage> {
  17. @override
  18. Widget build(BuildContext context) {
  19. return Scaffold(
  20. appBar: DAppBar("商品评价"),
  21. backgroundColor: DColors.back,
  22. body: Container(
  23. margin: EdgeInsets.only(left: 12.px, right: 12.px),
  24. child: ListView(
  25. physics: ClampingScrollPhysics(),
  26. children: [
  27. Container(
  28. child: CartItem(widget.info),
  29. padding: EdgeInsets.all(6.px),
  30. margin: EdgeInsets.only(top: 6.px),
  31. decoration: BoxDecoration(
  32. color: Colors.white,
  33. borderRadius: BorderRadius.circular(6.px)
  34. ),
  35. ),
  36. Divider(),
  37. Container(
  38. padding: EdgeInsets.all(6.px),
  39. decoration: BoxDecoration(
  40. color: Colors.white,
  41. borderRadius: BorderRadius.circular(6.px)
  42. ),
  43. child: Column(
  44. children: [
  45. RankStars(5, value: 5, color: DColors.Main, header: Text("商品质量:")),
  46. RankStars(5, color: DColors.Main, header: Text("服务态度:")),
  47. TextField(
  48. maxLines: 3,
  49. style: TextStyle(fontSize: 12.px),
  50. decoration: InputDecoration(
  51. border: InputBorder.none,
  52. hintText: "说说您的想法,分享给大家吧~",
  53. enabledBorder: OutlineInputBorder(
  54. borderSide: BorderSide(color: Color(0x00FF00a0)),
  55. borderRadius: BorderRadius.all(
  56. Radius.circular(100),
  57. ),
  58. ),
  59. focusedBorder: OutlineInputBorder(
  60. borderSide: BorderSide(color: Color(0x000000a0)),
  61. borderRadius: BorderRadius.all(
  62. Radius.circular(100),
  63. ),
  64. ),
  65. ),
  66. ),
  67. Stack(
  68. children: [
  69. Container(
  70. height: 32.px,
  71. child: Center(child: Text("上传图片")),
  72. )
  73. ],
  74. ),
  75. Container(
  76. margin: EdgeInsets.only(left: 12.px, right: 12.px),
  77. width: double.infinity,
  78. child: FlatButton(
  79. onPressed: () {},
  80. color: DColors.Main,
  81. textColor: Colors.white,
  82. shape: StadiumBorder(),
  83. child: Text("立即评价"),
  84. ),
  85. )
  86. ],
  87. ),
  88. )
  89. ],
  90. ),
  91. ),
  92. );
  93. }
  94. }