activsy
當您的應用程式中沒有使用者活動時,會產生反應
- 星標
- 7
- 分支
- 0
- 最近推送(UTC)
- 2026年4月27日
- 專案狀態
- 未封存
原始 README
以下為英文專案原文快照,最新內容請造訪 GitHub。
activsy
reacts when there are no user activities in your application
Installation
dependencies:
activsy: ^1.0.3
Usage
void main() {
Activsy.initialize(waiTime: 10, onTimeOut: () {
/// perform operation
/// call the start to continue monitoring
});
runApp(const MyApp());
}
ActivsyWidget(
detectedMouseAction: false,
builder: (context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(primarySwatch: Colors.blue,),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
},
)
can also intercept interaction events, just implement the onEvent(PointerEvent) method
ActivsyWidget(
onEvent: (_){},
builder: (context) {...},
)
After the onTimeOut method call the monitoring is terminated
| Functions And Attributes | Description |
|---|---|
| start | To monitor user interaction with the application just call Activsy.start(). Can be called multiple times but if monitoring is already active nothing happens |
| stop | Ends monitoring Activsy.reset(). Can be called multiple times |
| reset | Restart monitoring Activsy.reset(), he calls start() and then stop(). This method also to modify the waiting time: Activsy.updateTime(waiTime: 60) |
| forceTimeOut | Triggers the onTimeOut method at any point in the application Activsy.forceTimeOut(). There are several reasons to trigger the noActivity method before the stipulated timer |
| isInitialized | true returns if the setup was made |
| isActive | true returns if monitoring this active |
Note: call the functions after the config method otherwise you will throw an exception
Support
You liked this package? then give it a star. If you want to help then:
- Start this repository
- Send a Pull Request with new features
- Share this package
- Create issues if you find a Bug or want to suggest something
語言DartSwiftKotlinObjective-C
分類
使用的依賴
依賴清單 3 項
- flutter
{"sdk":"flutter"} - flutter_test開發依賴
{"sdk":"flutter"} - flutter_lints開發依賴
^1.0.0
如何選擇適合專案的儲存庫?
先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
- 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
- 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
- 使用前在 GitHub 確認 README、授權條款與 Issues。
來源與維護
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