Skip to content

Commit

Permalink
add reset support
Browse files Browse the repository at this point in the history
  • Loading branch information
LaelLuo committed Jun 9, 2020
1 parent 1db79f1 commit 1ea0f39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ios/Classes/ScreenPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
NSNumber *b = call.arguments[@"on"];
[[UIApplication sharedApplication] setIdleTimerDisabled:b.boolValue];
}
else if ([@"resetBrightness" isEqualToString:call.method]) {
[[UIScreen mainScreen] setBrightness:nil];
result(nil);
}
else {
result(FlutterMethodNotImplemented);
}
Expand Down

0 comments on commit 1ea0f39

Please sign in to comment.