Skip to content

Commit 310f825

Browse files
v7.2.0: Major bug fixes and improvements (JaffaKetchup#111)
* Added `maxStoreLength` config to example app Fixed bugs Improved documentation * Built Example Applications * Improved migrator stability * Built Example Applications * Fixed JaffaKetchup#106 with similar fix to JaffaKetchup#107 Fixed example application bug * Fixed JaffaKetchup#59 (over JaffaKetchup#110), by adding 'watcher' package * Reinforced 5617ca8 to add secondary redundant fix for JaffaKetchup#106 (JaffaKetchup#107) * Reinforced 5617ca8 / 76e732c to add tertiary redundant fix for JaffaKetchup#106 (JaffaKetchup#107) * Built Example Applications * Updated pubspec versioning Updated changelog Improved GitHub Actions workflow * Built Example Applications * Improved general stability and reliability Improved documentation --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Former-commit-id: 8419f998bd251214819c939cf1340e52b4c5cbce [formerly 12256f5] Former-commit-id: 9f5bb84e4e9e3d32cc673fc2704585b4add38c68
1 parent d3e2064 commit 310f825

File tree

23 files changed

+133
-75
lines changed

23 files changed

+133
-75
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ jobs:
55
package-analysis:
66
name: "Analyse Package"
77
runs-on: ubuntu-latest
8+
if: github.event.head_commit.message != 'Built Example Applications'
89
steps:
910
- name: Checkout Repository
1011
uses: actions/checkout@v3
@@ -27,6 +28,7 @@ jobs:
2728
content-analysis:
2829
name: "Analyse Contents"
2930
runs-on: ubuntu-latest
31+
if: github.event.head_commit.message != 'Built Example Applications'
3032
steps:
3133
- name: Checkout Repository
3234
uses: actions/checkout@v3

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ Many thanks to my sponsors, no matter how much or how little they donated. Spons
1313

1414
# Changelog
1515

16+
## [7.2.0] - 2023/03/XX
17+
18+
* Stability improvements
19+
* Starting multiple downloads no longer causes `LateInitializationErrors`
20+
* Migrator storage and memory usage no longer spikes as significantly as previously, thanks to transaction batching
21+
* Opening and processing of stores on initialisation is more robust and less error-prone to filename variations
22+
* Root statistic watching now works on all platforms
23+
* Multiple minor bug fixes and documentation improvements
24+
* Added `maxStoreLength` config to example app
25+
1626
## [7.1.2] - 2023/02/18
1727

1828
* Minor bug fixes

example/currentAppVersion.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.1.2
1+
7.2.0

example/lib/screens/main/pages/map/map_view.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ class _MapPageState extends State<MapPage> {
7676
metadata.data!['validDuration']!,
7777
),
7878
),
79+
maxStoreLength: int.parse(
80+
metadata.data!['maxLength']!,
81+
),
7982
),
8083
)
8184
: NetworkNoRetryTileProvider(),

example/lib/screens/main/pages/settingsAndAbout/settings_and_about.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class _SettingsAndAboutPageState extends State<SettingsAndAboutPage> {
8080
context: context,
8181
applicationName: 'FMTC Demo',
8282
applicationVersion:
83-
'for v7.1.0\n(on ${Platform().operatingSystemFormatted})',
83+
'for v7.2.0\n(on ${Platform().operatingSystemFormatted})',
8484
applicationIcon: Image.asset(
8585
'assets/icons/ProjectIcon.png',
8686
height: 48,

example/lib/screens/main/pages/stores/components/store_tile.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,7 @@ class _StoreTileState extends State<StoreTile> {
177177
setState(
178178
() => _emptyingProgress = true,
179179
);
180-
_store.manage.reset();
181-
180+
await _store.manage.resetAsync();
182181
setState(
183182
() => _emptyingProgress = false,
184183
);

example/lib/screens/main/pages/update/update.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ class _UpdatePageState extends State<UpdatePage> {
5353
} else {
5454
await OpenFile.open(file.absolute.path);
5555
}
56-
57-
exit(0);
5856
}
5957

6058
@override

example/lib/screens/store_editor/components/header.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ AppBar buildHeader({
5858
}
5959

6060
await newStore.manage.createAsync();
61+
6162
await newStore.metadata.addAsync(
6263
key: 'sourceURL',
6364
value: newValues['sourceURL']!,
@@ -66,6 +67,10 @@ AppBar buildHeader({
6667
key: 'validDuration',
6768
value: newValues['validDuration']!,
6869
);
70+
await newStore.metadata.addAsync(
71+
key: 'maxLength',
72+
value: newValues['maxLength']!,
73+
);
6974

7075
if (widget.existingStoreName == null || useNewCacheModeValue) {
7176
await newStore.metadata.addAsync(

example/lib/screens/store_editor/store_editor.dart

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,36 @@ class _StoreEditorPopupState extends State<StoreEditorPopup> {
200200
textInputAction: TextInputAction.done,
201201
),
202202
const SizedBox(height: 5),
203+
TextFormField(
204+
decoration: const InputDecoration(
205+
labelText: 'Maximum Length',
206+
helperText:
207+
'Use 0 days for infinite number of tiles',
208+
suffixText: 'tiles',
209+
prefixIcon: Icon(Icons.disc_full),
210+
isDense: true,
211+
),
212+
validator: (input) {
213+
if (input == null ||
214+
input.isEmpty ||
215+
int.parse(input) < 0) {
216+
return 'Must be 0 or more';
217+
}
218+
return null;
219+
},
220+
onSaved: (input) =>
221+
_newValues['maxLength'] = input!,
222+
autovalidateMode:
223+
AutovalidateMode.onUserInteraction,
224+
keyboardType: TextInputType.number,
225+
inputFormatters: [
226+
FilteringTextInputFormatter.digitsOnly
227+
],
228+
initialValue: metadata.data!.isEmpty
229+
? '20000'
230+
: metadata.data!['maxLength'],
231+
textInputAction: TextInputAction.done,
232+
),
203233
Row(
204234
children: [
205235
const Text('Cache Behaviour:'),

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
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: 7.0.1
6+
version: 7.2.0
77

88
environment:
99
sdk: ">=2.18.0 <3.0.0"

0 commit comments

Comments
 (0)