From d01bd0924279d90d00fe254e0c4b3069961853d2 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Thu, 23 Sep 2021 08:04:15 +0530 Subject: [PATCH] Add popup item for rename --- lib/ui/gallery_app_bar_widget.dart | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/lib/ui/gallery_app_bar_widget.dart b/lib/ui/gallery_app_bar_widget.dart index ec93f44dc..5d5ca7e39 100644 --- a/lib/ui/gallery_app_bar_widget.dart +++ b/lib/ui/gallery_app_bar_widget.dart @@ -158,6 +158,33 @@ class _GalleryAppBarWidgetState extends State { }, )); } + if (widget.type == GalleryAppBarType.owned_collection) { + actions.add(PopupMenuButton( + itemBuilder: (context) { + final List 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; }