Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [0.0.3] - May 4th, 2018
* Port to Dart 2.0

## [0.0.2] - January 23rd, 2018.

* Update description
Expand Down
4 changes: 2 additions & 2 deletions lib/screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'package:flutter/services.dart';
class Screen {
static const MethodChannel _channel = const MethodChannel('github.com/clovisnicolas/flutter_screen');

static Future<double> get brightness => _channel.invokeMethod('brightness');
static Future<double> get brightness async => (await _channel.invokeMethod('brightness')) as double;
static Future setBrightness(double brightness) =>_channel.invokeMethod('setBrightness',{"brightness" : brightness});
static Future<bool> get isKeptOn => _channel.invokeMethod('isKeptOn');
static Future<bool> get isKeptOn async => (await _channel.invokeMethod('isKeptOn')) as bool;
static Future keepOn(bool on) => _channel.invokeMethod('keepOn', {"on" : on});
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: screen
description: A Flutter plugin to manage the device's screen on Android and iOS.
version: 0.0.2
version: 0.0.3
author: Clovis Nicolas <[email protected]>
homepage: https://github.com/clovisnicolas/flutter_screen

Expand Down