SuccessfulReception.dart 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter/cupertino.dart';
  3. import 'dart:ui';
  4. import '../styles/totast.dart';
  5. import '../net/HttpManager.dart';
  6. import '../net/Result.dart';
  7. import '../widget/LinearButton.dart';
  8. class SuccessfulReception extends StatefulWidget {
  9. SuccessfulReception({Key key, this.money, this.playerId}) : super(key: key);
  10. final int money;
  11. final int playerId;
  12. @override
  13. SuccessfulReceptionState createState() => SuccessfulReceptionState();
  14. }
  15. class SuccessfulReceptionState extends State<SuccessfulReception> {
  16. @override
  17. void initState() {
  18. super.initState();
  19. // Timer(Duration(seconds: 2), (){
  20. // Navigator.of(context).pop();
  21. // });
  22. }
  23. @override
  24. Widget build(BuildContext context) {
  25. return GestureDetector(
  26. onTap: () {
  27. Navigator.of(context).pop();
  28. },
  29. child: Scaffold(
  30. backgroundColor: Color(0xCC000000),
  31. body: Container(
  32. child: Center(
  33. child: Stack(
  34. children: <Widget>[
  35. Container(
  36. // padding: EdgeInsets.only(top: 29, bottom: 49),
  37. width: 268,
  38. height: 294,
  39. decoration: BoxDecoration(
  40. border: Border.all(width: 1, color: Theme.of(context).primaryColor),
  41. color: Color(0xFF15151D),
  42. image: DecorationImage(image: AssetImage('images/img_guangmang1.png'), alignment: Alignment.topCenter, fit: BoxFit.contain)),
  43. child: Column(
  44. crossAxisAlignment: CrossAxisAlignment.center,
  45. children: <Widget>[
  46. Container(
  47. height: 63,
  48. ),
  49. Image.asset(
  50. 'images/iocn_dajiafen.png',
  51. ),
  52. Container(
  53. height: 25,
  54. ),
  55. Text('恭喜你获得${widget.money}积分', style: TextStyle(color: Color(0xFFD4504B), fontSize: 18, fontWeight: FontWeight.w600)),
  56. Container(
  57. height: 44,
  58. ),
  59. Padding(
  60. padding: EdgeInsets.symmetric(horizontal: 25),
  61. child: LinearButton(
  62. btntext: '确定',
  63. btnHeight: 36.0,
  64. onTapHomeMenu: () {
  65. Navigator.of(context).pop();
  66. },
  67. ),
  68. ),
  69. ],
  70. )),
  71. Positioned(
  72. top: 0,
  73. left: 0,
  74. child: Image.asset(
  75. 'images/tancuang_shang.png',
  76. // width: 131,
  77. ),
  78. ),
  79. Positioned(
  80. bottom: 0,
  81. right: 4,
  82. child: Image.asset(
  83. 'images/tancuang_xia.png',
  84. // width: 148,
  85. ),
  86. ),
  87. ],
  88. )),
  89. ),
  90. ),
  91. );
  92. }
  93. }