Skip to content

Commit

Permalink
Merge pull request #28 from ponkotuy/reload-button
Browse files Browse the repository at this point in the history
Add reload button
  • Loading branch information
ponkotuy authored Nov 14, 2022
2 parents b9e7cb4 + 6454877 commit eae4642
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/my_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
}
}

void runReload() async {
reload();
}

void runShare() async {
await Share.shareFiles([target!.path]);
}
Expand Down Expand Up @@ -61,6 +65,12 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
text: const Text('Open'),
color: primary(context),
),
IconTextButton(
onPressed: isOpenImage() ? runReload : null,
icon: const Icon(Icons.refresh),
text: const Text('Reload dir'),
color: primary(context)
),
IconTextButton(
onPressed: shareable() ? runShare : null,
icon: const Icon(Icons.share),
Expand Down

0 comments on commit eae4642

Please sign in to comment.