From 00f76c03413598171c5f8995d7b4f57adac18a37 Mon Sep 17 00:00:00 2001 From: tzw Date: Wed, 31 Jan 2024 11:16:05 +0630 Subject: [PATCH] update local popup button --- lib/pages/widgets/local_popup_menu_button.dart | 10 ++++++++-- lib/pages/widgets/local_popupmenu.dart | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/pages/widgets/local_popup_menu_button.dart b/lib/pages/widgets/local_popup_menu_button.dart index 44facd4..2c556af 100644 --- a/lib/pages/widgets/local_popup_menu_button.dart +++ b/lib/pages/widgets/local_popup_menu_button.dart @@ -102,8 +102,14 @@ class _LocalPopupMenuButtonState extends State { value: choice, child: Row( children: [ - 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, ), diff --git a/lib/pages/widgets/local_popupmenu.dart b/lib/pages/widgets/local_popupmenu.dart index d5931b1..1df056a 100644 --- a/lib/pages/widgets/local_popupmenu.dart +++ b/lib/pages/widgets/local_popupmenu.dart @@ -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});