-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wakelock_plus] Replace frontend package to wakelock_plus (#736)
- Loading branch information
Showing
33 changed files
with
317 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
packages/wakelock/example/integration_test/wakelock_test.dart
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
6 changes: 4 additions & 2 deletions
6
packages/wakelock/CHANGELOG.md → packages/wakelock_plus/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Copyright (c) 2024 Samsung Electronics Co., Ltd. All rights reserved. | ||
|
||
BSD 3-Clause License | ||
|
||
Copyright (c) 2020-2023, creativecreatorormaybenot | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# wakelock_plus_tizen | ||
|
||
[![pub package](https://img.shields.io/pub/v/wakelock_plus_tizen.svg)](https://pub.dev/packages/wakelock_plus_tizen) | ||
|
||
The Tizen implementation of [`wakelock_plus`](https://pub.dev/packages/wakelock_plus). | ||
|
||
## Usage | ||
|
||
This package is not an _endorsed_ implementation of `wakelock_plus`. Therefore, you have to include `wakelock_plus_tizen` alongside `wakelock_plus` as dependencies in your `pubspec.yaml` file. | ||
|
||
```yaml | ||
dependencies: | ||
wakelock_plus: ^1.2.8 | ||
wakelock_plus_tizen: ^2.0.0 | ||
``` | ||
Then you can import `wakelock_plus` in your Dart code: | ||
|
||
```dart | ||
import 'package:wakelock_plus/wakelock_plus.dart'; | ||
``` | ||
|
||
For detailed usage, see https://pub.dev/packages/wakelock_plus#usage. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include: package:flutter_lints/flutter.yaml | ||
|
||
linter: | ||
rules: | ||
public_member_api_docs: true |
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
packages/wakelock/example/README.md → packages/wakelock_plus/example/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packages/wakelock_plus/example/integration_test/wakelock_plus_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import 'package:flutter_test/flutter_test.dart'; | ||
|
||
import 'package:integration_test/integration_test.dart'; | ||
import 'package:wakelock_plus/wakelock_plus.dart'; | ||
|
||
void main() { | ||
IntegrationTestWidgetsFlutterBinding.ensureInitialized(); | ||
|
||
testWidgets('enabling and disabling wakelock', (WidgetTester tester) async { | ||
final wakelockEnabled = await WakelockPlus.enabled; | ||
|
||
// The wakelock should initially be disabled. | ||
expect(wakelockEnabled, isFalse); | ||
|
||
await WakelockPlus.enable(); | ||
expect(await WakelockPlus.enabled, isTrue); | ||
await WakelockPlus.disable(); | ||
expect(await WakelockPlus.enabled, isFalse); | ||
}); | ||
|
||
testWidgets('toggling wakelock', (WidgetTester tester) async { | ||
await WakelockPlus.toggle(enable: true); | ||
expect(await WakelockPlus.enabled, isTrue); | ||
await WakelockPlus.toggle(enable: false); | ||
expect(await WakelockPlus.enabled, isFalse); | ||
}); | ||
} |
Oops, something went wrong.