Contributing to RxDart

Create a new issue

The easiest way to get involved is to create a new issue when you spot a bug, if the documentation is incomplete or out of date, or if you identify an implementation problem.

General coding guidlines

If you‘d like to add a feature or fix a bug, we’re more than happy to accept pull requests! We only ask a few things:

  • Ensure your code contains no analyzer errors, e.g.
    • Code is strong-mode compliant
    • Code is free of lint errors
  • Format your code with dartfmt
  • Write tests for all new code paths, consider using the Stream Matchers available from the test package.
  • Write helpful documentation
  • If you would like to make a bigger / fundamental change to the codebase, please file a lightweight example PR / issue, or contact us in Gitter so we can discuss the issue.

Advice when adding a new factory

  • Extend from Stream so it can be constructed outside the scope of the Observable class
  • Add the new Stream to the exported rx_streams library
  • Ensure the stream properly enforces the single-subscription contract
  • Ensure the stream closses properly
  • Add new tests to tests/rxdart_test.dart

Advice when adding a new operator

  • Extend from the StreamTransformer class so it can be used independently
  • Add the new StreamTransformer to the exported rx_transformers library
  • Ensure the StreamTransformer can be re-used
  • Add new tests to tests/rxdart_test.dart