FMTC Docs
Project Links💝 Support Me
v9
v9
  • flutter_map_tile_caching
  • ❔Is FMTC Right For Me?
  • 💝Supporters
  • 📃(Proprietary) Licensing
  • 🚀Get Started
    • Quickstart
    • Installation
    • Example Application
    • v8 -> v9 Migration
    • Full API Reference
  • 🌐General
    • Initialisation
    • Backends
    • Error Handling
    • Tips
  • 📂Stores & Roots
    • Introduction
    • Stores
      • Management
      • Statistics
      • Metadata
    • Roots
      • Statistics
      • Recovery
    • flutter_map Integration
  • 📲Bulk Downloading
    • Introduction
    • 1️⃣Create A Region
    • 2️⃣Prepare For Downloading
    • 3️⃣Start Download
    • Control Downloads
    • Testing Tile Server
  • 🗃️External
    • Introduction
    • Exporting
    • Importing
  • flutter_map Docs
Powered by GitBook

© Luka Stillingfleet (JaffaKetchup)

On this page

Was this helpful?

Export as PDF
  1. Stores & Roots
  2. Stores

Metadata

PreviousStatisticsNextRoots

Last updated 1 year ago

Was this helpful?

StoreMetadata, accessed via FMTCStore().metadata, allows access and control over a simple peristent storage mechanism, designed for use with custom data/properties/fields tied to the store (such as a or URL template).

Data is interpreted in key-value pair form, where both the key and value are Strings. Internally, the default backend stores it as a flat JSON structure. The metadata is stored directly on the store: if the store is deleted, it is deleted, and an exported store will retain its metadata. More advanced requirements will require use of a seperate persistance mechanism.

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.

final md = FMTCStore('storeName').metadata;

await md.read; // Retrieve (all) the stored metadata
await md.set(); // Set a single key-value pair (overwriting any existing value for the key)
await md.setBulk(); // Set multiple key-value pairs (overwriting any existing value for each key)
await md.remove(); // Remove the specified key (and corresponding value)
await md.reset(); // Remove all keys (and values)

📂
StoreMetadata class - flutter_map_tile_caching library - Dart API
Logo
CacheBehavior