index.dart 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. import 'package:farmer_client/widgets/DefaultButton.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:flutter_screenutil/flutter_screenutil.dart';
  4. import 'package:fluttertoast/fluttertoast.dart';
  5. import 'package:get/get.dart';
  6. import '../../widgets/OrderInfoCard.dart';
  7. import '../../widgets/layout/BasicPage.dart';
  8. // class OrderPageInfo extends StatefulWidget {
  9. // const OrderPageInfo({Key? key}) : super(key: key);
  10. //
  11. // @override
  12. // State<OrderPageInfo> createState() => _OrderPageInfoState();
  13. // }
  14. class OrderPageInfo extends BasicPage {
  15. @override
  16. void onCancel() {
  17. }
  18. @override
  19. Widget builder (BuildContext context) {
  20. naviTitle= '订单详情';
  21. return Column(
  22. children: [
  23. OrderInfoCard(),
  24. Spacer(),
  25. Container(
  26. margin: EdgeInsets.fromLTRB(15.w, 0, 15.w, 50.h),
  27. child: Row(
  28. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  29. children: [
  30. GestureDetector(
  31. onTap: () {
  32. onCancel();
  33. },
  34. child: Container(
  35. width: 150.w,
  36. height: 49.h,
  37. decoration: BoxDecoration(
  38. color: const Color(0xffffffff),
  39. border: Border.all(
  40. color: const Color(0xFFFF703B),
  41. width: 1.w,
  42. style: BorderStyle.solid),
  43. borderRadius:
  44. BorderRadius.all(Radius.circular(24.5.w))),
  45. child: Center(
  46. child: Text(
  47. '取消',
  48. style: TextStyle(
  49. fontSize: 20.sp,
  50. color: const Color(0xFFFF703B),
  51. fontWeight: FontWeight.bold),
  52. ),
  53. ),
  54. ),
  55. ),
  56. DefaultButton(
  57. color: const Color(0xffffffff),
  58. backColor: const Color(0xFFFF703B),
  59. width: 150.w,
  60. height: 49.h,
  61. text: '支付',
  62. onPressed: () {
  63. Fluttertoast.showToast(msg: '支付成功!');
  64. Get.offAllNamed('/');
  65. },
  66. margin: const EdgeInsets.all(0),
  67. fontSize: 20.sp,
  68. radius: 24.5.w,
  69. ),
  70. ],
  71. ),
  72. ),
  73. ],
  74. );
  75. }
  76. }