Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesvedder committed Jun 10, 2024
1 parent 891b8d7 commit 30b84ee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
12 changes: 4 additions & 8 deletions designer_v2/lib/common_views/action_popup_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,15 @@ class ActionPopUpMenuButton extends StatelessWidget {
popupList.add(PopupMenuItem(
value: action,
child: ListTile(
contentPadding: const EdgeInsets.symmetric(
horizontal: 8.0, vertical: 0),
contentPadding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 0),
horizontalTitleGap: 4.0,
leading: (action.icon == null)
? const SizedBox.shrink()
: Icon(action.icon,
size: theme.iconTheme.size ?? 14.0,
color: action.isDestructive
? Colors.red
: iconColorDefault),
size: theme.iconTheme.size ?? 14.0,
color: action.isDestructive ? Colors.red : iconColorDefault),
title: action.isDestructive
? Text(
action.label, style: textTheme.copyWith(color: Colors.red))
? Text(action.label, style: textTheme.copyWith(color: Colors.red))
: Text(action.label, style: textTheme),
),
));
Expand Down
17 changes: 8 additions & 9 deletions designer_v2/lib/utils/model_action.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ class ModelAction<T> {
final bool isAvailable;
final bool isDestructive;

ModelAction({
required this.type,
required this.label,
required this.onExecute,
this.isSeparator = false,
this.isAvailable = true,
this.isDestructive = false,
this.icon
});
ModelAction(
{required this.type,
required this.label,
required this.onExecute,
this.isSeparator = false,
this.isAvailable = true,
this.isDestructive = false,
this.icon});

static ModelAction addSeparator() {
return ModelAction(
Expand Down

0 comments on commit 30b84ee

Please sign in to comment.