import 'package:dating_touchme_app/components/page_appbar.dart'; import 'package:dating_touchme_app/extension/ex_widget.dart'; import 'package:dating_touchme_app/generated/assets.dart'; import 'package:dating_touchme_app/pages/mine/add_bankcard_page.dart'; import 'package:dating_touchme_app/pages/mine/withdraw_history_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; class WithdrawPage extends StatefulWidget { const WithdrawPage({super.key}); @override State createState() => _WithdrawPageState(); } class _WithdrawPageState extends State { @override Widget build(BuildContext context) { return Scaffold( appBar: PageAppbar(title: "提现"), body: SingleChildScrollView( child: Column( children: [ Container( padding: EdgeInsetsGeometry.symmetric( horizontal: 16.w, vertical: 19.w ), margin: EdgeInsets.only( bottom: 17.w ), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "到账银行卡", style: TextStyle( fontSize: 12.w, ), ), SizedBox(width: 24.w,), Expanded( child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "工商银行(7846)", style: TextStyle( fontSize: 13.w, fontWeight: FontWeight.w500 ), ), SizedBox(height: 6.w,), Text( "1个工作日内到账", style: TextStyle( fontSize: 12.w, color: const Color.fromRGBO(153, 153, 153, 1) ), ) ], ), Icon( Icons.keyboard_arrow_right, size: 15.w, color: const Color.fromRGBO(153, 153, 153, 1), ) ], ), ) ], ).onTap(() { showModalBottomSheet( context: Get.context!, builder: (BuildContext context) { return Container( height: 357.w, color: Colors.white, child: Column( children: [ Container( height: 37.w, color: const Color.fromRGBO(247, 247, 247, 1), padding: EdgeInsetsGeometry.symmetric( horizontal: 16.w ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( "取消", style: TextStyle( fontSize: 14.w, color: const Color.fromRGBO(153, 153, 153, 1) ), ).onTap((){ Navigator.pop(context); }), Text( "选择到账银行卡", style: TextStyle( fontSize: 14.w, fontWeight: FontWeight.w500 ), ), Text( "取消", style: TextStyle( fontSize: 14.w, color: const Color.fromRGBO(153, 153, 153, 0) ), ), ], ), ), Expanded( child: SingleChildScrollView( child: Container( padding: EdgeInsets.all(16.w), child: Column( children: [ cardItem(), cardItem(), cardItem(), cardItem(), cardItem(), cardItem(), addCard().onTap((){ Get.to(() => AddBankcardPage()); }), ], ), ), ), ) ], ), ); } ); }), ), Container( padding: EdgeInsetsGeometry.symmetric( horizontal: 16.w ), child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.start, children: [ Text( "提现金额", style: TextStyle( fontSize: 12.w, color: Colors.black ), ) ], ), SizedBox(height: 12.w,), Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "¥", style: TextStyle( fontSize: 24.w, color: Colors.black, fontWeight: FontWeight.w500 ), ) ], ), SizedBox(height: 16.w,), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( "可提现金额:3880.00元", style: TextStyle( fontSize: 12.w, color: const Color.fromRGBO(153, 153, 153, 1) ), ), Text( "提现记录", style: TextStyle( fontSize: 12.w, color: const Color.fromRGBO(25, 114, 248, 1) ), ).onTap((){ Get.to(() => WithdrawHistoryPage()); }) ], ) ], ), ) ], ), ), ); } Widget cardItem(){ return Container( padding: EdgeInsets.only( bottom: 12.w ), margin: EdgeInsets.only( bottom: 20.w ), decoration: BoxDecoration( border: Border( bottom: BorderSide( width: 1, color: const Color.fromRGBO(238, 238, 238, 1) ) ) ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row ( children: [ Image.asset( Assets.imagesBankIcon, width: 16.w, ), SizedBox(width: 10.w,), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "工商银行", style: TextStyle( fontSize: 14.w, fontWeight: FontWeight.w500 ), ), Text( "**** **** **** 236", style: TextStyle( fontSize: 14.w, color: const Color.fromRGBO(153, 153, 153, 1) ), ), ], ) ], ), Icon( Icons.check, size: 20.w, color: const Color.fromRGBO(238, 129, 27, 1), ) ], ), ); } Widget addCard(){ return Container( padding: EdgeInsets.only( bottom: 12.w ), margin: EdgeInsets.only( bottom: 20.w ), decoration: BoxDecoration( border: Border( bottom: BorderSide( width: 1, color: const Color.fromRGBO(238, 238, 238, 1) ) ) ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row ( children: [ Image.asset( Assets.imagesBankcardIcon, width: 16.w, ), SizedBox(width: 10.w,), Text( "使用新卡提现", style: TextStyle( fontSize: 14.w, fontWeight: FontWeight.w500 ), ), ], ), Icon( Icons.keyboard_arrow_right, size: 20.w, color: const Color.fromRGBO(153, 153, 153, 1), ) ], ), ); } }