-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
 These `_ButtonBarForUpdate` and `_ButtonBarForOpen` should probably be generalized at some point, but I think that can be done later since it's only two of them now. Closes: #1775
- Loading branch information
Showing
2 changed files
with
43 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class SnapMenuItem extends StatelessWidget { | ||
const SnapMenuItem({ | ||
required this.title, | ||
required this.onPressed, | ||
this.textStyle, | ||
super.key, | ||
}); | ||
|
||
final String title; | ||
final void Function() onPressed; | ||
final TextStyle? textStyle; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return MenuItemButton( | ||
onPressed: onPressed, | ||
child: IntrinsicWidth( | ||
child: ListTile( | ||
mouseCursor: SystemMouseCursors.click, | ||
title: Text( | ||
title, | ||
style: textStyle, | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |