FMTC Docs
Project Links💝 Support Me
v8
v8
  • flutter_map_tile_caching
  • Is FMTC Right For Me?
  • Get Started
    • Quickstart
    • Installation
    • Additional Setup
    • Example Application
  • Usage
    • Initialisation
    • Using Roots & Stores
      • Management
      • Statistics
      • Metadata
      • Recovery
      • Migrator (v6 -> v7)
    • flutter_map Integration
    • Global Settings
    • Full API Reference
  • Bulk Downloading
    • Introduction
    • 1️⃣Create A Region
    • 2️⃣Prepare For Downloading
    • 3️⃣Start In Foreground
      • Buffering
      • 4️⃣Listen For Progress
    • 3️⃣Start In Background
      • Limitations
    • Cancel Download
  • Import & Export
    • Introduction
    • Importing
    • Exporting
  • Migration
    • v7 -> v8 Migration
    • v6 -> v7 Migration
  • Known Issues
  • Credits
  • flutter_map Docs
Powered by GitBook

© Luka Stillingfleet (JaffaKetchup)

On this page
  • Add
  • Read
  • Remove
  • Reset

Was this helpful?

Export as PDF
  1. Usage
  2. Using Roots & Stores

Metadata

Applies only to Stores

FlutterMapTileCaching.instance('storeName').metadata;

This library provides a very simple persistent key-value pair storage system, designed to store any custom information about the store. These are stored alongside tiles in the tile database.

For example, your application may use one store per urlTemplate, in which case, the URL can be stored in the metadata.

Remember that metadata does not have any effect on internal logic: it is simply an auxiliary method of storing any data that might need to be kept alongside a store.

Both asynchronous and synchronous versions of the below methods are available.

Add

Add a new key-value pair to the store. For example:

    add(
        key: String,
        value: String,
    );

Read

Read all the key-value pairs from the store, and return them in a Map<String, String>. For example:

    read; // This is a getter

Remove

Remove a key-value pair from the store. For example:

    remove(key: String);

Reset

Remove all the key-value pairs from the store. For example:

    reset();
PreviousStatisticsNextRecovery

Last updated 2 years ago

Was this helpful?