garretyoder / Colorful

Android runtime theme library
Apache License 2.0
2.13k stars 193 forks source link

ThemeEditor public apply method needs null check #45

Closed ross-holloway94 closed 3 years ago

ross-holloway94 commented 5 years ago

The Readme states:

The apply method optionally takes a high-order function as a argument. This serves as a callback that will be triggered once Colorful has finished it's theme changes

However, ThemeEditor#apply() infers a @NonNull annotation on both of its arguments. If this is to match the readme, the callback should be optional, and therefore must have a null check before being called.

I believe this will also make things easier for non-Kotlin users to make use of.

Thanks