import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:ysairplane/base/YSBase.dart'; import 'package:ysairplane/tools/YSTools.dart'; class YSHomeMsgSetting extends StatefulWidget { @override _YSHomeMsgSettingState createState() => _YSHomeMsgSettingState(); } class _YSHomeMsgSettingState extends State { bool _isOpen = false; @override Widget build(BuildContext context) { return YSBase( ystitle: '设置', yschild: Container( width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44, color: Color(0xFFF1F2F3), child: Column( children: [ Container( padding: EdgeInsets.all(hsp(30)), color: Color(0xFFFAFAFA), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text('消息提醒',style: TextStyle(fontSize: zsp(34),color: Color(0xFF333333)),), GestureDetector( onTap: (){ setState(() { _isOpen = !_isOpen; }); }, child: Container( height: hsp(60), width: hsp(100), child: Image.asset(_isOpen==false?'lib/images/kaiguankai.png':'lib/images/kaiguanguan.png'), ), ) ], ), ) ], ), ), ); } }