FMTC Docs
Project Links💝 Support Me
v10
v10
  • flutter_map_tile_caching
  • ❔Is FMTC Right For Me?
  • 💝Supporters
  • 📃(Proprietary) Licensing
  • Full API Reference
  • 🚀Get Started
    • Quickstart
    • Installation
    • Example Application
    • v9 -> v10 Migration
  • Usage
    • Initialisation
    • Root & Stores
      • Root
      • Stores
    • Integrating With A Map
    • Bulk Downloading
      • Recovery
      • Testing Tile Server
    • Import/Export
      • Exporting
      • Importing
  • flutter_map Docs
Powered by GitBook

© Luka Stillingfleet (JaffaKetchup)

On this page
  • Install
  • Import

Was this helpful?

Edit on GitHub
Export as PDF
  1. Get Started

Installation

PreviousQuickstartNextExample Application

Last updated 3 months ago

Was this helpful?

FMTC is licensed under GPL-v3.

If you're developing an application that isn't licensed under GPL, this affects you and your application's legal right to distribution. For more information, please see (Proprietary) Licensing.

Looking to start using FMTC in your project? Check out the Quickstart guide!

Install

For the latest stable release, depend on the package as you normally would by adding it to your pubspec.yaml manually or using:

flutter pub add flutter_map_tile_caching

To depend on potentially unstable commits from a branch (the commits on main usually represent stable releases), for development or testing, follow from pub.dev, then add the following lines to your pubspec.yaml file under the dependencies_override section:

pubspec.yaml
dependency_overrides:
    flutter_map_tile_caching:
        git:
            url: https://github.com/JaffaKetchup/flutter_map_tile_caching.git
            # ref: a commit hash, branch name, or tag (otherwise defaults to master)

Then, depending on the platforms you are developing for, you may need to follow ObjectBox's installation instructions for your platform (which can be found originally , under the Flutter tab):

Try building the app - it might just work, especially if you are using other plugins in your app!

If it does not build successfully

If the error message seems to indicate that the "Android NDK" version needs to be higher, follow the instructions.

Usually this involves the following change to your app-level build.gradle(.kts) config:

android/app/build.gradle(.kts)
android {
    namespace = "*"
    compileSdk = flutter.compileSdkVersion
-   ndkVersion = flutter.ndkVersion
+   ndkVersion = <the version specified at the end of the error log>

    ...
}

macOS apps may need to target macOS 10.15. In your Podfile, change the platform and in the Runner.xcodeproj/project.pbxproj file, update MACOSX_DEPLOYMENT_TARGET.


To enable your app to run in sandboxed mode (which is a requirement for most applications), you'll need to specify an application group. Follow these instructions:

  1. Check all macos/Runner/*.entitlements files contain a section with the group ID

  2. If necessary, change the string value to the DEVELOPMENT_TEAM you can find in your Xcode settings, plus an application-specific suffix. Due to macOS restrictions the complete string must be 19 characters or shorter. For example:

    macos/Runner/*.entitlements
    <dict>
      <key>com.apple.security.application-groups</key>
      <array>
        <string>FGDTDLOBXDJ.demo</string>
      </array>  
    ...  
    </dict>
  3. When , make sure to pass this string to the macosApplicationGroup argument

Although FMTC will compile on the web, the default FMTC does not support the web platform. FMTCObjectBoxBackend.initialise and .uninitialise will throw UnsupportedErrors if invoked on the web. Other methods will throw RootUnavailable as normal.

Import

After installing the package, import it into the necessary files in your project:

import 'package:flutter_map_tile_caching/flutter_map_tile_caching.dart';
🚀
here
initialising FMTC
backend