-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add reset brightness #17
base: master
Are you sure you want to change the base?
Conversation
case "isKeptOn": | ||
int flags = _registrar.activity().getWindow().getAttributes().flags; | ||
result.success((flags & WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) != 0) ; | ||
break; | ||
case "keepOn": | ||
Boolean on = call.argument("on"); | ||
Boolean on = call.argument("on"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That space probably shouldn't be there.
@@ -9,4 +9,5 @@ class Screen { | |||
static Future setBrightness(double brightness) =>_channel.invokeMethod('setBrightness',{"brightness" : brightness}); | |||
static Future<bool> get isKeptOn async => (await _channel.invokeMethod('isKeptOn')) as bool; | |||
static Future keepOn(bool on) => _channel.invokeMethod('keepOn', {"on" : on}); | |||
static Future resetBrightness() => _channel.invokeMethod('resetBrightness'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if a different name would be appropriate. The brightness isn't really "reset", it's more like, the brightness override is removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you suggest me an appropriate name? @pikaju
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disableBrightnessOverride?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clovisnicolas please review my PR and merge
@@ -9,4 +9,5 @@ class Screen { | |||
static Future setBrightness(double brightness) =>_channel.invokeMethod('setBrightness',{"brightness" : brightness}); | |||
static Future<bool> get isKeptOn async => (await _channel.invokeMethod('isKeptOn')) as bool; | |||
static Future keepOn(bool on) => _channel.invokeMethod('keepOn', {"on" : on}); | |||
static Future resetBrightness() => _channel.invokeMethod('resetBrightness'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you suggest me an appropriate name? @pikaju
This reverts commit e3b2dd5
@singlakaran isn't it missing the iOS implementation for resetBrightness ? I've got |
@benoitskipr yes i know. i dont have mac |
@benoitskipr please use this pakage |
reset brightness
@ened @clovisnicolas @matejm @IKStreamIvo please review and merge