flutter_keepscreenon 0.1.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 72

flutter_keepscreenon #

pub package

A package can help you to keep the device's screen on programmatically without any permission.

Getting Started #

Installation #

Add this to your pubspec.yaml (or create it):

dependencies:
  flutter_keepscreenon: any

Then run the flutter tooling:

flutter packages get

Example #

try {
  await FlutterKeepscreenon.keepScreenOn(true);
} on PlatformException catch (e) {
  print(e);
}

Details in example/ folder.

CHANGELOG #

[0.1.1]

  • Upgrade kotlin version.

[0.1.0]

  • Add keepScreenOn and mark activateKeepScreenOn and deactivateKeepScreenOn as deprecated.
  • Add docs.

[0.0.3]

  • Upgrade to dart2

[0.0.2+1]

  • Format code

[0.0.2]

  • Update ios platform code

[0.0.1+1]

  • Add license

[0.0.1]

  • Initial release

example/README.md

flutter_keepscreenon_example #

Demonstrates how to use the flutter_keepscreenon plugin.

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_keepscreenon: ^0.1.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_keepscreenon/flutter_keepscreenon.dart';
  
Version Uploaded Documentation Archive
0.1.1 Jan 18, 2019 Go to the documentation of flutter_keepscreenon 0.1.1 Download flutter_keepscreenon 0.1.1 archive
0.1.0 Jan 17, 2019 Go to the documentation of flutter_keepscreenon 0.1.0 Download flutter_keepscreenon 0.1.0 archive
0.0.3 Aug 9, 2018 Go to the documentation of flutter_keepscreenon 0.0.3 Download flutter_keepscreenon 0.0.3 archive
0.0.2+1 Mar 11, 2018 Go to the documentation of flutter_keepscreenon 0.0.2+1 Download flutter_keepscreenon 0.0.2+1 archive
0.0.2 Jan 31, 2018 Go to the documentation of flutter_keepscreenon 0.0.2 Download flutter_keepscreenon 0.0.2 archive
0.0.1+1 Jan 29, 2018 Go to the documentation of flutter_keepscreenon 0.0.1+1 Download flutter_keepscreenon 0.0.1+1 archive
0.0.1 Jan 29, 2018 Go to the documentation of flutter_keepscreenon 0.0.1 Download flutter_keepscreenon 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
48
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
72
Learn more about scoring.

We analyzed this package on Feb 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.13+1
  • Flutter: 1.2.1

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Running dartdoc failed with the following output: DetailedApiRequestError(status: 500, message: Backend Error)

