opt: hotword widget

This commit is contained in:
bggRGjQaUbCoE
2024-10-12 22:27:08 +08:00
parent 86a21d8fc4
commit 34a467a230

View File

@@ -30,15 +30,16 @@ class HotKeyword extends StatelessWidget {
onTap: () => onClick!(i.keyword), onTap: () => onClick!(i.keyword),
child: Padding( child: Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 2, left: 2,
right: hotSearchList!.indexOf(i) % 2 == 1 ? 10 : 0), right: 10,
),
child: Tooltip( child: Tooltip(
message: i.keyword!, message: i.keyword!,
child: Row( child: Row(
children: [ children: [
Flexible( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.fromLTRB(6, 5, 4, 5), padding: const EdgeInsets.fromLTRB(6, 5, 0, 5),
child: Text( child: Text(
i.keyword!, i.keyword!,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
@@ -47,7 +48,8 @@ class HotKeyword extends StatelessWidget {
), ),
), ),
), ),
if (i.icon != null && i.icon != '') if (i.icon != null && i.icon != '') ...[
const SizedBox(width: 4),
SizedBox( SizedBox(
height: 15, height: 15,
child: CachedNetworkImage( child: CachedNetworkImage(
@@ -55,6 +57,7 @@ class HotKeyword extends StatelessWidget {
height: 15.0, height: 15.0,
), ),
), ),
]
], ],
), ),
), ),