mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 04:00:28 +08:00
opt mouse control
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SearchText extends StatelessWidget {
|
||||
@@ -25,12 +26,18 @@ class SearchText extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
late final colorScheme = Theme.of(context).colorScheme;
|
||||
final hasLongPress = onLongPress != null;
|
||||
return Material(
|
||||
color: bgColor ?? colorScheme.onInverseSurface,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
||||
child: InkWell(
|
||||
onTap: () => onTap?.call(text),
|
||||
onLongPress: onLongPress != null ? () => onLongPress!(text) : null,
|
||||
onLongPress: hasLongPress && Utils.isMobile
|
||||
? () => onLongPress!(text)
|
||||
: null,
|
||||
onSecondaryTap: hasLongPress && !Utils.isMobile
|
||||
? () => onLongPress!(text)
|
||||
: null,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
||||
child: Padding(
|
||||
padding:
|
||||
|
||||
Reference in New Issue
Block a user