feat(tasks): group extension folder downloads (#1594)

This commit is contained in:
WuFeng authored and GitHub committed 2026-11-02 15:39:08 +08:00
1 parent fc0a1e0ef9
commit 1e36599d52
84 files changed
+6690 -881

No files matched your search

+23 -4
View File
@@ -1,18 +1,37 @@
import 'package:flutter/material.dart' show Tooltip;
import 'package:flutter/material.dart' show Tooltip, TooltipState;
import 'package:flutter/widgets.dart';
/// The single product tooltip primitive.
///
/// Flutter's tooltip is used intentionally because the shadcn tooltip does not
/// currently inherit Gopeed's mixed Shadcn/Material theme consistently.
class AppTooltip extends StatelessWidget {
const AppTooltip({super.key, required this.message, required this.child});
class AppTooltip extends StatefulWidget {
const AppTooltip({super.key, required this.message, required this.child, this.focusable = false});
final String message;
final Widget child;
final bool focusable;
@override
State<AppTooltip> createState() => _AppTooltipState();
}
class _AppTooltipState extends State<AppTooltip> {
final _tooltipKey = GlobalKey<TooltipState>();
@override
Widget build(BuildContext context) {
return Tooltip(message: message, child: child);
final tooltip = Tooltip(key: _tooltipKey, message: widget.message, child: widget.child);
if (!widget.focusable) return tooltip;
return Focus(
onFocusChange: (focused) {
if (focused) {
_tooltipKey.currentState?.ensureTooltipVisible();
} else {
Tooltip.dismissAllToolTips();
}
},
child: tooltip,
);
}
}