mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 19:17:58 +00:00
flutter_desktop: password menu
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -1031,6 +1031,7 @@ class PopupMenuButton<T> extends StatefulWidget {
|
||||
Key? key,
|
||||
required this.itemBuilder,
|
||||
this.initialValue,
|
||||
this.onHover,
|
||||
this.onSelected,
|
||||
this.onCanceled,
|
||||
this.tooltip,
|
||||
@@ -1061,6 +1062,9 @@ class PopupMenuButton<T> extends StatefulWidget {
|
||||
/// The value of the menu item, if any, that should be highlighted when the menu opens.
|
||||
final T? initialValue;
|
||||
|
||||
/// Called when the user hovers this button.
|
||||
final ValueChanged<bool>? onHover;
|
||||
|
||||
/// Called when the user selects a value from the popup menu created by this button.
|
||||
///
|
||||
/// If the popup menu is dismissed without selecting a value, [onCanceled] is
|
||||
@@ -1273,18 +1277,20 @@ class PopupMenuButtonState<T> extends State<PopupMenuButton<T>> {
|
||||
|
||||
assert(debugCheckHasMaterialLocalizations(context));
|
||||
|
||||
if (widget.child != null)
|
||||
if (widget.child != null) {
|
||||
return Tooltip(
|
||||
message:
|
||||
widget.tooltip ?? MaterialLocalizations.of(context).showMenuTooltip,
|
||||
child: InkWell(
|
||||
onTap: widget.enabled ? showButtonMenu : null,
|
||||
onHover: widget.onHover,
|
||||
canRequestFocus: _canRequestFocus,
|
||||
radius: widget.splashRadius,
|
||||
enableFeedback: enableFeedback,
|
||||
child: widget.child,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return IconButton(
|
||||
icon: widget.icon ?? Icon(Icons.adaptive.more),
|
||||
|
||||
Reference in New Issue
Block a user