Dart - kv.set()

Store a key value pair in a key value store.

import 'package:nitric_sdk/nitric.dart';
final profiles = Nitric.kv("profiles").allow([
KeyValueStorePermission.set,
]);
await profiles.set('profile-1a2b3c', { "name": "John Smith" });

Parameters

  • Name
    key
    Type
    String
    Description

    The key that references value.

  • Name
    value
    Type
    Map<String, dynamic>
    Description

    A json serializable object that is stored as the value.

Examples

Set a key value pair

import 'package:nitric_sdk/nitric.dart';
final profiles = Nitric.kv("profiles").allow([
KeyValueStorePermission.set,
]);
await profiles.set('profile-1a2b3c', { "name": "John Smith" });
Last updated on Oct 11, 2024