Reputation: 167
i'm getting this error in flutter
../../../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({
^^^^^^^^^
while running mobile application
some code snippets...
pubspec.yaml
dependencies:
flutter:
sdk: flutter
http: ^0.13.4
cupertino_icons: ^1.0.2
google_fonts:
get:
code
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'Details',
style: GoogleFonts.pacifico(),
),
)
thank you in advance
Upvotes: 8
Views: 10095
Reputation: 167
i have updated flutter version to 2.10.0 & now it is working
Upvotes: 1
Reputation: 172
You should try setting a specific version as it seems to be caused by a requirement by the recent google_fonts update.
Using google_fonts:2.1.1
worked for me.
Also check https://github.com/material-foundation/google-fonts-flutter/issues/219 .
Upvotes: 11