How to create an ObjectStore with compond key in IndexedDB with Dart How to create an ObjectStore with compond key in IndexedDB with Dart dart dart

How to create an ObjectStore with compond key in IndexedDB with Dart


You can try this(Works like in JavaScript https://gist.github.com/nolanlawson/8330172)

idb.ObjectStore objectStore = db.createObjectStore('persons', keyPath: 'name');...    var persons = [                   {'name': ['complex', 'key']},                   {'name': ['very complex', 'key', 1]},                   {'name': ['very complex', 'key', 2]},                   {'name': ['very complex', 'key', 3]},                   {'name': ['very complex', 'key', 'foo']}                   ];...objectStore.add(person).then((value) { ...