Jan*_*iya 7 flutter google-fonts
我在颤振中遇到这个错误
../../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/google_fonts-2.3.0/lib/google_fonts.dart:142265:7: Error: No named parameter with the name 'displayLarge'.
displayLarge:
^^^^^^^^^^^^
../../../snap/flutter/common/flutter/packages/flutter/lib/src/material/text_theme.dart:81:9: Context: Found this candidate, but the arguments don't match.
const TextTheme({
^^^^^^^^^
Run Code Online (Sandbox Code Playgroud)
运行移动应用程序时
一些代码片段...
pubspec.yaml
dependencies:
flutter:
sdk: flutter
http: ^0.13.4
cupertino_icons: ^1.0.2
google_fonts:
get:
Run Code Online (Sandbox Code Playgroud)
代码
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'Details',
style: GoogleFonts.pacifico(),
),
)
Run Code Online (Sandbox Code Playgroud)
先感谢您
小智 10
您应该尝试设置特定版本,因为它似乎是由最近的 google_fonts 更新的要求引起的。
使用google_fonts:2.1.1对我有用。
另请检查https://github.com/material-foundation/google-fonts-flutter/issues/219。
| 归档时间: |
|
| 查看次数: |
8323 次 |
| 最近记录: |