feat: sort zone of video search

This commit is contained in:
bggRGjQaUbCoE
2024-09-28 10:39:20 +08:00
parent 1650f138b6
commit 9e8ce5b093
4 changed files with 132 additions and 43 deletions

View File

@@ -6,6 +6,8 @@ class SearchText extends StatelessWidget {
final int? searchTextIdx;
final Function? onLongSelect;
final double? fontSize;
final Color? bgColor;
final Color? textColor;
const SearchText({
super.key,
this.searchText,
@@ -13,12 +15,15 @@ class SearchText extends StatelessWidget {
this.searchTextIdx,
this.onLongSelect,
this.fontSize,
this.bgColor,
this.textColor,
});
@override
Widget build(BuildContext context) {
return Material(
color: Theme.of(context).colorScheme.surfaceVariant.withOpacity(0.5),
color: bgColor ??
Theme.of(context).colorScheme.surfaceVariant.withOpacity(0.5),
borderRadius: BorderRadius.circular(6),
child: Padding(
padding: EdgeInsets.zero,
@@ -36,8 +41,10 @@ class SearchText extends StatelessWidget {
child: Text(
searchText!,
style: TextStyle(
fontSize: fontSize,
color: Theme.of(context).colorScheme.onSurfaceVariant),
fontSize: fontSize,
color:
textColor ?? Theme.of(context).colorScheme.onSurfaceVariant,
),
),
),
),