-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The getter 'body1' isn't defined for the class 'TextTheme'. #57
Comments
you can use this for ow place_picker:
git:
url: https://github.com/mo-ah-dawood/locationpicker.git
ref: nullsafety |
Getting the same error. When is the update coming to fix this |
Same error any solution ? |
/C:/Users/kuk/Documents/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/place_picker-0.9.19-nullsafety/lib/widgets/search_input.dart:60:65: Error: The getter 'body1' isn't defined for the class 'TextTheme'.
I am getting this error. Please let me know the solution. |
@mo-ah-dawood Your solution build error:
|
@jinfagang try again after upgrading packages return MaterialApp(
localizationsDelegates: [
/// ...other delegates,
PlacePickerLocalization.delegate
],
home: MyApplicationHome(),
);
|
I've just installed the package in my project and now every time I try to run the project crashes
I get this error message in the terminal
`λ flutter run
Using hardware rendering with device sdk gphone x86 arm. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib\main.dart on sdk gphone x86 arm in debug mode...
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/place_picker-0.9.19-nullsafety/lib/widgets/rich_suggestion.dart:35:89: Error: The getter 'body1' isn't defined for the class 'TextTheme'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'body1'.
TextSpan(text: boldText, style: style.copyWith(color: Theme.of(context).textTheme.body1!.color)),
^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/place_picker-0.9.19-nullsafety/lib/widgets/search_input.dart:60:65: Error: The getter 'body1' isn't defined for the class 'TextTheme'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'body1'.
Icon(Icons.search, color: Theme.of(context).textTheme.body1!.color),
^^^^^
FAILURE: Build failed with an exception.
Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1005
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 1s
Running Gradle task 'assembleDebug'... 64.4s
Exception: Gradle task assembleDebug failed with exit code 1`
The text was updated successfully, but these errors were encountered: