FLUTTER FOR MOBILE AND WEB

plugfox_localstorage

Description

Simple cross-platform universal String Key-Value local storage, works on mobile and the web.
Has RAM caching. Great for small short values.

Example usage:

import 'package:plugfox_localstorage/localstorage.dart'

Future<void> main() async {
    // Create an instance of the object (singleton)
    final LocalStorage storage = LocalStorage();
    // Wait for initialization
    await storage.init();
    
    // Set value
    storage['sampleKey'] = 'sampleValue';
    // Get value
    print(storage['sampleKey']); // 'sampleValue'
    
    // (optional) Close the storage - not necessary
    await storage.close();
}
Flutter logo

Libraries

baseStorageDriver
browserStorageDriver
mobileStorageDriver
plugfox_localstorage
stubStorageDriver