Skip to content

Commit

Permalink
Merge pull request #3 from matejm/master
Browse files Browse the repository at this point in the history
Port package to Dart 2.0, Close #2
  • Loading branch information
clovisnicolas authored May 4, 2018
2 parents 87a95a6 + 4022d56 commit bdff9db
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
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

0 comments on commit bdff9db

Please sign in to comment.