thebylito / react-native-navigation-bar-color

React Native component to change bottom bar/navigation bar color on Android
MIT License
269 stars 49 forks source link

[TypeError: null is not an object (evaluating 'NavigationBarColor.changeNavigationBarColor')] #55

Closed princefishthrower closed 2 years ago

princefishthrower commented 2 years ago

The import default for this library does not work, I get:

[TypeError: null is not an object (evaluating 'NavigationBarColor.changeNavigationBarColor')]

Does anyone know what I am missing?

As an aside, the typings are off for this function based on both examples in the docs:

await changeNavigationBarColor('#80b3ff');

and

await changeNavigationBarColor('#80b3ff', true);

are both causing issues with TypeScript, since the function signature marks color, light and animated are marked as required.

princefishthrower commented 2 years ago

A ./gradlew clean and reinstall fixed the first error, but the typing errors still remain. I could probably put a pull request together quickly to fix them.