Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
10 changes: 5 additions & 5 deletions example/lib/flutter_map_cache/cache_store_types.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import 'dart:io';

import 'package:dio_cache_interceptor/dio_cache_interceptor.dart';
import 'package:dio_cache_interceptor_db_store/dio_cache_interceptor_db_store.dart';
import 'package:dio_cache_interceptor_file_store/dio_cache_interceptor_file_store.dart';
import 'package:dio_cache_interceptor_hive_store/dio_cache_interceptor_hive_store.dart';
import 'package:flutter/material.dart';
import 'package:http_cache_drift_store/http_cache_drift_store.dart';
import 'package:http_cache_file_store/http_cache_file_store.dart';
import 'package:http_cache_hive_store/http_cache_hive_store.dart';

enum CacheStoreTypes {
memCache('MemCache'),
Expand All @@ -18,7 +18,7 @@ enum CacheStoreTypes {

CacheStore getCacheStore(String path) => switch (this) {
CacheStoreTypes.memCache => MemCacheStore(),
CacheStoreTypes.dbCache => DbCacheStore(
CacheStoreTypes.dbCache => DriftCacheStore(
databasePath: path,
databaseName: 'DbCacheStore',
),
Expand All @@ -33,7 +33,7 @@ enum CacheStoreTypes {

CacheStore getCacheStoreWeb() => switch (this) {
CacheStoreTypes.memCache => MemCacheStore(),
CacheStoreTypes.dbCache => DbCacheStore(
CacheStoreTypes.dbCache => DriftCacheStore(
databasePath: '', // ignored on web
databaseName: 'DbCacheStore',
),
Expand Down
8 changes: 4 additions & 4 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ dependencies:
connectivity_plus: ^6.0.0
path_provider: ^2.0.15
dio: ^5.2.0+1
dio_cache_interceptor: ^3.4.2
dio_cache_interceptor_db_store: ^6.0.0
dio_cache_interceptor_file_store: ^1.2.2
dio_cache_interceptor_hive_store: ^4.0.0
dio_cache_interceptor: ^4.0.0
http_cache_drift_store: ^7.0.0
http_cache_file_store: ^2.0.0
http_cache_hive_store: ^5.0.0
sqlite3_flutter_libs: ^0.5.15
# vector_map_tiles: ^8.0.0
# vector_tile_renderer: ^6.0.0
Expand Down
11 changes: 6 additions & 5 deletions flutter_map_cache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,21 @@ dependencies:
path_provider: ^2.1.2 # in case the storage backend requires a path

# drift
dio_cache_interceptor_db_store: ^5.1.0
http_cache_drift_store: ^7.0.0
sqlite3_flutter_libs: ^0.5.15

# file system
dio_cache_interceptor_file_store: ^1.2.2
http_cache_file_store: ^2.0.0

# hive
dio_cache_interceptor_hive_store: ^3.2.1
http_cache_hive_store: ^5.0.0

# objectbox
dio_cache_interceptor_objectbox_store: ^1.1.3
http_cache_objectbox_store: ^2.0.0
objectbox_flutter_libs: ^1.4.1

# isar
http_cache_isar_store: ^2.0.0
isar: ^3.1.0+1
isar_flutter_libs: ^3.1.0+1
```
Expand Down Expand Up @@ -181,7 +182,7 @@ class MyMap extends StatelessWidget {
import 'dart:io';

import 'package:dio_cache_interceptor/dio_cache_interceptor.dart';
import 'package:dio_cache_interceptor_file_store/dio_cache_interceptor_file_store.dart';
import 'package:http_cache_file_store/http_cache_file_store.dart';
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:flutter_map_cache/flutter_map_cache.dart';
Expand Down
4 changes: 2 additions & 2 deletions flutter_map_cache/lib/src/cached_tile_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CachedTileProvider extends TileProvider {
List<Interceptor>? interceptors,
Duration? maxStale,
CacheKeyBuilder? keyBuilder,
List<int>? hitCacheOnErrorExcept = defaultHitCacheOnErrorExcept,
List<int> hitCacheOnErrorCodes = defaultHitCacheOnErrorExcept,
}) : dio = dio ?? Dio(dioOptions ?? BaseOptions()) {
this.dio.interceptors.addAll([
...?interceptors,
Expand All @@ -47,7 +47,7 @@ class CachedTileProvider extends TileProvider {
policy: cachePolicy,
maxStale: maxStale,
keyBuilder: keyBuilder ?? CacheOptions.defaultCacheKeyBuilder,
hitCacheOnErrorExcept: hitCacheOnErrorExcept,
hitCacheOnErrorCodes: hitCacheOnErrorCodes,
),
),
]);
Expand Down
4 changes: 2 additions & 2 deletions flutter_map_cache/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_map_cache
description: A slim yet powerful caching plugin for flutter_map tile layers.
version: 1.5.2
version: 1.5.3
repository: https://github.com/josxha/flutter_map_plugins
issue_tracker: https://github.com/josxha/flutter_map_plugins/issues
resolution: workspace
Expand All @@ -20,7 +20,7 @@ environment:

dependencies:
dio: ^5.2.0+1
dio_cache_interceptor: ^3.4.2
dio_cache_interceptor: ^4.0.0
flutter:
sdk: flutter
flutter_map: ">=6.0.0 <9.0.0"
Expand Down