YSHomeMsgSetting.dart 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter/cupertino.dart';
  3. import 'package:ysairplane/base/YSBase.dart';
  4. import 'package:ysairplane/tools/YSTools.dart';
  5. class YSHomeMsgSetting extends StatefulWidget {
  6. @override
  7. _YSHomeMsgSettingState createState() => _YSHomeMsgSettingState();
  8. }
  9. class _YSHomeMsgSettingState extends State<YSHomeMsgSetting> {
  10. bool _isOpen = false;
  11. @override
  12. Widget build(BuildContext context) {
  13. return YSBase(
  14. ystitle: '设置',
  15. yschild: Container(
  16. width: MediaQuery.of(context).size.width,
  17. height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44,
  18. color: Color(0xFFF1F2F3),
  19. child: Column(
  20. children: [
  21. Container(
  22. padding: EdgeInsets.all(hsp(30)),
  23. color: Color(0xFFFAFAFA),
  24. child: Row(
  25. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  26. children: [
  27. Text('消息提醒',style: TextStyle(fontSize: zsp(34),color: Color(0xFF333333)),),
  28. GestureDetector(
  29. onTap: (){
  30. setState(() {
  31. _isOpen = !_isOpen;
  32. });
  33. },
  34. child: Container(
  35. height: hsp(60),
  36. width: hsp(100),
  37. child: Image.asset(_isOpen==false?'lib/images/kaiguankai.png':'lib/images/kaiguanguan.png'),
  38. ),
  39. )
  40. ],
  41. ),
  42. )
  43. ],
  44. ),
  45. ),
  46. );
  47. }
  48. }