index.dart 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. height: 100.w,
  27. alignment: Alignment.bottomCenter,
  28. margin: EdgeInsets.fromLTRB(15.w, 0, 15.w, 50.h),
  29. child: Row(
  30. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  31. children: [
  32. GestureDetector(
  33. onTap: () {
  34. onCancel();
  35. },
  36. child: Container(
  37. width: 150.w,
  38. height: 49.h,
  39. decoration: BoxDecoration(
  40. color: const Color(0xffffffff),
  41. border: Border.all(
  42. color: const Color(0xFFFF703B),
  43. width: 1.w,
  44. style: BorderStyle.solid),
  45. borderRadius:
  46. BorderRadius.all(Radius.circular(24.5.w))),
  47. child: Center(
  48. child: Text(
  49. '取消',
  50. style: TextStyle(
  51. fontSize: 20.sp,
  52. color: const Color(0xFFFF703B),
  53. fontWeight: FontWeight.bold),
  54. ),
  55. ),
  56. ),
  57. ),
  58. DefaultButton(
  59. color: const Color(0xffffffff),
  60. backColor: const Color(0xFFFF703B),
  61. width: 150.w,
  62. height: 49.h,
  63. text: '支付',
  64. onPressed: () {
  65. Fluttertoast.showToast(msg: '支付成功!');
  66. Get.offAllNamed('/');
  67. },
  68. margin: const EdgeInsets.all(0),
  69. fontSize: 20.sp,
  70. radius: 24.5.w,
  71. ),
  72. ],
  73. ),
  74. ),
  75. ],
  76. );
  77. }
  78. }