Add popup item for rename

This commit is contained in:
Neeraj Gupta 2021-09-23 08:04:15 +05:30
parent 49d693b9cb
commit d01bd09242
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1

View file

@ -158,6 +158,33 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
},
));
}
if (widget.type == GalleryAppBarType.owned_collection) {
actions.add(PopupMenuButton(
itemBuilder: (context) {
final List<PopupMenuItem> items = [];
items.add(
PopupMenuItem(
value: 1,
child: Row(
children: [
Icon(Icons.drive_file_rename_outline),
Padding(
padding: EdgeInsets.all(8),
),
Text("rename"),
],
),
),
);
return items;
},
onSelected: (value) async {
if (value == 1) {
await _renameAlbum(context);
}
},
));
}
return actions;
}