Hibok
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

152 linhas
4.2 KiB

  1. import 'package:chat/utils/CustomUI.dart';
  2. import 'package:flutter/material.dart';
  3. class BindAccountPage extends StatefulWidget {
  4. BindAccountPage({Key key}) : super(key: key);
  5. _BindAccountPageState createState() => _BindAccountPageState();
  6. }
  7. class _BindAccountPageState extends State<BindAccountPage>
  8. with SingleTickerProviderStateMixin {
  9. TabController tabCtrl;
  10. @override
  11. void initState() {
  12. super.initState();
  13. }
  14. @override
  15. void dispose() {
  16. super.dispose();
  17. }
  18. @override
  19. Widget build(BuildContext context) {
  20. return Scaffold(
  21. appBar: AppBar(
  22. title: Text('绑定账号'),
  23. centerTitle: true,
  24. leading: CustomUI.buildCustomLeading(context),
  25. ),
  26. body: SafeArea(
  27. child: Center(
  28. child: Container(
  29. color: Colors.grey[200],
  30. height: MediaQuery.of(context).size.height,
  31. width: MediaQuery.of(context).size.width,
  32. child: _buildBody(),
  33. ),
  34. )));
  35. }
  36. Widget _buildBody() {
  37. return Column(
  38. children: <Widget>[
  39. _buildCard(),
  40. _buildCardList(),
  41. ],
  42. );
  43. }
  44. // Widget _buildItem() {
  45. // Widget radio = new Radio(
  46. // value: 0,
  47. // groupValue: 0, //当value和groupValue一致的时候则选中
  48. // activeColor: Colors.red,
  49. // onChanged: (T) {
  50. // setState(() {});
  51. // });
  52. // return Container(
  53. // height: 60,
  54. // child: Row(
  55. // crossAxisAlignment: CrossAxisAlignment.center,
  56. // mainAxisAlignment: MainAxisAlignment.center,
  57. // children: <Widget>[
  58. // Padding(
  59. // padding: EdgeInsets.only(left: 25),
  60. // child: Text(
  61. // '小熊猫',
  62. // style: TextStyle(fontWeight: FontWeight.w500),
  63. // ),
  64. // ),
  65. // Expanded(
  66. // child: Padding(
  67. // padding: EdgeInsets.only(left: 60),
  68. // child: Text(
  69. // '134598412354698',
  70. // style: TextStyle(color: Colors.grey),
  71. // ),
  72. // ),
  73. // ),
  74. // Padding(
  75. // padding: EdgeInsets.only(right: 10),
  76. // child: radio,
  77. // ),
  78. // ],
  79. // ),
  80. // );
  81. // }
  82. Widget _buildCardList() {
  83. return Container(
  84. color: Colors.white,
  85. width: double.infinity,
  86. child: Column(
  87. children: <Widget>[
  88. //_buildItem(),
  89. // _buildDivider(),
  90. // _buildItem(),
  91. ],
  92. ),
  93. );
  94. }
  95. Widget _buildCard() {
  96. return InkWell(
  97. onTap: () {
  98. // Navigator.of(context).push(
  99. // new MaterialPageRoute(
  100. // builder: (context) {
  101. // return BindBankPage(isBind: ,);
  102. // },
  103. // ),
  104. // );
  105. },
  106. child: Container(
  107. margin: EdgeInsets.only(top: 20, bottom: 30),
  108. width: MediaQuery.of(context).size.width * 0.92,
  109. decoration: BoxDecoration(
  110. color: const Color(0xFF2172FF),
  111. boxShadow: [
  112. BoxShadow(
  113. color: const Color(0xA80ECFFF),
  114. blurRadius: 8,
  115. )
  116. ],
  117. borderRadius: BorderRadius.all(Radius.circular(5))),
  118. child: Column(
  119. children: <Widget>[
  120. Container(
  121. margin: EdgeInsets.only(top: 10),
  122. child: Text('+',
  123. textScaleFactor: 1.0,
  124. style: TextStyle(
  125. color: Colors.white,
  126. fontSize: 55,
  127. fontWeight: FontWeight.w700)),
  128. ),
  129. Container(
  130. padding: EdgeInsets.only(right: 10),
  131. height: 30,
  132. child: Text(
  133. '添加银行卡',
  134. textScaleFactor: 1.0,
  135. style: TextStyle(color: Colors.white, fontSize: 14),
  136. ))
  137. ],
  138. ),
  139. ));
  140. }
  141. }