#0      _validateResponse (package:_discoveryapis_commons/src/clients.dart:875:9)
<asynchronous suspension>
#1      ApiRequester.request (package:_discoveryapis_commons/src/clients.dart:69:22)
<asynchronous suspension>
#2      ObjectsResourceApi.insert (package:googleapis/storage/v1.dart:3068:32)
#3      _MediaUploadStreamSink._startNormalUpload (file:///root/.pub-cache/hosted/pub.dartlang.org/gcloud-0.6.0+2/lib/src/storage_impl.dart:601:10)
#4      new _MediaUploadStreamSink (file:///root/.pub-cache/hosted/pub.dartlang.org/gcloud-0.6.0+2/lib/src/storage_impl.dart:515:9)
#5      _BucketImpl.write (file:///root/.pub-cache/hosted/pub.dartlang.org/gcloud-0.6.0+2/lib/src/storage_impl.dart:179:20)
#6      uploadWithRetry.<anonymous closure> (package:pub_dartlang_org/shared/storage.dart:49:27)
<asynchronous suspension>
#7      retryAsync (package:pub_dartlang_org/shared/utils.dart:432:24)
<asynchronous suspension>
#8      uploadWithRetry (package:pub_dartlang_org/shared/storage.dart:47:9)
<asynchronous suspension>
#9      DartdocBackend.uploadDir.upload (package:pub_dartlang_org/dartdoc/backend.dart:129:13)
<asynchronous suspension>
#10     DartdocBackend.uploadDir.<anonymous closure> (package:pub_dartlang_org/dartdoc/backend.dart:141:64)
#11     Pool.withResource (package:pool/pool.dart:127:28)
<asynchronous suspension>
#12     DartdocBackend.uploadDir (package:pub_dartlang_org/dartdoc/backend.dart:141:39)
<asynchronous suspension>
#13     DartdocJobProcessor.process (package:pub_dartlang_org/dartdoc/dartdoc_runner.dart:211:30)
<asynchronous suspension>
#14     JobProcessor.run (package:pub_dartlang_org/job/job.dart:55:28)
<asynchronous suspension>
#15     JobMaintenance.run (package:pub_dartlang_org/job/job.dart:95:18)
#16     _workerMain.<anonymous closure> (file:///project/app/bin/service/dartdoc.dart:81:26)
#17     _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#18     StackZoneSpecification._registerUnaryCallback.<anonymous closure>.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:26)
#19     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#20     StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:14)
#21     _rootRunUnary (dart:async/zone.dart:1132:38)
#22     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#23     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#24     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#25     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#26     Future._complete (dart:async/future_impl.dart:473:7)
#27     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#28     _AsyncAwaitCompleter.complete (dart:async/runtime/libasync_patch.dart:28:18)
#29     _completeOnAsyncReturn (dart:async/runtime/libasync_patch.dart:294:13)
#30     DartdocJobProcessor.generateDocsForSdk (package:pub_dartlang_org/dartdoc/dartdoc_runner.dart)
#31     _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#32     StackZoneSpecification._registerUnaryCallback.<anonymous closure>.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:26)
#33     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#34     StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:14)
#35     _rootRunUnary (dart:async/zone.dart:1132:38)
#36     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#37     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#38     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#39     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#40     Future._complete (dart:async/future_impl.dart:473:7)
#41     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#42     _AsyncAwaitCompleter.complete (dart:async/runtime/libasync_patch.dart:28:18)
#43     _completeOnAsyncReturn (dart:async/runtime/libasync_patch.dart:294:13)
#44     VersionedJsonStorage.hasCurrentData (package:pub_dartlang_org/shared/storage.dart)
#45     _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#46     StackZoneSpecification._registerUnaryCallback.<anonymous closure>.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:26)
#47     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#48     StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:14)
#49     _rootRunUnary (dart:async/zone.dart:1132:38)
#50     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#51     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#52     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#53     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#54     Future._complete (dart:async/future_impl.dart:473:7)
#55     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#56     _AsyncAwaitCompleter.complete (dart:async/runtime/libasync_patch.dart:28:18)
#57     _completeOnAsyncReturn (dart:async/runtime/libasync_patch.dart:294:13)
#58     ApiRequester.request (package:_discoveryapis_commons/src/clients.dart)
#59     _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#60     StackZoneSpecification._registerUnaryCallback.<anonymous closure>.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:26)
#61     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#62     StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:14)
#63     _rootRunUnary (dart:async/zone.dart:1132:38)
#64     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#65     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#66     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#67     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#68     Future._complete (dart:async/future_impl.dart:473:7)
#69     Stream.join.<anonymous closure> (dart:async/stream.dart:762:14)
#70     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#71     StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119:48)
#72     _rootRun (dart:async/zone.dart:1120:38)
#73     _CustomZone.run (dart:async/zone.dart:1021:19)
#74     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#75     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:389:13)
#76     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399:15)
#77     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:283:7)
#78     _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:96:11)
#79     _EventSinkWrapper.close (dart:async/stream_transformers.dart:23:11)
#80     _StringAdapterSink.close (dart:convert/string_conversion.dart:251:11)
#81     _Utf8ConversionSink.close (dart:convert/string_conversion.dart:302:20)
#82     _ConverterStreamEventSink.close (dart:convert/chunked_conversion.dart:82:18)
#83     _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:141:24)
#84     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#85     StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119:48)
#86     _rootRun (dart:async/zone.dart:1120:38)
#87     _CustomZone.run (dart:async/zone.dart:1021:19)
#88     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#89     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:389:13)
#90     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399:15)
#91     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:283:7)
#92     _ForwardingStream._handleDone (dart:async/stream_pipe.dart:106:10)
#93     _ForwardingStreamSubscription._handleDone (dart:async/stream_pipe.dart:172:13)
#94     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#95     StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119:48)
#96     _rootRun (dart:async/zone.dart:1120:38)
#97     _CustomZone.run (dart:async/zone.dart:1021:19)
#98     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#99     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:389:13)
#100    _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399:15)
#101    _BufferingStreamSubscription._close (dart:async/stream_impl.dart:283:7)
#102    _ForwardingStream._handleDone (dart:async/stream_pipe.dart:106:10)
#103    _ForwardingStreamSubscription._handleDone (dart:async/stream_pipe.dart:172:13)
#104    StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#105    StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119:48)
#106    _rootRun (dart:async/zone.dart:1120:38)
#107    _CustomZone.run (dart:async/zone.dart:1021:19)
#108    _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#109    _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:389:13)
#110    _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399:15)
#111    _BufferingStreamSubscription._close (dart:async/stream_impl.dart:283:7)
#112    _SyncStreamController._sendDone (dart:async/stream_controller.dart:772:19)
#113    _StreamController._closeUnchecked (dart:async/stream_controller.dart:629:7)
#114    _StreamController.close (dart:async/stream_controller.dart:622:5)
#115    _HttpParser._closeIncoming (dart:_http/http_parser.dart:1037:23)
#116    _HttpParser._doParse (dart:_http/http_parser.dart:775:15)
#117    _HttpParser._parse (dart:_http/http_parser.dart:318:7)
#118    _HttpParser._onData (dart:_http/http_parser.dart:810:5)
#119    StackZoneSpecification._registerUnaryCallback.<anonymous closure>.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:26)
#120    StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#121    StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:14)
#122    _rootRunUnary (dart:async/zone.dart:1132:38)
#123    _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#124    _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#125    _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#126    _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#127    _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)
#128    _StreamController._add (dart:async/stream_controller.dart:640:7)
#129    _StreamController.add (dart:async/stream_controller.dart:586:5)
#130    _Socket._onData (dart:io/runtime/binsocket_patch.dart:1722:41)
#131    StackZoneSpecification._registerUnaryCallback.<anonymous closure>.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:26)
#132    StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#133    StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:14)
#134    _rootRunUnary (dart:async/zone.dart:1132:38)
#135    _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#136    _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#137    _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#138    _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#139    _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)
#140    _StreamController._add (dart:async/stream_controller.dart:640:7)
#141    _StreamController.add (dart:async/stream_controller.dart:586:5)
#142    _RawSecureSocket._sendReadEvent (dart:io/secure_socket.dart:996:19)
#143    StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#144    StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119:48)
#145    _rootRun (dart:async/zone.dart:1120:38)
#146    _CustomZone.run (dart:async/zone.dart:1021:19)
#147    _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#148    _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#149    StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#150    StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119:48)
#151    _rootRun (dart:async/zone.dart:1124:13)
#152    _CustomZone.run (dart:async/zone.dart:1021:19)
#153    _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#154    Timer._createTimer.<anonymous closure> (dart:async/runtime/libtimer_patch.dart:21:15)
#155    _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#156    _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#157    _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8