diff --git a/lib/ui/detail_page.dart b/lib/ui/detail_page.dart index 0b8fc6f09..75262de22 100644 --- a/lib/ui/detail_page.dart +++ b/lib/ui/detail_page.dart @@ -88,16 +88,18 @@ class _DetailPageState extends State { } AppBar _buildAppBar() { + final actions = List(); + if (widget.photos[_selectedIndex].localId != null) { + actions.add(_getFavoriteButton()); + } + actions.add(IconButton( + icon: Icon(Icons.share), + onPressed: () async { + share(_photos[_selectedIndex]); + }, + )); return AppBar( - actions: [ - _getFavoriteButton(), - IconButton( - icon: Icon(Icons.share), - onPressed: () async { - share(_photos[_selectedIndex]); - }, - ) - ], + actions: actions, ); }