rollbar / rollbar-flutter

Rollbar for Dart and Flutter
https://docs.rollbar.com/docs/flutter
MIT License
21 stars 27 forks source link

Automate most of Config to minimize the amount of boilerplate #47

Closed matux closed 2 years ago

matux commented 2 years ago

Currently, we require a robust Config initialization to provide to Rollbar to run.

The null-unsafe nature of this data structure also is forcing us to check for nulls and "force-unwrap" nullable values which is a good way to crash the library.

We could automatically find for the user many of the configuration parameters.

We should also provide appropriate defaults.

By making Config type-safe, non-nullable, and immutable, we're forced to deal with issues like unset settings in our config from the get go, and later when we use it, we can guarantee a well-formed Config instance.

In the end, this will result in the user having to provide a minimal Config for Rollbar to run, ie. just an access token.