Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Many thanks to my sponsors, no matter how much or how little they donated. Spons

# Changelog

## [10.1.2] - 2025/11/17

* Upgraded ObjectBox dependencies to permit v5.0.0 - fixes [issue #194](https://github.com/JaffaKetchup/flutter_map_tile_caching/issues/194)

## [10.1.1] - 2025/02/03

* Fixed bug where import operation fatally crashed on some iOS devices
Expand Down
21 changes: 15 additions & 6 deletions example/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,29 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "3e493a3e4d0a5c99fa7da51faae354e95a9a1abe"
channel: "beta"
revision: "b45fa18946ecc2d9b4009952c636ba7e2ffbb787"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 3e493a3e4d0a5c99fa7da51faae354e95a9a1abe
base_revision: 3e493a3e4d0a5c99fa7da51faae354e95a9a1abe
create_revision: b45fa18946ecc2d9b4009952c636ba7e2ffbb787
base_revision: b45fa18946ecc2d9b4009952c636ba7e2ffbb787
- platform: android
create_revision: 3e493a3e4d0a5c99fa7da51faae354e95a9a1abe
base_revision: 3e493a3e4d0a5c99fa7da51faae354e95a9a1abe
create_revision: b45fa18946ecc2d9b4009952c636ba7e2ffbb787
base_revision: b45fa18946ecc2d9b4009952c636ba7e2ffbb787
- platform: ios
create_revision: b45fa18946ecc2d9b4009952c636ba7e2ffbb787
base_revision: b45fa18946ecc2d9b4009952c636ba7e2ffbb787
- platform: web
create_revision: b45fa18946ecc2d9b4009952c636ba7e2ffbb787
base_revision: b45fa18946ecc2d9b4009952c636ba7e2ffbb787
- platform: windows
create_revision: b45fa18946ecc2d9b4009952c636ba7e2ffbb787
base_revision: b45fa18946ecc2d9b4009952c636ba7e2ffbb787

# User provided section

Expand Down
1 change: 1 addition & 0 deletions example/android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ gradle-wrapper.jar
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
.cxx/

# Remember to never publicly share your keystore.
# See https://flutter.dev/to/reference-keystore
Expand Down
9 changes: 4 additions & 5 deletions example/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ plugins {
android {
namespace = "dev.jaffaketchup.fmtc.demo"
compileSdk = flutter.compileSdkVersion
// ndkVersion = flutter.ndkVersion
ndkVersion = "27.0.12077973"
ndkVersion = flutter.ndkVersion

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
jvmTarget = JavaVersion.VERSION_17.toString()
}

defaultConfig {
Expand Down
5 changes: 4 additions & 1 deletion example/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ allprojects {
}
}

val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
val newBuildDir: Directory =
rootProject.layout.buildDirectory
.dir("../../build")
.get()
rootProject.layout.buildDirectory.value(newBuildDir)

subprojects {
Expand Down
1 change: 0 additions & 1 deletion example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
19 changes: 10 additions & 9 deletions example/android/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
pluginManagement {
val flutterSdkPath = run {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
flutterSdkPath
}
val flutterSdkPath =
run {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
flutterSdkPath
}

includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

Expand All @@ -18,8 +19,8 @@ pluginManagement {

plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.7.0" apply false
id("org.jetbrains.kotlin.android") version "1.8.22" apply false
id("com.android.application") version "8.11.1" apply false
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
}

include(":app")
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ class RecoveryRegions extends StatelessWidget {
borderColor: e.key.toColor(),
borderStrokeWidth: 2,
label: region.label,
labelPlacement: PolygonLabelPlacement.polylabel,
labelPlacementCalculator:
const PolygonLabelPlacementCalculator
.polylabel(),
),
),
)
Expand Down
15 changes: 8 additions & 7 deletions example/lib/src/shared/components/url_selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class _UrlSelectorState extends State<UrlSelector> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: DropdownMenu<String?>(
child: DropdownMenu<String>(
controller: _urlTextController,
expandedInsets: EdgeInsets.zero, // full width
requestFocusOnTap: true,
Expand Down Expand Up @@ -132,8 +132,8 @@ class _UrlSelectorState extends State<UrlSelector> {
},
);

void _onSelected(String? v) {
if (v == null) {
void _onSelected(String? val) {
if (val == '' || val == null) {
sharedPrefs.setStringList(
SharedPrefsKeys.customNonStoreUrls.name,
(sharedPrefs.getStringList(SharedPrefsKeys.customNonStoreUrls.name) ??
Expand All @@ -144,15 +144,16 @@ class _UrlSelectorState extends State<UrlSelector> {
_selectableEntriesManualRefreshStream.add(null);
}

widget.onSelected!(v ?? _urlTextController.text);
widget
.onSelected!(val == '' || val == null ? _urlTextController.text : val);
_dropdownMenuFocusNode?.unfocus();
}

List<DropdownMenuEntry<String?>> _constructMenuEntries(
List<DropdownMenuEntry<String>> _constructMenuEntries(
AsyncSnapshot<Map<String, List<String>>> snapshot,
) =>
snapshot.data!.entries
.map<DropdownMenuEntry<String?>>(
.map(
(e) => DropdownMenuEntry(
value: e.key,
label: e.key,
Expand Down Expand Up @@ -189,7 +190,7 @@ class _UrlSelectorState extends State<UrlSelector> {
.toList()
..add(
const DropdownMenuEntry(
value: null,
value: '',
label:
'To use another URL (without using it in a store),\nenter it, '
'then hit enter/done/add',
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: fmtc_demo
description: The demo app for 'flutter_map_tile_caching', showcasing its functionality and use-cases.
publish_to: "none"
version: 10.1.1
version: 10.1.2

environment:
sdk: ">=3.6.0 <4.0.0"
Expand Down
8 changes: 4 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: flutter_map_tile_caching
description: Plugin for 'flutter_map' providing advanced caching functionality,
with ability to download map regions for offline use.
version: 10.1.1
version: 10.1.2

repository: https://github.com/JaffaKetchup/flutter_map_tile_caching
issue_tracker: https://github.com/JaffaKetchup/flutter_map_tile_caching/issues
Expand Down Expand Up @@ -37,14 +37,14 @@ dependencies:
http: ^1.2.2
latlong2: ^0.9.1
meta: ^1.15.0
objectbox: ^4.1.0
objectbox_flutter_libs: ^4.1.0
objectbox: ">=4.1.0 <6.0.0"
objectbox_flutter_libs: ">=4.1.0 <6.0.0"
path: ^1.9.1
path_provider: ^2.1.5

dev_dependencies:
build_runner: ^2.4.15
objectbox_generator: ^4.1.0
objectbox_generator: ">=4.1.0 <6.0.0"
test: ^1.25.15

flutter: null
Expand Down
26 changes: 1 addition & 25 deletions windowsApplicationInstallerSetup.iss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; Script generated by the Inno Setup Script Wizard

#define MyAppName "FMTC Demo"
#define MyAppVersion "for 10.1.1"
#define MyAppVersion "for 10.1.2"
#define MyAppPublisher "JaffaKetchup Development"
#define MyAppURL "https://github.com/JaffaKetchup/flutter_map_tile_caching"
#define MyAppSupportURL "https://github.com/JaffaKetchup/flutter_map_tile_caching/issues"
Expand Down Expand Up @@ -35,30 +35,6 @@ WizardStyle=modern

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "armenian"; MessagesFile: "compiler:Languages\Armenian.isl"
Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
Name: "bulgarian"; MessagesFile: "compiler:Languages\Bulgarian.isl"
Name: "catalan"; MessagesFile: "compiler:Languages\Catalan.isl"
Name: "corsican"; MessagesFile: "compiler:Languages\Corsican.isl"
Name: "czech"; MessagesFile: "compiler:Languages\Czech.isl"
Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl"
Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl"
Name: "finnish"; MessagesFile: "compiler:Languages\Finnish.isl"
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
Name: "hebrew"; MessagesFile: "compiler:Languages\Hebrew.isl"
Name: "icelandic"; MessagesFile: "compiler:Languages\Icelandic.isl"
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl"
Name: "norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl"
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl"
Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl"
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "slovak"; MessagesFile: "compiler:Languages\Slovak.isl"
Name: "slovenian"; MessagesFile: "compiler:Languages\Slovenian.isl"
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl"
Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Expand Down