opt mobile unread and autoSizeTextField

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2023-07-10 21:03:35 +08:00
parent 193426a3c1
commit 745f33a8c1
44 changed files with 160 additions and 46 deletions

View file

@ -2194,7 +2194,7 @@ Widget buildRemoteBlock({required Widget child, WhetherUseRemoteBlock? use}) {
}
Widget unreadMessageCountBuilder(RxInt? count,
{double? size, double? fontSize, double? marginLeft}) {
{double? size, double? fontSize}) {
return Obx(() => Offstage(
offstage: !((count?.value ?? 0) > 0),
child: Container(
@ -2209,5 +2209,18 @@ Widget unreadMessageCountBuilder(RxInt? count,
maxLines: 1,
style: TextStyle(color: Colors.white, fontSize: fontSize ?? 10)),
),
).marginOnly(left: marginLeft ?? 4)));
)));
}
Widget unreadTopRightBuilder(RxInt? count,
{Widget? icon, double? size, double? fontSize}) {
return Stack(
children: [
icon ?? Icon(Icons.chat),
Positioned(
top: 0,
right: 0,
child: unreadMessageCountBuilder(count, size: 12, fontSize: 8))
],
);
}