Skip to content

Commit

Permalink
remove mbtiles tile provider + sqflite dependency (#787)
Browse files Browse the repository at this point in the history
* remove mbtiles and sqlflite dependency

* remove mbtiles tile provider + sqflite dependency

fixes #786

* remove example/test/widget_test
  • Loading branch information
johnpryan committed Dec 4, 2020
1 parent d6d94aa commit c63e93a
Show file tree
Hide file tree
Showing 13 changed files with 86 additions and 200 deletions.
Binary file removed example/assets/berlin.mbtiles
Binary file not shown.
1 change: 1 addition & 0 deletions example/ios/Flutter/Debug.xcconfig
@@ -1 +1,2 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
1 change: 1 addition & 0 deletions example/ios/Flutter/Release.xcconfig
@@ -1 +1,2 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
41 changes: 41 additions & 0 deletions example/ios/Podfile
@@ -0,0 +1,41 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
43 changes: 43 additions & 0 deletions example/ios/Podfile.lock
@@ -0,0 +1,43 @@
PODS:
- Flutter (1.0.0)
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- location (0.0.1):
- Flutter
- path_provider (0.0.1):
- Flutter
- sqflite (0.0.2):
- Flutter
- FMDB (>= 2.7.5)

DEPENDENCIES:
- Flutter (from `Flutter`)
- location (from `.symlinks/plugins/location/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)

SPEC REPOS:
trunk:
- FMDB

EXTERNAL SOURCES:
Flutter:
:path: Flutter
location:
:path: ".symlinks/plugins/location/ios"
path_provider:
:path: ".symlinks/plugins/path_provider/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"

SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
location: 3a2eed4dd2fab25e7b7baf2a9efefe82b512d740
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904

PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c

COCOAPODS: 1.10.0
2 changes: 0 additions & 2 deletions example/lib/main.dart
Expand Up @@ -10,7 +10,6 @@ import './pages/map_controller.dart';
import './pages/marker_anchor.dart';
import './pages/moving_markers.dart';
import './pages/offline_map.dart';
import './pages/offline_mbtiles_map.dart';
import './pages/on_tap.dart';
import './pages/overlay_image.dart';
import './pages/plugin_api.dart';
Expand Down Expand Up @@ -48,7 +47,6 @@ class MyApp extends StatelessWidget {
PluginScaleBar.route: (context) => PluginScaleBar(),
PluginZoomButtons.route: (context) => PluginZoomButtons(),
OfflineMapPage.route: (context) => OfflineMapPage(),
OfflineMBTilesMapPage.route: (context) => OfflineMBTilesMapPage(),
OnTapPage.route: (context) => OnTapPage(),
MovingMarkersPage.route: (context) => MovingMarkersPage(),
CirclePage.route: (context) => CirclePage(),
Expand Down
53 changes: 0 additions & 53 deletions example/lib/pages/offline_mbtiles_map.dart

This file was deleted.

7 changes: 0 additions & 7 deletions example/lib/widgets/drawer.dart
Expand Up @@ -10,7 +10,6 @@ import '../pages/map_controller.dart';
import '../pages/marker_anchor.dart';
import '../pages/moving_markers.dart';
import '../pages/offline_map.dart';
import '../pages/offline_mbtiles_map.dart';
import '../pages/on_tap.dart';
import '../pages/overlay_image.dart';
import '../pages/plugin_api.dart';
Expand Down Expand Up @@ -127,12 +126,6 @@ Drawer buildDrawer(BuildContext context, String currentRoute) {
OfflineMapPage.route,
currentRoute,
),
_buildMenuItem(
context,
const Text('Offline Map (using MBTiles)'),
OfflineMBTilesMapPage.route,
currentRoute,
),
_buildMenuItem(
context,
const Text('OnTap'),
Expand Down
1 change: 0 additions & 1 deletion example/pubspec.yaml
Expand Up @@ -19,7 +19,6 @@ dev_dependencies:
flutter:
uses-material-design: true
assets:
- assets/berlin.mbtiles
- assets/map/anholt_osmbright/12/2177/
- assets/map/anholt_osmbright/12/2178/
- assets/map/anholt_osmbright/12/2179/
Expand Down
1 change: 0 additions & 1 deletion lib/flutter_map.dart
Expand Up @@ -22,7 +22,6 @@ export 'package:flutter_map/src/layer/overlay_image_layer.dart';
export 'package:flutter_map/src/layer/polygon_layer.dart';
export 'package:flutter_map/src/layer/polyline_layer.dart';
export 'package:flutter_map/src/layer/tile_layer.dart';
export 'package:flutter_map/src/layer/tile_provider/mbtiles_image_provider.dart';
export 'package:flutter_map/src/layer/tile_provider/tile_provider.dart';
export 'package:flutter_map/src/plugins/plugin.dart';

Expand Down
133 changes: 0 additions & 133 deletions lib/src/layer/tile_provider/mbtiles_image_provider.dart

This file was deleted.

2 changes: 0 additions & 2 deletions lib/src/layer/tile_provider/tile_provider.dart
Expand Up @@ -6,8 +6,6 @@ import 'package:flutter_image/network.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:flutter_map/src/core/util.dart' as util;

export 'package:flutter_map/src/layer/tile_provider/mbtiles_image_provider.dart';

abstract class TileProvider {
const TileProvider();

Expand Down
1 change: 0 additions & 1 deletion pubspec.yaml
Expand Up @@ -19,7 +19,6 @@ dependencies:
async: ^2.1.0
flutter_image: ^3.0.0
cached_network_image: ^2.0.0
sqflite: ^1.1.5
path_provider: ^1.6.7
vector_math: ^2.0.0
proj4dart: ^1.0.4
Expand Down

0 comments on commit c63e93a

Please sign in to comment.