rodydavis / dart_firebase

Dart Firebase for Flutter
MIT License
4 stars 1 forks source link

Dart Firebase: allow injecting custom HttpClient implementation #1

Open pulyaevskiy opened 5 years ago

pulyaevskiy commented 5 years ago

Thanks for this library!

I see that this library is trying to be smart and figure out which platform it runs on based on import ... if feature.

What I think would be useful is to make this lib independent of any specific IO implementation and allow users to choose which IO they would like to use.

Use case I'm thinking of - is to use this same lib to run Dart apps using Node.js. I have created node_http (along with node_interop and node_io) which implements HTTP client using Node.js.

If I was able to supply my custom HttpClient to this library it'd "just work".

Overall I think this effort, being an early stage project, has a potential to provide unified Firebase API for all platforms supported by Dart. People have expressed interest in this since it would help sharing a lot of code across all platforms.

rodydavis commented 5 years ago

absolutely! have any ideas for a PR?

pulyaevskiy commented 5 years ago

Sure, I can make a PR with a proposal and we can discuss details if this works for you.

rodydavis commented 5 years ago

Absolutely!