part of user_order_refunded_details;



class RefundedDetailsPage extends StatefulWidget {
  const RefundedDetailsPage({Key? key}) : super(key: key);

  @override
  State<RefundedDetailsPage> createState() => _RefundedDetailsState();
}

class _RefundedDetailsState extends State<RefundedDetailsPage> {
  @override
  Widget build(BuildContext context) {
    bool a = true;
    return  Column(
      mainAxisSize: MainAxisSize.min,
      children: [
        Container(
          color: Colors.white,
          padding: EdgeInsets.symmetric(vertical: 17.w),
          width: double.infinity,
          margin: EdgeInsets.fromLTRB(10.w, 0.w, 10.w, 0.w),
          child: Container(
            // color: Colors.red,
              child:Stack(
                children: [
                  const Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      Text('金额明细',textAlign:TextAlign.center),
                    ],
                  ),
                  Positioned(
                    right: 0.w,
                    top: 0.w,
                    child: GestureDetector(
                      onTap: (){
                        context.pop();
                      },
                      child: SizedBox(
                        width: 20.w,
                        height: 20.w,
                        child: Image.asset('assets/images/close.png'),
                      ),
                    ),
                  )
                ],
              )
          ),
        ),
        SizedBox(height: 50.w,),
        Container(
          margin: EdgeInsets.only(left: 15.w,right: 17.5.w),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Text('总价',style: TextStyle(fontSize: 16.w,color: Colours.c3,fontWeight: Fonts.medium),),
              Text('¥199.80',style: TextStyle(fontSize: 17.w,color: Colours.cAB1941,fontWeight: Fonts.medium),),
            ],
          ),
        ),
        Container(
          margin: EdgeInsets.only(left: 15.w,right: 17.5.w,top:15.5.w),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Text('优惠券抵扣',style: TextStyle(fontSize: 13.w,color: Colours.c9,),),
              buildItem('188.80', false
              ),
            ],
          ),
        ),
        Container(
          margin: EdgeInsets.only(left: 15.w,right: 17.5.w,top:11.5.w,bottom: 39.5.w),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Text('积分抵扣',style: TextStyle(fontSize: 13.w,color: Colours.c9,),),
              buildItem('0.00', true),
            ],
          ),
        ),
      ],
    );
  }

  Widget buildItem(String show,bool isZero){
    if(isZero){
      return Text('$show',style: TextStyle(fontSize: 13.w,color: Colours.c3,),);
    } else{
      return Text('减 ¥$show',style: TextStyle(fontSize: 13.w,color: Colours.cAB1941,fontWeight: Fonts.medium),);
    }
  }
}
