Fix UI Bug: 登录页
This commit is contained in:
@@ -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,30 +450,20 @@ 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: Container(
|
||||||
|
color: Colors.grey[200],
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
// height: ScreenUtil().setHeight(_line_height),
|
height: ScreenUtil().setHeight(_line_height - 1),
|
||||||
// color: Colors.grey[200],
|
child: Row(
|
||||||
color: Colors.grey[200],
|
|
||||||
// padding: EdgeInsets.only(left: 8, top: 4, right: 8, bottom: 4),
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
horizontal: ScreenUtil().setHeight(35),
|
|
||||||
vertical: ScreenUtil().setHeight(17)),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text("${(index + 1).toString()}、${user.username}"),
|
Text("${(index + 1).toString()}、${user.username}"),
|
||||||
@@ -481,7 +471,6 @@ class _LoginPageState extends State<LoginByName3> {
|
|||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.all(0),
|
padding: EdgeInsets.all(0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
// Icons.remove_circle_outline,
|
|
||||||
Icons.highlight_off,
|
Icons.highlight_off,
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
),
|
),
|
||||||
@@ -490,21 +479,17 @@ class _LoginPageState extends State<LoginByName3> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
g_users.remove(user);
|
g_users.remove(user);
|
||||||
SaveAccountPasswordManager.delUser(user);
|
SaveAccountPasswordManager.delUser(user);
|
||||||
//处理最后一个数据,假如最后一个被删掉,将Expand置为false
|
|
||||||
//如果个数大于1个或者唯一一个账号跟当前账号不一样才弹出历史账号
|
|
||||||
// g_can_expand_ListView = g_users.isNotEmpty;
|
|
||||||
g_can_expand_ListView = g_users.length > 1;
|
g_can_expand_ListView = g_users.length > 1;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Divider(height: 1.0, color: Colors.black),
|
),
|
||||||
|
Divider(height: ScreenUtil().setHeight(1), color: Colors.black),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
g_userInfo.username = user.username;
|
g_userInfo.username = user.username;
|
||||||
|
|||||||
Reference in New Issue
Block a user