Skip to content

Commit 9268675

Browse files
authored
v9.1.1: fixed error handling in import functionality (#162)
1 parent 5a2b88d commit 9268675

File tree

7 files changed

+22
-6
lines changed

7 files changed

+22
-6
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ Many thanks to my sponsors, no matter how much or how little they donated. Spons
1818

1919
# Changelog
2020

21+
## [9.1.1] - 2024/07/16
22+
23+
* Fixed bug where errors within the import functionality would not be catchable by the original invoker
24+
* Minor other improvements
25+
2126
## [9.1.0] - 2024/05/27
2227

2328
* Upgraded to flutter_map v7 to support Flutter 3.22 (also upgraded other dependencies)

example/lib/screens/main/main.dart

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ class _MainScreenState extends State<MainScreen> {
8484
.then(
8585
(_) {
8686
if (cancelTilesPreview) {
87+
if (!mounted) return;
8788
final dp = context.read<DownloadingProvider>();
8889
dp.tilesPreviewStreamSub
8990
?.cancel()

example/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: The example application for 'flutter_map_tile_caching', showcasing
33
it's functionality and use-cases.
44
publish_to: "none"
55

6-
version: 9.1.0
6+
version: 9.1.1
77

88
environment:
99
sdk: ">=3.3.0 <4.0.0"
@@ -18,7 +18,7 @@ dependencies:
1818
file_picker: ^8.0.3
1919
flutter:
2020
sdk: flutter
21-
flutter_map: ^7.0.0
21+
flutter_map: ^7.0.2
2222
flutter_map_animations: ^0.7.0
2323
flutter_map_tile_caching:
2424
google_fonts: ^6.2.1

lib/src/backend/impls/objectbox/backend/internal.dart

+8
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,14 @@ class _ObjectBoxBackendImpl implements FMTCObjectBoxBackendInternal {
601601
listener.cancel();
602602
}
603603
},
604+
onError: (err, stackTrace) {
605+
if (!storesToStates.isCompleted) {
606+
storesToStates.completeError(err, stackTrace);
607+
}
608+
if (!complete.isCompleted) {
609+
complete.completeError(err, stackTrace);
610+
}
611+
},
604612
cancelOnError: true,
605613
);
606614

lib/src/root/recovery.dart

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright © Luka S (JaffaKetchup) under GPL-v3
22
// A full license can be found at .\LICENSE
33

4+
// ignore_for_file: use_late_for_private_fields_and_variables
5+
46
part of '../../flutter_map_tile_caching.dart';
57

68
/// Manages the download recovery of all sub-stores of this [FMTCRoot]

pubspec.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: flutter_map_tile_caching
22
description: Plugin for 'flutter_map' providing advanced caching functionality,
33
with ability to download map regions for offline use.
4-
version: 9.1.0
4+
version: 9.1.1
55

66
repository: https://github.com/JaffaKetchup/flutter_map_tile_caching
77
issue_tracker: https://github.com/JaffaKetchup/flutter_map_tile_caching/issues
@@ -43,9 +43,9 @@ dependencies:
4343
path_provider: ^2.1.3
4444

4545
dev_dependencies:
46-
build_runner: ^2.4.0
46+
build_runner: ^2.4.11
4747
objectbox_generator: ^4.0.1
48-
test: ^1.25.0
48+
test: ^1.25.8
4949

5050
flutter: null
5151

windowsApplicationInstallerSetup.iss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; Script generated by the Inno Setup Script Wizard
22

33
#define MyAppName "FMTC Demo"
4-
#define MyAppVersion "for 9.1.0"
4+
#define MyAppVersion "for 9.1.1"
55
#define MyAppPublisher "JaffaKetchup Development"
66
#define MyAppURL "https://github.com/JaffaKetchup/flutter_map_tile_caching"
77
#define MyAppSupportURL "https://github.com/JaffaKetchup/flutter_map_tile_caching/issues"

0 commit comments

Comments
 (0)