feat(qol): add smart tag actions, universal zoom, scroll-to-top, desktop hotkeys, and Pawchive provider

This commit is contained in:
2026-09-03 17:37:15 +03:00
parent ec6d8156e0
commit cc5a1a4f82
12 changed files with 789 additions and 14 deletions
+14 -2
View File
@@ -1,15 +1,21 @@
import 'package:flutter/material.dart';
class TagChip extends StatelessWidget {
const TagChip({required this.tag, this.onTap, super.key});
const TagChip({
required this.tag,
this.onTap,
this.onLongPress,
super.key,
});
final String tag;
final VoidCallback? onTap;
final VoidCallback? onLongPress;
@override
Widget build(BuildContext context) {
final scheme = Theme.of(context).colorScheme;
return ActionChip(
final chip = ActionChip(
onPressed: onTap,
label: Text(tag),
labelStyle: TextStyle(
@@ -20,5 +26,11 @@ class TagChip extends StatelessWidget {
side: BorderSide(color: scheme.outlineVariant.withValues(alpha: 0.65)),
visualDensity: VisualDensity.compact,
);
if (onLongPress == null) return chip;
return GestureDetector(
behavior: HitTestBehavior.opaque,
onLongPress: onLongPress,
child: chip,
);
}
}