Coder Social home page Coder Social logo

repository's People

Contributors

jpnurmi avatar luckv avatar marcelgarus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

repository's Issues

call fetchAll() on InMemoryStorage as first method creates an empty stream

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.

Update API of CacheRepository

The cache repository currently doesn't have allow intuitive use cases because a lot of information is lost if it just provides Streams of Items. 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.

Lack of documentation and working example code on pub is an issue

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.