Installation
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_cachingTo 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:
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 here, under the Flutter tab):
Try building the app - it might just work, especially if you are using other plugins in your app!
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:
Check all
macos/Runner/*.entitlementsfiles contain a section with the group IDIf necessary, change the string value to the
DEVELOPMENT_TEAMyou 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:<dict> <key>com.apple.security.application-groups</key> <array> <string>FGDTDLOBXDJ.demo</string> </array> ... </dict>When initialising FMTC, make sure to pass this string to the
macosApplicationGroupargument
Although FMTC will compile on the web, the default FMTC backend 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';Last updated
Was this helpful?