This monorepo hosts Rollbar SDKs for Dart and Flutter. Use the package-level READMEs for usage examples, and follow the guidelines below when contributing.
rollbar_common/: shared Dart core (models, serialization, extensions) used by both SDKs; tests live inrollbar_common/test.rollbar_dart/: pure Dart notifier package with examples inrollbar_dart/exampleand tests inrollbar_dart/test.rollbar_flutter/: Flutter plugin and platform integration; Dart sources inrollbar_flutter/lib, native code inrollbar_flutter/androidandrollbar_flutter/ios, tests inrollbar_flutter/test, and a sample app inrollbar_flutter/example.build_tools/: scripts for linting, tests, builds, and publishing.
./build_tools/check.sh: runs the standard CI-style pipeline across packages (pub get,flutter test,flutter analyze,pana, Gradle checks, and example builds)../build_tools/build.sh -d rollbar_dart test: run a single task in one package (tasks includepub-get,test,analyze,pana,gradle-check,example-android,example-ios)../build_tools/clean.sh:flutter cleanfor all packages.cd rollbar_flutter/example && flutter run: run the Flutter example app locally.
- Dart code follows standard formatting (2-space indent) and analyzer rules from
analysis_options.yamlin each package. - Lints include
prefer_single_quotes,always_declare_return_types, andunawaited_futures(plussort_child_properties_lastinrollbar_dart). - Use Dart naming conventions:
UpperCamelCasefor types,lowerCamelCasefor members,snake_casefor files.
- Tests are organized under each package’s
test/directory and run viaflutter testfrom that package root. - Android unit tests live under
rollbar_flutter/android/src/test. - Add or update tests for new behavior; there is no explicit coverage gate, but regression tests are expected.
- Commit messages are short and imperative; optional type/scope prefixes are common (e.g.,
feat: ...,fix(android): ...,doc: ...). - Before opening a PR, run
./build_tools/check.shand note results in the PR description. - Link relevant issues and describe platform-specific changes (Dart vs. Flutter, Android vs. iOS) clearly.
- Never commit real Rollbar access tokens; use placeholders like
YOUR-ROLLBAR-ACCESSTOKENin examples and tests.