Skip to content

Commit

Permalink
Feat: Prevent Others Collection name being changed in ShoppingListScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
MuKhAlm committed Feb 24, 2023
1 parent 3cbcbe5 commit 644ca98
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions lib/screens/shopping_list_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -269,25 +269,26 @@ class _ShoppingListScreenState extends State<ShoppingListScreen> {
}
},
itemBuilder: (context) => [
PopupMenuItem(
value: 'change name',
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: const [
Icon(
Icons.edit,
),
SizedBox(
width: 10,
),
Text(
'Change\nName',
softWrap: true,
),
],
if (collection.name != 'Others')
PopupMenuItem(
value: 'change name',
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: const [
Icon(
Icons.edit,
),
SizedBox(
width: 10,
),
Text(
'Change\nName',
softWrap: true,
),
],
),
),
),
PopupMenuItem(
value: 'delete',
child: Row(
Expand Down

0 comments on commit 644ca98

Please sign in to comment.