Skip to content

Commit

Permalink
fix package to work with dart 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
matejm committed May 4, 2018
1 parent 87a95a6 commit a23fb9f
Showing 1 changed file with 2 additions and 2 deletions.
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});
}

0 comments on commit a23fb9f

Please sign in to comment.