時間持續時間選擇器
一個用於選擇時間段的 Flutter 套件
- 星標
- 8
- 分支
- 6
- 最近推送(UTC)
- 2024年4月10日
- 專案狀態
- 未封存
原始 README
以下為英文專案原文快照,最新內容請造訪 GitHub。
Time Duration Picker

A time picker for paired consecutive tasks. It lets you specify the icons for each of your actions and callbacks when the user rotates each icon. You can optionally give callback for the time duration, decorations for the knob, the knob background, the clock and also color for your icons. The time and duration values are not displayed by the TimeDurationPicker widget, instead they are passed to the callbacks provided.

TimeDurationPicker(
diameter: 300,
icon1Data: Icons.directions_car_outlined,
icon2Data: Icons.local_gas_station_outlined,
knobDecoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.topRight,
colors: [
Color.fromRGBO(204, 43, 94, 1),
Color.fromRGBO(117, 58, 136, 1),
],
),
),
clockTextStyle: const TextStyle(
color: Colors.teal, fontWeight: FontWeight.bold),
onIcon1RotatedCallback: (value) {
setState(() {
goTime = value;
});
},
onIcon2RotatedCallback: (value) {
setState(() {
gasTime = value;
});
},),

TimeDurationPicker(
diameter: 305,
icon1Data: Icons.school,
icon2Data: Icons.home,
clockTextStyle: const TextStyle(
color: Colors.white, fontWeight: FontWeight.bold),
iconColor: Colors.black,
knobDecoration: const BoxDecoration(
gradient: LinearGradient(
colors: [
Color.fromRGBO(221, 214, 243, 1),
Color.fromRGBO(250, 172, 168, 1),
],
),
),
clockDecoration: const BoxDecoration(
gradient: LinearGradient(
colors: [
Color.fromRGBO(2, 170, 176, 1),
Color.fromRGBO(0, 205, 172, 1),
],
),
),
onIcon1RotatedCallback: (value) {
setState(() {
schoolTime = value;
});
},
onIcon2RotatedCallback: (value) {
setState(() {
homeTime = value;
});
},
setDurationCallback: (value) {
setState(() {
sleepDuration = value;
});
},
)
Inspired by Iphone Alarm UI Design by Ghulam Rasool
語言DartC++CMakeHTMLCSwiftKotlinObjective-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 ↗