diff --git a/android/app/build.gradle b/android/app/build.gradle
index ff39e606d..6729a1c82 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -156,12 +156,12 @@ dependencies {
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.caverock:androidsvg-aar:1.4'
implementation 'com.commonsware.cwac:document:0.4.1'
- implementation 'com.drewnoakes:metadata-extractor:2.17.0'
+ implementation 'com.drewnoakes:metadata-extractor:2.18.0'
// forked, built by JitPack, cf https://jitpack.io/p/deckerst/Android-TiffBitmapFactory
implementation 'com.github.deckerst:Android-TiffBitmapFactory:876e53870a'
// forked, built by JitPack, cf https://jitpack.io/p/deckerst/pixymeta-android
implementation 'com.github.deckerst:pixymeta-android:706bd73d6e'
- implementation 'com.github.bumptech.glide:glide:4.13.1'
+ implementation 'com.github.bumptech.glide:glide:4.13.2'
implementation 'com.huawei.agconnect:agconnect-core:1.5.2.300'
kapt 'androidx.annotation:annotation:1.3.0'
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index de4434e63..55182c478 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -35,6 +35,15 @@
+
+
+
+
+
+
{
size: 24,
),
text: l10n.aboutLinkSources,
- url: Constants.avesGithub,
+ urlString: Constants.avesGithub,
),
LinkChip(
leading: const Icon(
@@ -87,7 +87,7 @@ class _AppReferenceState extends State {
size: 22,
),
text: l10n.aboutLinkLicense,
- url: '${Constants.avesGithub}/blob/main/LICENSE',
+ urlString: '${Constants.avesGithub}/blob/main/LICENSE',
),
LinkChip(
leading: const Icon(
diff --git a/lib/widgets/about/bug_report.dart b/lib/widgets/about/bug_report.dart
index 68c5dfcdc..46d3d4380 100644
--- a/lib/widgets/about/bug_report.dart
+++ b/lib/widgets/about/bug_report.dart
@@ -36,6 +36,8 @@ class _BugReportState extends State with FeedbackMixin {
late Future _infoLoader;
bool _showInstructions = false;
+ static final bugReportUri = Uri.parse('${Constants.avesGithub}/issues/new?labels=type%3Abug&template=bug_report.md');
+
@override
void initState() {
super.initState();
@@ -198,6 +200,8 @@ class _BugReportState extends State with FeedbackMixin {
}
Future _goToGithub() async {
- await launch('${Constants.avesGithub}/issues/new?labels=type%3Abug&template=bug_report.md');
+ if (await canLaunchUrl(bugReportUri)) {
+ await launchUrl(bugReportUri, mode: LaunchMode.externalApplication);
+ }
}
}
diff --git a/lib/widgets/about/credits.dart b/lib/widgets/about/credits.dart
index 945cfb00c..e0cf73381 100644
--- a/lib/widgets/about/credits.dart
+++ b/lib/widgets/about/credits.dart
@@ -40,7 +40,7 @@ class AboutCredits extends StatelessWidget {
const WidgetSpan(
child: LinkChip(
text: 'World Atlas',
- url: 'https://github.com/topojson/world-atlas',
+ urlString: 'https://github.com/topojson/world-atlas',
textStyle: TextStyle(fontWeight: FontWeight.bold),
),
alignment: PlaceholderAlignment.middle,
diff --git a/lib/widgets/about/licenses.dart b/lib/widgets/about/licenses.dart
index 103d8c90d..8a88ec490 100644
--- a/lib/widgets/about/licenses.dart
+++ b/lib/widgets/about/licenses.dart
@@ -138,14 +138,14 @@ class LicenseRow extends StatelessWidget {
children: [
LinkChip(
text: package.name,
- url: package.sourceUrl,
+ urlString: package.sourceUrl,
textStyle: const TextStyle(fontWeight: FontWeight.bold),
),
Padding(
padding: const EdgeInsetsDirectional.only(start: 16),
child: LinkChip(
text: package.license,
- url: package.licenseUrl,
+ urlString: package.licenseUrl,
color: subColor,
),
),
diff --git a/lib/widgets/common/basic/link_chip.dart b/lib/widgets/common/basic/link_chip.dart
index 63929a809..19869aa4d 100644
--- a/lib/widgets/common/basic/link_chip.dart
+++ b/lib/widgets/common/basic/link_chip.dart
@@ -5,7 +5,7 @@ import 'package:url_launcher/url_launcher.dart';
class LinkChip extends StatelessWidget {
final Widget? leading;
final String text;
- final String? url;
+ final String? urlString;
final Color? color;
final TextStyle? textStyle;
final VoidCallback? onTap;
@@ -16,7 +16,7 @@ class LinkChip extends StatelessWidget {
Key? key,
this.leading,
required this.text,
- this.url,
+ this.urlString,
this.color,
this.textStyle,
this.onTap,
@@ -24,15 +24,18 @@ class LinkChip extends StatelessWidget {
@override
Widget build(BuildContext context) {
- final _url = url;
+ final _urlString = urlString;
return DefaultTextStyle.merge(
style: (textStyle ?? const TextStyle()).copyWith(color: color),
child: InkWell(
borderRadius: borderRadius,
onTap: onTap ??
() async {
- if (_url != null && await canLaunch(_url)) {
- await launch(_url);
+ if (_urlString != null) {
+ final url = Uri.parse(_urlString);
+ if (await canLaunchUrl(url)) {
+ await launchUrl(url, mode: LaunchMode.externalApplication);
+ }
}
},
child: Padding(
diff --git a/lib/widgets/common/basic/markdown_container.dart b/lib/widgets/common/basic/markdown_container.dart
index 43a37964f..8383a70d7 100644
--- a/lib/widgets/common/basic/markdown_container.dart
+++ b/lib/widgets/common/basic/markdown_container.dart
@@ -44,8 +44,11 @@ class MarkdownContainer extends StatelessWidget {
data: data,
selectable: true,
onTapLink: (text, href, title) async {
- if (href != null && await canLaunch(href)) {
- await launch(href);
+ if (href != null) {
+ final url = Uri.parse(href);
+ if (await canLaunchUrl(url)) {
+ await launchUrl(url, mode: LaunchMode.externalApplication);
+ }
}
},
shrinkWrap: true,
diff --git a/lib/widgets/common/map/attribution.dart b/lib/widgets/common/map/attribution.dart
index 5f4060185..6ea130395 100644
--- a/lib/widgets/common/map/attribution.dart
+++ b/lib/widgets/common/map/attribution.dart
@@ -38,8 +38,11 @@ class Attribution extends StatelessWidget {
p: theme.textTheme.caption!.merge(const TextStyle(fontSize: InfoRowGroup.fontSize)),
),
onTapLink: (text, href, title) async {
- if (href != null && await canLaunch(href)) {
- await launch(href);
+ if (href != null) {
+ final url = Uri.parse(href);
+ if (await canLaunchUrl(url)) {
+ await launchUrl(url, mode: LaunchMode.externalApplication);
+ }
}
},
),
diff --git a/lib/widgets/stats/filter_table.dart b/lib/widgets/stats/filter_table.dart
index 700b2d0c0..5c2609eeb 100644
--- a/lib/widgets/stats/filter_table.dart
+++ b/lib/widgets/stats/filter_table.dart
@@ -72,35 +72,27 @@ class FilterTable extends StatelessWidget {
),
),
if (showPercentIndicator)
- // as of percent_indicator v4.0.0, bar radius is not correctly applied to progress bar
- // when width is lower than height, so we clip it and handle padding outside
- Padding(
- padding: EdgeInsets.symmetric(horizontal: lineHeight),
- child: ClipRRect(
- borderRadius: BorderRadius.all(barRadius),
- child: FutureBuilder(
- future: filter.color(context),
- builder: (context, snapshot) {
- final color = snapshot.data;
- return LinearPercentIndicator(
- percent: percent,
- lineHeight: lineHeight,
- backgroundColor: theme.colorScheme.onPrimary.withOpacity(.1),
- progressColor: isMonochrome ? theme.colorScheme.secondary : color,
- animation: true,
- isRTL: isRtl,
- barRadius: barRadius,
- center: Text(
- intl.NumberFormat.percentPattern().format(percent),
- style: TextStyle(
- shadows: theme.brightness == Brightness.dark ? Constants.embossShadows : null,
- ),
- ),
- padding: EdgeInsets.zero,
- );
- },
- ),
- ),
+ FutureBuilder(
+ future: filter.color(context),
+ builder: (context, snapshot) {
+ final color = snapshot.data;
+ return LinearPercentIndicator(
+ percent: percent,
+ lineHeight: lineHeight,
+ backgroundColor: theme.colorScheme.onPrimary.withOpacity(.1),
+ progressColor: isMonochrome ? theme.colorScheme.secondary : color,
+ animation: true,
+ isRTL: isRtl,
+ barRadius: barRadius,
+ center: Text(
+ intl.NumberFormat.percentPattern().format(percent),
+ style: TextStyle(
+ shadows: theme.brightness == Brightness.dark ? Constants.embossShadows : null,
+ ),
+ ),
+ padding: EdgeInsets.symmetric(horizontal: lineHeight),
+ );
+ },
),
Text(
'$count',
diff --git a/lib/widgets/stats/stats_page.dart b/lib/widgets/stats/stats_page.dart
index 24a594ca3..81df64a9a 100644
--- a/lib/widgets/stats/stats_page.dart
+++ b/lib/widgets/stats/stats_page.dart
@@ -110,36 +110,30 @@ class StatsPage extends StatelessWidget {
padding: const EdgeInsets.all(16),
child: Column(
children: [
- // as of percent_indicator v4.0.0, bar radius is not correctly applied to progress bar
- // when width is lower than height, so we clip it and handle padding outside
Row(
mainAxisSize: MainAxisSize.min,
children: [
const Icon(AIcons.location),
- SizedBox(width: lineHeight),
Expanded(
- child: ClipRRect(
- borderRadius: BorderRadius.all(barRadius),
- child: LinearPercentIndicator(
- percent: withGpsPercent,
- lineHeight: lineHeight,
- backgroundColor: theme.colorScheme.onPrimary.withOpacity(.1),
- progressColor: theme.colorScheme.secondary,
- animation: animate,
- isRTL: context.isRtl,
- barRadius: barRadius,
- center: Text(
- intl.NumberFormat.percentPattern().format(withGpsPercent),
- style: TextStyle(
- shadows: isDark ? Constants.embossShadows : null,
- ),
+ child: LinearPercentIndicator(
+ percent: withGpsPercent,
+ lineHeight: lineHeight,
+ backgroundColor: theme.colorScheme.onPrimary.withOpacity(.1),
+ progressColor: theme.colorScheme.secondary,
+ animation: animate,
+ isRTL: context.isRtl,
+ barRadius: barRadius,
+ center: Text(
+ intl.NumberFormat.percentPattern().format(withGpsPercent),
+ style: TextStyle(
+ shadows: isDark ? Constants.embossShadows : null,
),
- padding: EdgeInsets.zero,
),
+ padding: EdgeInsets.symmetric(horizontal: lineHeight),
),
),
// end padding to match leading, so that inside label is aligned with outside label below
- SizedBox(width: lineHeight + 24),
+ const SizedBox(width: 24),
],
),
const SizedBox(height: 8),
diff --git a/pubspec.lock b/pubspec.lock
index ddf65e899..80dca9ac8 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -326,42 +326,42 @@ packages:
name: firebase_core
url: "https://pub.dartlang.org"
source: hosted
- version: "1.15.0"
+ version: "1.16.0"
firebase_core_platform_interface:
dependency: transitive
description:
name: firebase_core_platform_interface
url: "https://pub.dartlang.org"
source: hosted
- version: "4.2.5"
+ version: "4.3.0"
firebase_core_web:
dependency: transitive
description:
name: firebase_core_web
url: "https://pub.dartlang.org"
source: hosted
- version: "1.6.2"
+ version: "1.6.3"
firebase_crashlytics:
dependency: transitive
description:
name: firebase_crashlytics
url: "https://pub.dartlang.org"
source: hosted
- version: "2.6.3"
+ version: "2.7.2"
firebase_crashlytics_platform_interface:
dependency: transitive
description:
name: firebase_crashlytics_platform_interface
url: "https://pub.dartlang.org"
source: hosted
- version: "3.2.4"
+ version: "3.2.5"
flex_color_picker:
dependency: "direct main"
description:
name: flex_color_picker
url: "https://pub.dartlang.org"
source: hosted
- version: "2.4.0"
+ version: "2.5.0"
fluster:
dependency: "direct main"
description:
@@ -489,7 +489,7 @@ packages:
name: google_maps_flutter
url: "https://pub.dartlang.org"
source: hosted
- version: "2.1.3"
+ version: "2.1.4"
google_maps_flutter_platform_interface:
dependency: transitive
description:
@@ -629,7 +629,7 @@ packages:
name: mime
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.1"
+ version: "1.0.2"
motion_sensors:
dependency: transitive
description:
@@ -776,7 +776,7 @@ packages:
name: percent_indicator
url: "https://pub.dartlang.org"
source: hosted
- version: "4.0.0"
+ version: "4.0.1"
permission_handler:
dependency: "direct main"
description:
@@ -895,35 +895,35 @@ packages:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
- version: "3.0.1+1"
+ version: "3.1.0"
screen_brightness:
dependency: "direct main"
description:
name: screen_brightness
url: "https://pub.dartlang.org"
source: hosted
- version: "0.1.4"
+ version: "0.2.0"
screen_brightness_android:
dependency: transitive
description:
name: screen_brightness_android
url: "https://pub.dartlang.org"
source: hosted
- version: "0.0.4"
+ version: "0.1.0"
screen_brightness_ios:
dependency: transitive
description:
name: screen_brightness_ios
url: "https://pub.dartlang.org"
source: hosted
- version: "0.0.5"
+ version: "0.1.0"
screen_brightness_platform_interface:
dependency: transitive
description:
name: screen_brightness_platform_interface
url: "https://pub.dartlang.org"
source: hosted
- version: "0.0.4"
+ version: "0.1.0"
shared_preferences:
dependency: "direct main"
description:
@@ -1161,14 +1161,14 @@ packages:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
- version: "6.0.20"
+ version: "6.1.0"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
url: "https://pub.dartlang.org"
source: hosted
- version: "6.0.15"
+ version: "6.0.16"
url_launcher_ios:
dependency: transitive
description:
@@ -1238,7 +1238,7 @@ packages:
name: web_socket_channel
url: "https://pub.dartlang.org"
source: hosted
- version: "2.1.0"
+ version: "2.2.0"
webdriver:
dependency: transitive
description:
@@ -1252,14 +1252,14 @@ packages:
name: webkit_inspection_protocol
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.0"
+ version: "1.0.1"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.dartlang.org"
source: hosted
- version: "2.5.1"
+ version: "2.5.2"
wkt_parser:
dependency: transitive
description: