mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: remove disliked rcmd
Closes #80 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -217,9 +217,9 @@ class _SearchPageState extends State<SearchPage> with RouteAware {
|
||||
children: _searchController.historyList
|
||||
.map(
|
||||
(item) => SearchText(
|
||||
searchText: item,
|
||||
onSelect: _searchController.onClickKeyword,
|
||||
onLongSelect: _searchController.onLongSelect,
|
||||
text: item,
|
||||
onTap: _searchController.onClickKeyword,
|
||||
onLongPress: _searchController.onLongSelect,
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SearchText extends StatelessWidget {
|
||||
final String? searchText;
|
||||
final Function? onSelect;
|
||||
final Function? onLongSelect;
|
||||
final String text;
|
||||
final ValueChanged<String>? onTap;
|
||||
final ValueChanged<String>? onLongPress;
|
||||
final double? fontSize;
|
||||
final Color? bgColor;
|
||||
final Color? textColor;
|
||||
final TextAlign? textAlign;
|
||||
|
||||
const SearchText({
|
||||
super.key,
|
||||
this.searchText,
|
||||
this.onSelect,
|
||||
this.onLongSelect,
|
||||
required this.text,
|
||||
this.onTap,
|
||||
this.onLongPress,
|
||||
this.fontSize,
|
||||
this.bgColor,
|
||||
this.textColor,
|
||||
@@ -28,17 +29,17 @@ class SearchText extends StatelessWidget {
|
||||
padding: EdgeInsets.zero,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
onSelect?.call(searchText);
|
||||
onTap?.call(text);
|
||||
},
|
||||
onLongPress: () {
|
||||
onLongSelect?.call(searchText);
|
||||
onLongPress?.call(text);
|
||||
},
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(top: 5, bottom: 5, left: 11, right: 11),
|
||||
child: Text(
|
||||
searchText!,
|
||||
text,
|
||||
textAlign: textAlign,
|
||||
style: TextStyle(
|
||||
fontSize: fontSize,
|
||||
|
||||
Reference in New Issue
Block a user