flutter - 颤振持续时间选择器包
问题描述
我在使用 Flutter Duration Picker Package 时遇到问题。
基本上我只想通过 showDurationPicker 函数显示他们的 Duration Picker。没有像示例中那样使用 Duration Picker 作为孩子。可能的或其他解决方案?我想让用户选择倒数计时器的时间。
包: https ://pub.dev/packages/duration_picker
这是代码:
IconButton(
icon: Icon(Icons.history_rounded,
color: AppTheme.blue,
size:
3.23 * SizeConfig.heightMultiplier //30.0,
),
onPressed: () {
Duration _durationResult =
await
showDurationPicker(
snapToMins: 5.0,
context: context,
initialTime: Duration(
hours: 2,
minutes: 0,
seconds: 0,
milliseconds: 0));
}),
终端:
Xcode 的输出:
↳ ../../../FlutterDev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_duration_picker-1.0.4/lib/flutte r_duration_picker.dart:506:44:错误:找不到方法: 'ButtonTheme.bar'。最终小部件操作 = new ButtonTheme.bar( ^^^
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
无法为模拟器构建应用程序。在 Xs 上启动应用程序时出错。
解决方案
您应该切换到新的维护版本 - https://github.com/juliansteenbakker/duration_picker
推荐阅读
- outlook - 如何通过 Outlook 插件发送约会?
- go - 如何在 Go 中选择 os.Stdin 和 http?
- sql - 合并三个查询的结果并在另一个查询中使用它们
- python - 在 python 中执行所有测试用例后将运行哪个测试夹具?
- javascript - 为表上传下载的 dynamo db json
- java - javafx listview 自动滚动到最后
- python-3.x - 查找 Lat\Lon 数组中的最大斜率
- javascript - 我们可以停止来自 JSP 的服务器端重定向吗
- swift - 如何在 Swift 中将文本添加到 MacOS 上的 NSView
- c++ - 如何在 Qt 测试框架中对信号进行基准测试?