Masterarbeit Richard Stern. Flutter App, sich mit einem Bluetooth-Gerät verbindet und Berührungen auf einem Sensor visualisiert.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 795B

1234567891011121314151617181920212223242526272829
  1. # Screen
  2. [![pub package](https://img.shields.io/pub/v/screen.svg)](https://pub.dartlang.org/packages/screen)
  3. A Flutter plugin to manage the device's screen on Android and iOS.
  4. ## Usage
  5. To use this plugin, add `screen` as a [dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/).
  6. Make sure you add the following permissions to your Android Manifest
  7. ```
  8. <uses-permission android:name="android.permission.WAKE_LOCK" />
  9. ```
  10. ## Example
  11. ``` dart
  12. // Import package
  13. import 'package:screen/screen.dart';
  14. // Get the current brightness:
  15. double brightness = await Screen.brightness;
  16. // Set the brightness:
  17. Screen.setBrightness(0.5);
  18. // Check if the screen is kept on:
  19. bool isKeptOn = await Screen.isKeptOn;
  20. // Prevent screen from going into sleep mode:
  21. Screen.keepOn(true);
  22. ```