我正在开发颤振应用程序。运行应用程序时,出现错误 Method not found: 'ButtonTheme.bar'。我尝试清理项目。但仍然存在同样的错误
/C:/Users/RdpUser/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/date_range_picker-1.0.6/lib/date_range_picker.dart:1152:44: Error: Method not found: 'ButtonTheme.bar'.
final Widget actions = new ButtonTheme.bar(
^^^
Failed to compile application.
Run Code Online (Sandbox Code Playgroud)
@pepe-calero 提到的临时解决方案如下所示:
将以下部分添加到您的 pubspec.yaml
dependency_overrides:
date_range_picker:
git:
url: https://github.com/LempereurBenjamin/date_range_picker
Run Code Online (Sandbox Code Playgroud)
用这个,
Deprecated. Please use ButtonBarTheme instead which offers more flexibility to configure ButtonBar widgets.
This feature was deprecated after v1.9.1.
Run Code Online (Sandbox Code Playgroud)
因为ButtonTheme.bar
已被弃用。
作为参考,https://api.flutter.dev/flutter/material/ButtonTheme/ButtonTheme.bar.html
归档时间: |
|
查看次数: |
5082 次 |
最近记录: |