diff --git a/lib/ui/detail_page.dart b/lib/ui/detail_page.dart index 0b8fc6f09a5ba8c6aeab25006a88a7f2b498a330..75262de22e2cfab7498b27a9ec317e2df8ada246 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, ); }