I want to store the same type of information in different boxes. Example : One box would contain the tweets I liked, and another the tweets I retweeted.
Asked
Active
Viewed 415 times
1 Answers
1
You would need to create two separate stores in different directories. This can be accomplished using the directory parameter of openStore.
_store1 = await openStore(directory: '/retweets');
_store2 = await openStore(directory: '/likedTweets');
Be aware that if you do this, you can't use relations between objects stored in separate stores using the built in relations. Ex: You couldn't have any of your retweeted objects use a relation to any liked tweets.
To bypass that, you could use some unique ID to query the other store exactly like you would with a RDB

Swisscheese
- 571
- 1
- 5
- 21
-
I have no need for relations, so this is perfect. Thanks ! – ouai Sep 26 '21 at 16:32