changeStatusBarColor static method
Implementation
static Future changeStatusBarColor({
required Color color,
bool? adaptiveBrightness,
double? luminaceValue,
bool? animate,
bool? forIos,
bool? forAndroid,
}) async {
bool? isDarkColor;
if (adaptiveBrightness ?? true) {
final double luminance = color.computeLuminance();
isDarkColor = luminance < (luminaceValue ?? 0.4);
}
print("Color value as string : ${color.toString()}");
await _channel.invokeMethod(_CHANGE_STATUS_BAR_COLOR_METHOD, {
'color': color,
'isDarkColor': isDarkColor,
'animate': animate ?? true,
'forIos': forIos ?? true,
'forAndroid': forAndroid ?? true,
});
}