From 292654081a41c379ce04a72c74bbeec85143da88 Mon Sep 17 00:00:00 2001 From: marcin_wojnarowski Date: Fri, 4 Dec 2020 15:43:39 +0000 Subject: [PATCH] show app icon in about and links to support --- lib/widgets/about_tile.dart | 30 +++++++++++++++++++++++++++++- pubspec.yaml | 1 + 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/lib/widgets/about_tile.dart b/lib/widgets/about_tile.dart index 2e8b6ad..c3cab44 100644 --- a/lib/widgets/about_tile.dart +++ b/lib/widgets/about_tile.dart @@ -46,9 +46,37 @@ class AboutTile extends HookWidget { FlatButton.icon( icon: Icon(Icons.monetization_on), label: Text('support development'), - onPressed: () {}, // TODO: link to some donation site + onPressed: () { + showDialog( + context: context, + builder: (_) => Dialog( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + FlatButton( + child: Text('Patreon'), + onPressed: () => + openInBrowser('https://patreon.com/lemmur'), + ), + FlatButton( + child: Text('Buy Me a Coffee'), + onPressed: () => + openInBrowser('https://buymeacoff.ee/lemmur'), + ), + ], + ), + ), + ); + }, // TODO: link to some donation site ), ], + applicationIcon: ClipRRect( + borderRadius: BorderRadius.circular(10), + child: Image.asset( + 'assets/app_icon.png', + width: 54, + ), + ), applicationVersion: packageInfo.version, ); } diff --git a/pubspec.yaml b/pubspec.yaml index eac6a6d..df21188 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -76,6 +76,7 @@ flutter: # To add assets to your application, add an assets section, like this: assets: - CHANGELOG.md + - assets/app_icon.png # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware. # For details regarding adding assets from package dependencies, see