marcelgarus / repository Goto Github PK
View Code? Open in Web Editor NEWHigh-level data management.
High-level data management.
If I create an InMemoryStorage repository and then I call fetchAll(), fetchAllIds() of fetchAllItems() as first method call, the stream returned is empty and if i try to get the first element i get a pending future that never complete until I call update() or remove() on the repositiory. This is because initially the _allEntriesController BehaviourSubject is empty and only if I call update() or remove() on the repository the BehaviourSubject is not empty.
The solution is simple, put an initial empty map on _allEntriesController.
The cache repository currently doesn't have allow intuitive use cases because a lot of information is lost if it just provides Stream
s of Item
s. I'll therefore update the API so that it's rather a repository of CacheItem<Item>
, where CacheItem
contains the origin (whether the information is from the source or the cache) as well as either data or an error.
I was intrigued by the prospect of a repo library. However, looking through pub pages and the Github repo I found the lack of a few examples, and documentation to be very limiting. It's not that developers can't spend time reading and grokking your code, but who has time to dig that deep when trying to decide if a library is worth using. I suspect your library gets passed over because of this lack of information. Also, if it doesn't already, the library should be able to handle gathering data from two sources easily. Anything above your library shouldn't need to know if the data came from a cache or an API call. The repo should handle this. I think your library would be much more popular if you documented it with good documentation and provided multiple code samples so devs can see how to use it and how it would be helpful without taking the time to dig into the details of how it works. I hope this helps and gives you a little motivation to continue developing this and other Flutter libraries.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.