fix: 用户昵称溢出

This commit is contained in:
guozhigq
2023-07-26 15:47:00 +08:00
parent 54d003fdb1
commit fdbf494523
3 changed files with 9 additions and 3 deletions

View File

@ -7,7 +7,8 @@ class CustomToast extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom), margin:
EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom + 20),
padding: const EdgeInsets.symmetric(horizontal: 17, vertical: 10), padding: const EdgeInsets.symmetric(horizontal: 17, vertical: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).colorScheme.primaryContainer.withOpacity(0.8), color: Theme.of(context).colorScheme.primaryContainer.withOpacity(0.8),

View File

@ -19,6 +19,8 @@ Widget followItem({item}) {
), ),
title: Text( title: Text(
item.uname, item.uname,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(fontSize: 14), style: const TextStyle(fontSize: 14),
), ),
subtitle: Text( subtitle: Text(

View File

@ -108,16 +108,19 @@ class _MemberPageState extends State<MemberPage>
const SizedBox(height: 14), const SizedBox(height: 14),
Row( Row(
children: [ children: [
Text( Expanded(
child: Text(
_memberController _memberController
.memberInfo.value.name!, .memberInfo.value.name!,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: Theme.of(context) style: Theme.of(context)
.textTheme .textTheme
.bodyLarge! .bodyLarge!
.copyWith( .copyWith(
fontWeight: fontWeight:
FontWeight.bold), FontWeight.bold),
), )),
const SizedBox(width: 2), const SizedBox(width: 2),
if (_memberController if (_memberController
.memberInfo.value.sex == .memberInfo.value.sex ==