mobile: limited height scroll tags/users, and scrollable peers

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-09-25 13:35:01 +08:00
parent 5236dcfe52
commit 167bf70cd6
6 changed files with 37 additions and 37 deletions

View File

@@ -1,3 +1,5 @@
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_hbb/common/hbbs/hbbs.dart';
import 'package:flutter_hbb/common/widgets/login.dart';
@@ -157,11 +159,14 @@ class _MyGroupState extends State<MyGroup> {
}
return true;
}).toList();
final listView = ListView.builder(
shrinkWrap: isMobile,
itemCount: items.length,
itemBuilder: (context, index) => _buildUserItem(items[index]));
var maxHeight = max(MediaQuery.of(context).size.height / 6, 100.0);
return isDesktop
? ListView.builder(
itemCount: items.length,
itemBuilder: (context, index) => _buildUserItem(items[index]))
: Column(children: items.map((e) => _buildUserItem(e)).toList());
? listView
: LimitedBox(maxHeight: maxHeight, child: listView);
});
}