Fix UI Bug: 登录页

iOS
mlch911 4 years ago
parent 21b648c331
commit 11f81eaee8

@ -433,7 +433,7 @@ class _LoginPageState extends State<LoginByName3> {
///ListView ///ListView
Widget _buildListView() { Widget _buildListView() {
double _line_height = 110; double _line_height = 110;
int _height = g_users.length * _line_height.toInt(); double _height = g_users.length * _line_height;
if (_height > 550) { if (_height > 550) {
_height = 550; _height = 550;
} }
@ -450,60 +450,45 @@ class _LoginPageState extends State<LoginByName3> {
bottom: BorderSide(width: 1, color: Colors.black), bottom: BorderSide(width: 1, color: Colors.black),
), ),
), ),
// decoration: new BoxDecoration(
// border: new Border.all(color: Colors.black, width: 0.5),
// // color: Colors.black,
// // borderRadius: new BorderRadius.circular((20.0)),
// ),
child: ListView.builder( child: ListView.builder(
shrinkWrap: true, shrinkWrap: true,
physics: BouncingScrollPhysics(), physics: ClampingScrollPhysics(),
padding: EdgeInsets.zero,
itemBuilder: (context, index) { itemBuilder: (context, index) {
UserAccount user = g_users[index]; UserAccount user = g_users[index];
return GestureDetector( return GestureDetector(
child: Column( child: Container(
children: [ color: Colors.grey[200],
Container( child: Column(
// height: ScreenUtil().setHeight(_line_height), children: [
// color: Colors.grey[200], Container(
color: Colors.grey[200], height: ScreenUtil().setHeight(_line_height - 1),
// padding: EdgeInsets.only(left: 8, top: 4, right: 8, bottom: 4), child: Row(
padding: EdgeInsets.symmetric( mainAxisAlignment: MainAxisAlignment.spaceBetween,
horizontal: ScreenUtil().setHeight(35), children: <Widget>[
vertical: ScreenUtil().setHeight(17)), Text("${(index + 1).toString()}${user.username}"),
child: Column( GestureDetector(
children: [ child: Padding(
Row( padding: EdgeInsets.all(0),
mainAxisAlignment: MainAxisAlignment.spaceBetween, child: Icon(
children: <Widget>[ Icons.highlight_off,
Text("${(index + 1).toString()}${user.username}"), color: Colors.grey,
GestureDetector(
child: Padding(
padding: EdgeInsets.all(0),
child: Icon(
// Icons.remove_circle_outline,
Icons.highlight_off,
color: Colors.grey,
),
), ),
onTap: () {
setState(() {
g_users.remove(user);
SaveAccountPasswordManager.delUser(user);
//Expandfalse
//1
// g_can_expand_ListView = g_users.isNotEmpty;
g_can_expand_ListView = g_users.length > 1;
});
},
), ),
], onTap: () {
), setState(() {
Divider(height: 1.0, color: Colors.black), g_users.remove(user);
], SaveAccountPasswordManager.delUser(user);
g_can_expand_ListView = g_users.length > 1;
});
},
),
],
),
), ),
), Divider(height: ScreenUtil().setHeight(1), color: Colors.black),
], ],
),
), ),
onTap: () { onTap: () {
setState(() { setState(() {

Loading…
Cancel
Save