Download the PHP package ruslanshigabutdinov/nativephp-color-scheme without Composer
On this page you can find all versions of the php package ruslanshigabutdinov/nativephp-color-scheme. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ruslanshigabutdinov/nativephp-color-scheme
More information about ruslanshigabutdinov/nativephp-color-scheme
Files in ruslanshigabutdinov/nativephp-color-scheme
Package nativephp-color-scheme
Short Description NativePHP Mobile plugin for reading and controlling the app color scheme.
License MIT
Homepage https://github.com/RuslanShigabutdinov/nativephp-color-scheme
Informations about the package nativephp-color-scheme
NativePHP Color Scheme
Read and control your NativePHP Mobile app's native appearance preference from Laravel.
The plugin supports the common theme flow:
systemlightdark
When the preference is system, the effective color scheme follows the device appearance.
Installation
Register the plugin:
If your app does not have app/Providers/NativeServiceProvider.php yet, publish it first:
Usage
Set the app preference:
auto, device, and os are accepted aliases for system:
Read the full state:
Notes
Android is tested on device. iOS support is implemented, but still needs device/simulator validation.
On Android 12/API 31 and newer, the plugin applies the saved preference with native app night mode, which can help Android splash screens use the matching light or dark resources.
Because this package includes native Kotlin and Swift code, rebuild your NativePHP app after installing or updating it:
If native changes do not appear during development: