Give favorite button only for local photos
This commit is contained in:
parent
27519273e5
commit
96ce1f5908
1 changed files with 11 additions and 9 deletions
|
@ -88,16 +88,18 @@ class _DetailPageState extends State<DetailPage> {
|
|||
}
|
||||
|
||||
AppBar _buildAppBar() {
|
||||
final actions = List<Widget>();
|
||||
if (widget.photos[_selectedIndex].localId != null) {
|
||||
actions.add(_getFavoriteButton());
|
||||
}
|
||||
actions.add(IconButton(
|
||||
icon: Icon(Icons.share),
|
||||
onPressed: () async {
|
||||
share(_photos[_selectedIndex]);
|
||||
},
|
||||
));
|
||||
return AppBar(
|
||||
actions: <Widget>[
|
||||
_getFavoriteButton(),
|
||||
IconButton(
|
||||
icon: Icon(Icons.share),
|
||||
onPressed: () async {
|
||||
share(_photos[_selectedIndex]);
|
||||
},
|
||||
)
|
||||
],
|
||||
actions: actions,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue