update local popup button

This commit is contained in:
tzw
2024-01-31 11:16:05 +06:30
parent 115ef18901
commit 00f76c0341
2 changed files with 10 additions and 2 deletions

View File

@@ -102,8 +102,14 @@ class _LocalPopupMenuButtonState extends State<LocalPopupMenuButton> {
value: choice,
child: Row(
children: <Widget>[
LocalText(context, choice.textKey ?? "",
color: choice.enabled ? primaryColor : Colors.grey),
choice.text != null
? Text(choice.text!,
style: TextStyle(
fontSize: 13,
color:
choice.enabled ? primaryColor : Colors.grey))
: LocalText(context, choice.textKey ?? "",
color: choice.enabled ? primaryColor : Colors.grey),
SizedBox(
width: 10,
),

View File

@@ -1,12 +1,14 @@
class LocalPopupMenu {
int id;
String? textKey;
String? text;
bool selected;
bool highlight;
bool enabled;
LocalPopupMenu(
{required this.id,
this.textKey,
this.text,
this.selected = false,
this.highlight = false,
this.enabled = true});