_error: ../../../../../../.pub-cache/hosted/pub.dev/easy_search_bar-2.5.0/lib/easy_search_bar.dart:377:25: Error: The getter 'headline6' isn't defined for the class 'TextTheme'.
'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../../../../Applications/flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline6'.
theme.textTheme.headline6!.copyWith(color: foregroundColor);
^^^^^^^^^
../../../../../../.pub-cache/hosted/pub.dev/easy_search_bar-2.5.0/lib/easy_search_bar.dart:491:60: Error: The argument type 'TextStyle?' can't be assigned to the parameter type 'TextStyle' because 'TextStyle?' is nullable and 'TextStyle' isn't.
'TextStyle' is from 'package:flutter/src/painting/text_style.dart' ('../../../../../../Applications/flutter/packages/flutter/lib/src/painting/text_style.dart').
style: titleTextStyle,
^
Target kernel_snapshot failed: Exception
Failed to package /Users/javierfreiregarcia/Documents/CloudTree/Proyectos/Via Agora/Building Review APP/building_reviewapp.
I upgraded Flutter to latest version:
Flutter 3.22.2 • channel stable • https://github.com/flutter/flutter.git Framework • revision 761747bfc5 (5 weeks ago) • 2024-06-05 22:15:13 +0200 Engine • revision edd8546116 Tools • Dart 3.4.3 • DevTools 2.34.3
And the build fails with the following error:
_error: ../../../../../../.pub-cache/hosted/pub.dev/easy_search_bar-2.5.0/lib/easy_search_bar.dart:377:25: Error: The getter 'headline6' isn't defined for the class 'TextTheme'.