Skip to content

Commit

Permalink
chore: replace wakelock to wakelock_plus
Browse files Browse the repository at this point in the history
  • Loading branch information
evan361425 committed Dec 28, 2024
1 parent 0eb54b0 commit 211a798
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 57 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ Design Principles:
- **Android**: Download from [Google Play](https://play.google.com/store/apps/details?id=com.evanlu.possystem).
- **iOS**: Coming soon.

## Contribute
## Develop & Contribute

Want to help make POS System even better? We'd love your help!
POS System is an open-source project that's built one contribution at a time.
Check out the [documentation](https://evan361425.github.io/flutter-pos-system/about/contribute/)
Check out [Development](https://evan361425.github.io/flutter-pos-system/maintenance/development/)
to prepare your environment to build and test POS System.
Check out [Contributing](https://evan361425.github.io/flutter-pos-system/about/contribute/)
to learn how you can make POS System better!

## Learn More
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
相關說明請[至此](https://evan361425.github.io/flutter-pos-system/docs/contribute)查看
Detailed in [here](https://evan361425.github.io/flutter-pos-system/docs/contribute).
8 changes: 5 additions & 3 deletions docs/README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@
- Android 可以至 [Google Play](https://play.google.com/store/apps/details?id=com.evanlu.possystem) 下載。
- iOS 要再等等,已排程準備。

## 貢獻
## 開發 & 貢獻

想要幫助 POS 系統更完善?我們很樂意你的幫忙!
POS 系統是一個開源的專案,並且透過大家一點一點的幫助建構出來的。
查看[相關文件](about/contribute.md)暸解如何讓 POS 系統更好!
查看 [Development](https://evan361425.github.io/flutter-pos-system/zh/maintenance/development/)
開始在本地端建置和測試。
查看 [Contributing](https://evan361425.github.io/flutter-pos-system/zh/about/contribute/) 暸解如何讓 POS 系統更好!

## 深入瞭解

為了加速你暸解本系統的概略架構,我們也提供了一些簡單的[說明文件](about/structure.md)
為了加速你暸解本系統的概略架構,我們也提供了一些簡單的[說明文件](https://evan361425.github.io/flutter-pos-system/zh/about/structure.md)
希望可以讓你更快融入本專案,對於 Flutter 初學者來說,亦是一個不錯的開始!
8 changes: 3 additions & 5 deletions lib/ui/order/order_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import 'package:possystem/ui/order/cart/cart_metadata_view.dart';
import 'package:possystem/ui/order/cart/cart_product_list.dart';
import 'package:possystem/ui/order/cart/cart_product_selector.dart';
import 'package:possystem/ui/order/widgets/printer_button_view.dart';
import 'package:wakelock/wakelock.dart';
import 'package:wakelock_plus/wakelock_plus.dart';

import 'cart/cart_product_state_selector.dart';
import 'widgets/draggable_sheet_view.dart';
Expand Down Expand Up @@ -114,7 +114,7 @@ class _OrderPageState extends State<OrderPage> {

@override
void dispose() {
Wakelock.disable();
WakelockPlus.disable();
_pageController.dispose();
_catalogIndexNotifier.dispose();
_productViewNotifier.dispose();
Expand All @@ -124,9 +124,7 @@ class _OrderPageState extends State<OrderPage> {

@override
void initState() {
if (OrderAwakeningSetting.instance.value) {
Wakelock.enable();
}
WakelockPlus.toggle(enable: OrderAwakeningSetting.instance.value);
// rebind menu/attributes if changed
Cart.instance.rebind();

Expand Down
61 changes: 20 additions & 41 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.3.7"
dbus:
dependency: transitive
description:
name: dbus
sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac"
url: "https://pub.dev"
source: hosted
version: "0.7.10"
extension_google_sign_in_as_googleapis_auth:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1433,51 +1441,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "14.2.5"
wakelock:
wakelock_plus:
dependency: "direct main"
description:
path: wakelock
ref: main
resolved-ref: b4ff7266f510e7f75f11db03cd37a75964d83e05
url: "https://github.com/evan361425/wakelock"
source: git
version: "0.6.2"
wakelock_macos:
dependency: transitive
description:
path: wakelock_macos
ref: main
resolved-ref: b4ff7266f510e7f75f11db03cd37a75964d83e05
url: "https://github.com/evan361425/wakelock"
source: git
version: "0.4.0"
wakelock_platform_interface:
dependency: transitive
description:
path: wakelock_platform_interface
ref: main
resolved-ref: b4ff7266f510e7f75f11db03cd37a75964d83e05
url: "https://github.com/evan361425/wakelock"
source: git
version: "0.3.0"
wakelock_web:
dependency: transitive
description:
path: wakelock_web
ref: main
resolved-ref: b4ff7266f510e7f75f11db03cd37a75964d83e05
url: "https://github.com/evan361425/wakelock"
source: git
version: "0.4.0"
wakelock_windows:
name: wakelock_plus
sha256: "36c88af0b930121941345306d259ec4cc4ecca3b151c02e3a9e71aede83c615e"
url: "https://pub.dev"
source: hosted
version: "1.2.10"
wakelock_plus_platform_interface:
dependency: transitive
description:
path: wakelock_windows
ref: main
resolved-ref: b4ff7266f510e7f75f11db03cd37a75964d83e05
url: "https://github.com/evan361425/wakelock"
source: git
version: "0.2.2"
name: wakelock_plus_platform_interface
sha256: "70e780bc99796e1db82fe764b1e7dcb89a86f1e5b3afb1db354de50f2e41eb7a"
url: "https://pub.dev"
source: hosted
version: "1.2.2"
watcher:
dependency: transitive
description:
Expand Down
6 changes: 1 addition & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,7 @@ dependencies:

# tools
uuid: ^4.5.1 # 24, 09-26
wakelock:
git:
url: https://github.com/evan361425/wakelock
path: wakelock/
ref: main
wakelock_plus: ^1.2.10 # 24, 12-21
characters: ^1.3.0 # 24, 10-16
path_provider: ^2.1.5 # 24, 10-29
url_launcher: ^6.3.1 # 24, 10-08
Expand Down

0 comments on commit 211a798

Please sign in to comment.