opt top up panel

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-16 18:16:47 +08:00
parent 1326cc4966
commit 616c129ffd

View File

@@ -48,7 +48,7 @@ class _UpPanelState extends State<UpPanel> {
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
height: isTop ? 76 : 60, height: isTop ? 76 : 60,
padding: isTop ? const EdgeInsets.symmetric(horizontal: 6) : null, padding: isTop ? const EdgeInsets.only(left: 12, right: 6) : null,
child: Text.rich( child: Text.rich(
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
@@ -128,7 +128,7 @@ class _UpPanelState extends State<UpPanel> {
widget.dynamicsController.currentMid == -1; widget.dynamicsController.currentMid == -1;
return SizedBox( return SizedBox(
height: 76, height: 76,
width: isTop ? 65 : null, width: isTop ? 70 : null,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
feedBack(); feedBack();
@@ -181,7 +181,7 @@ class _UpPanelState extends State<UpPanel> {
), ),
), ),
Positioned( Positioned(
top: data.type == 'live' ? -5 : 0, top: data.type == 'live' && !isTop ? -5 : 0,
right: data.type == 'live' ? -6 : 4, right: data.type == 'live' ? -6 : 4,
child: Badge( child: Badge(
smallSize: 8, smallSize: 8,
@@ -202,10 +202,8 @@ class _UpPanelState extends State<UpPanel> {
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 4), padding: const EdgeInsets.symmetric(horizontal: 4),
child: Text( child: Text(
data.uname, isTop ? '${data.uname}\n' : data.uname,
overflow: TextOverflow.clip, maxLines: 2,
maxLines: isTop ? 1 : 2,
softWrap: true,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: widget.dynamicsController.currentMid == data.mid color: widget.dynamicsController.currentMid == data.mid