Can someone help me to solve this error.
I've got no clue why this keeps coming up.
/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/gradient_app_bar-0.0.1/lib/gradient_app_bar.dart:230:57: Error: No named parameter with the name 'nullOk'.
final ScaffoldState scaffold = Scaffold.of(context, nullOk: true);
^^^^^^
/C:/src/flutter/flutter/packages/flutter/lib/src/material/scaffold.dart:1944:24: Context: Found this candidate, but the arguments don't match.
static ScaffoldState of(BuildContext context) {
^^
/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/gradient_app_bar-0.0.1/lib/gradient_app_bar.dart:450:20: Error: The method 'ancestorRenderObjectOfType' isn't defined for the class 'BuildContext'.
- 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'ancestorRenderObjectOfType'.
return context.ancestorRenderObjectOfType(
^^^^^^^^^^^^^^^^^^^^^^^^^^
try to upgrade gradient_app_bar package
gradient_app_bar: ^0.1.3 (the last update for this package was in 2019 in the period of time flutter went to lots of updates)
you can just switch to new_gradient_app_bar 0.2.0 it does the same thing
https://pub.dev/packages/new_gradient_app_bar
Related
When I run flutter I get the error as below, it says package doesn't exist, named parameter not defined like error. Even though I downgraded and upgraded flutter it is showing the same error please look and tell whether if any fixes available.
The plugins `firebase_auth, flutter_country_picker, geocoder` use a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if these plugins support the Android V2 embedding. Otherwise, consider removing them since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.
Launching lib/main_dev.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
Error: Couldn't resolve the package 'timekeeper' in 'package:timekeeper/support/colors.dart'.
Error: Couldn't resolve the package 'timekeeper' in 'package:timekeeper/support/strings.dart'.
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/fancy_dialog-1.0.4/lib/fancy_dialog.dart:6:8: Error: Not found: 'package:timekeeper/support/colors.dart'
import 'package:timekeeper/support/colors.dart';
^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/fancy_dialog-1.0.4/lib/fancy_dialog.dart:7:8: Error: Not found: 'package:timekeeper/support/strings.dart'
import 'package:timekeeper/support/strings.dart';
^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_plus-0.0.9/lib/src/text-dropdown.dart:4:8: Error: Not found: 'package:timekeeper/support/colors.dart'
import 'package:timekeeper/support/colors.dart';
^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/fancy_dialog-1.0.4/lib/fancy_dialog.dart:29:24: Error: Undefined name 'MyColors'.
this.okColor = MyColors.kPrimaryColor,
^^^^^^^^
lib/service/push_notification_service.dart:30:26: Error: The getter 'Messaging' isn't defined for the class 'PushNotificationService'.
- 'PushNotificationService' is from 'package:spaid/service/push_notification_service.dart' ('lib/service/push_notification_service.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'Messaging'.
final _messaging = Messaging.instance;
^^^^^^^^^
lib/service/push_notification_service.dart:47:10: Error: The method 'configure' isn't defined for the class 'FirebaseMessaging'.
- 'FirebaseMessaging' is from 'package:firebase_messaging/firebase_messaging.dart' ('../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-8.0.0-dev.15/lib/firebase_messaging.dart').
Try correcting the name to the name of an existing method, or defining a method named 'configure'.
_fcm.configure(
^^^^^^^^^
lib/ui/add_event_screen/add_event_screen_ui.dart:2654:29: Error: No named parameter with the name 'onClick'.
onClick: (value) {
^^^^^^^
../../Documents/flutter/packages/flutter/lib/src/material/time_picker.dart:1801:9: Context: Found this candidate, but the arguments don't match.
const TimePickerDialog({
^^^^^^^^^^^^^^^^
lib/ui/add_event_screen/add_event_screen_ui.dart:3702:31: Error: No named parameter with the name 'onClick'.
onClick: (value) {
^^^^^^^
../../Documents/flutter/packages/flutter/lib/src/material/time_picker.dart:1801:9: Context: Found this candidate, but the arguments don't match.
const TimePickerDialog({
^^^^^^^^^^^^^^^^
lib/ui/add_event_screen/add_event_screen_ui.dart:3901:31: Error: No named parameter with the name 'onClick'.
onClick: (value) {
^^^^^^^
../../Documents/flutter/packages/flutter/lib/src/material/time_picker.dart:1801:9: Context: Found this candidate, but the arguments don't match.
const TimePickerDialog({
^^^^^^^^^^^^^^^^
lib/ui/coaches_corner/home_Screen_provider.dart:179:31: Error: Can't declare 'GetDrillCategoryRequest' because it was already used in this scope.
GetDrillCategoryRequest GetDrillCategoryRequest =
^^^^^^^^^^^^^^^^^^^^^^^
lib/ui/coaches_corner/home_Screen_provider.dart:179:7: Context: Previous use of 'GetDrillCategoryRequest'.
GetDrillCategoryRequest GetDrillCategoryRequest =
^^^^^^^^^^^^^^^^^^^^^^^
lib/ui/coaches_corner/home_Screen_provider.dart:195:7: Error: 'GetDrillPlanRequest' isn't a type.
GetDrillPlanRequest GetDrillPlanRequest = GetDrillPlanRequest();
^^^^^^^^^^^^^^^^^^^
lib/ui/coaches_corner/home_Screen_provider.dart:195:27: Error: Can't declare 'GetDrillPlanRequest' because it was already used in this scope.
GetDrillPlanRequest GetDrillPlanRequest = GetDrillPlanRequest();
^^^^^^^^^^^^^^^^^^^
lib/ui/coaches_corner/home_Screen_provider.dart:195:7: Context: Previous use of 'GetDrillPlanRequest'.
GetDrillPlanRequest GetDrillPlanRequest = GetDrillPlanRequest();
^^^^^^^^^^^^^^^^^^^
lib/ui/coaches_corner/home_Screen_provider.dart:195:49: Error: The method 'GetDrillPlanRequest' isn't defined for the class 'HomeScreenProvider'.
- 'HomeScreenProvider' is from 'package:spaid/ui/coaches_corner/home_Screen_provider.dart' ('lib/ui/coaches_corner/home_Screen_provider.dart').
Try correcting the name to the name of an existing method, or defining a method named 'GetDrillPlanRequest'.
GetDrillPlanRequest GetDrillPlanRequest = GetDrillPlanRequest();
^^^^^^^^^^^^^^^^^^^
lib/ui/coaches_corner/home_Screen_provider.dart:196:7: Error: The getter 'GetDrillPlanRequest' isn't defined for the class 'HomeScreenProvider'.
- 'HomeScreenProvider' is from 'package:spaid/ui/coaches_corner/home_Screen_provider.dart' ('lib/ui/coaches_corner/home_Screen_provider.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'GetDrillPlanRequest'.
GetDrillPlanRequest.iDNo =
^^^^^^^^^^^^^^^^^^^
lib/ui/coaches_corner/home_Screen_provider.dart:200:49: Error: The getter 'GetDrillPlanRequest' isn't defined for the class 'HomeScreenProvider'.
- 'HomeScreenProvider' is from 'package:spaid/ui/coaches_corner/home_Screen_provider.dart' ('lib/ui/coaches_corner/home_Screen_provider.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'GetDrillPlanRequest'.
.post(Endpoints.getAllDrillUrl, data: GetDrillPlanRequest)
^^^^^^^^^^^^^^^^^^^
lib/ui/coaches_corner/home_Screen_provider.dart:219:26: Error: Can't declare 'GetDrillPlanResponse' because it was already used in this scope.
GetDrillPlanResponse GetDrillPlanResponse =
^^^^^^^^^^^^^^^^^^^^
lib/ui/coaches_corner/home_Screen_provider.dart:219:5: Context: Previous use of 'GetDrillPlanResponse'.
GetDrillPlanResponse GetDrillPlanResponse =
^^^^^^^^^^^^^^^^^^^^
lib/ui/coaches_corner/home_Screen_provider.dart:221:28: Error: A value of type 'Type' can't be assigned to a variable of type 'GetDrillPlanResponse'.
- 'Type' is from 'dart:core'.
- 'GetDrillPlanResponse' is from 'package:spaid/model/response/getDrill_Plan_response/getDrill_plan_response.dart' ('lib/model/response/getDrill_Plan_response/getDrill_plan_response.dart').
getDrillPlanResponse = GetDrillPlanResponse;
^
lib/ui/coaches_corner/home_Screen_ui.dart:1196:49: Error: No named parameter with the name 'onClick'.
onClick: (value) {
^^^^^^^
../../Documents/flutter/packages/flutter/lib/src/material/time_picker.dart:1801:9: Context: Found this candidate, but the arguments don't match.
const TimePickerDialog({
^^^^^^^^^^^^^^^^
lib/ui/coaches_corner/home_Screen_ui.dart:1530:45: Error: No named parameter with the name 'onClick'.
onClick: (value) {
^^^^^^^
../../Documents/flutter/packages/flutter/lib/src/material/time_picker.dart:1801:9: Context: Found this candidate, but the arguments don't match.
const TimePickerDialog({
^^^^^^^^^^^^^^^^
lib/ui/edit_event_screen/edit_event_screen_ui.dart:2666:29: Error: No named parameter with the name 'onClick'.
onClick: (value) {
^^^^^^^
../../Documents/flutter/packages/flutter/lib/src/material/time_picker.dart:1801:9: Context: Found this candidate, but the arguments don't match.
const TimePickerDialog({
^^^^^^^^^^^^^^^^
lib/ui/edit_event_screen/edit_event_screen_ui.dart:3774:31: Error: No named parameter with the name 'onClick'.
onClick: (value) {
^^^^^^^
../../Documents/flutter/packages/flutter/lib/src/material/time_picker.dart:1801:9: Context: Found this candidate, but the arguments don't match.
const TimePickerDialog({
^^^^^^^^^^^^^^^^
lib/ui/edit_event_screen/edit_event_screen_ui.dart:3968:31: Error: No named parameter with the name 'onClick'.
onClick: (value) {
^^^^^^^
../../Documents/flutter/packages/flutter/lib/src/material/time_picker.dart:1801:9: Context: Found this candidate, but the arguments don't match.
const TimePickerDialog({
^^^^^^^^^^^^^^^^
lib/ui/home_screen/home_menu_screen/notification_preferences.dart:406:57: Error: No named parameter with the name 'onTap'.
onTap: (value) {
^^^^^
../../Documents/flutter/packages/flutter/lib/src/material/time_picker.dart:1801:9: Context: Found this candidate, but the arguments don't match.
const TimePickerDialog({
^^^^^^^^^^^^^^^^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-2.0.12/lib/src/link.dart:213:30: Error: The value 'null' can't be assigned to the parameter type 'BuildContext' because 'BuildContext' is not nullable.
- 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../Documents/flutter/packages/flutter/lib/src/widgets/framework.dart').
pushRouteNameToFramework(null, routeName);
^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/lite_rolling_switch-1.0.0/lib/lite_rolling_switch.dart:97:20: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Documents/flutter/packages/flutter/lib/src/widgets/binding.dart').
WidgetsBinding.instance?.addPostFrameCallback((_) {
^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_below-1.0.3/lib/dropdown_below.dart:479:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Documents/flutter/packages/flutter/lib/src/widgets/binding.dart').
WidgetsBinding.instance!.addObserver(this);
^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_below-1.0.3/lib/dropdown_below.dart:484:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Documents/flutter/packages/flutter/lib/src/widgets/binding.dart').
WidgetsBinding.instance!.removeObserver(this);
^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_button2-1.8.0/lib/dropdown_button2.dart:77:14: Error: The method 'clampDouble' isn't defined for the class '_DropdownMenuPainter'.
- '_DropdownMenuPainter' is from 'package:dropdown_button2/dropdown_button2.dart' ('../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_button2-1.8.0/lib/dropdown_button2.dart').
Try correcting the name to the name of an existing method, or defining a method named 'clampDouble'.
begin: clampDouble(top.begin! + itemHeight,
^^^^^^^^^^^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_button2-1.8.0/lib/dropdown_button2.dart:182:9: Error: The method 'clampDouble' isn't defined for the class '_DropdownMenuItemButtonState<T>'.
- '_DropdownMenuItemButtonState' is from 'package:dropdown_button2/dropdown_button2.dart' ('../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_button2-1.8.0/lib/dropdown_button2.dart').
Try correcting the name to the name of an existing method, or defining a method named 'clampDouble'.
clampDouble(0.5 + (widget.itemIndex + 1) * unit, 0.0, 1.0);
^^^^^^^^^^^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_button2-1.8.0/lib/dropdown_button2.dart:183:24: Error: The method 'clampDouble' isn't defined for the class '_DropdownMenuItemButtonState<T>'.
- '_DropdownMenuItemButtonState' is from 'package:dropdown_button2/dropdown_button2.dart' ('../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_button2-1.8.0/lib/dropdown_button2.dart').
Try correcting the name to the name of an existing method, or defining a method named 'clampDouble'.
final double end = clampDouble(start + 1.5 * unit, 0.0, 1.0);
^^^^^^^^^^^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_button2-1.8.0/lib/dropdown_button2.dart:484:16: Error: The method 'clampDouble' isn't defined for the class '_DropdownMenuRouteLayout<T>'.
- '_DropdownMenuRouteLayout' is from 'package:dropdown_button2/dropdown_button2.dart' ('../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_button2-1.8.0/lib/dropdown_button2.dart').
Try correcting the name to the name of an existing method, or defining a method named 'clampDouble'.
left = clampDouble(buttonRect.right + offset.dx, 0.0, size.width) -
^^^^^^^^^^^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_button2-1.8.0/lib/dropdown_button2.dart:488:16: Error: The method 'clampDouble' isn't defined for the class '_DropdownMenuRouteLayout<T>'.
- '_DropdownMenuRouteLayout' is from 'package:dropdown_button2/dropdown_button2.dart' ('../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_button2-1.8.0/lib/dropdown_button2.dart').
Try correcting the name to the name of an existing method, or defining a method named 'clampDouble'.
left = clampDouble(
^^^^^^^^^^^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_plus-0.0.9/lib/src/text-dropdown.dart:52:21: Error: The getter 'MyColors' isn't defined for the class 'TextDropdownFormField'.
- 'TextDropdownFormField' is from 'package:dropdown_plus/src/text-dropdown.dart' ('../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_plus-0.0.9/lib/src/text-dropdown.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'MyColors'.
? MyColors.errorColor
^^^^^^^^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_plus-0.0.9/lib/src/text-dropdown.dart:53:21: Error: The getter 'MyColors' isn't defined for the class 'TextDropdownFormField'.
- 'TextDropdownFormField' is from 'package:dropdown_plus/src/text-dropdown.dart' ('../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_plus-0.0.9/lib/src/text-dropdown.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'MyColors'.
: MyColors.black),
^^^^^^^^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_plus-0.0.9/lib/src/text-dropdown.dart:54:22: Error: The getter 'MyColors' isn't defined for the class 'TextDropdownFormField'.
- 'TextDropdownFormField' is from 'package:dropdown_plus/src/text-dropdown.dart' ('../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_plus-0.0.9/lib/src/text-dropdown.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'MyColors'.
fillColor: MyColors.white,
^^^^^^^^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_plus-0.0.9/lib/src/text-dropdown.dart:57:24: Error: The getter 'MyColors' isn't defined for the class 'TextDropdownFormField'.
- 'TextDropdownFormField' is from 'package:dropdown_plus/src/text-dropdown.dart' ('../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_plus-0.0.9/lib/src/text-dropdown.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'MyColors'.
color: MyColors.borderColor),
^^^^^^^^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_plus-0.0.9/lib/src/text-dropdown.dart:73:24: Error: The getter 'MyColors' isn't defined for the class 'TextDropdownFormField'.
- 'TextDropdownFormField' is from 'package:dropdown_plus/src/text-dropdown.dart' ('../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_plus-0.0.9/lib/src/text-dropdown.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'MyColors'.
color: MyColors
^^^^^^^^
../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_plus-0.0.9/lib/src/text-dropdown.dart:84:24: Error: The getter 'MyColors' isn't defined for the class 'TextDropdownFormField'.
- 'TextDropdownFormField' is from 'package:dropdown_plus/src/text-dropdown.dart' ('../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_plus-0.0.9/lib/src/text-dropdown.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'MyColors'.
color: MyColors
^^^^^^^^
Unhandled exception:
NoSuchMethodError: The getter 'path' was called on null.
Receiver: null
Tried calling: path
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5)
#1 JavaScriptBundler.compile (file:///opt/s/w/ir/x/w/sdk/pkg/frontend_server/lib/src/javascript_bundle.dart:165:65)
<asynchronous suspension>
#2 FrontendCompiler.writeJavascriptBundle (file:///opt/s/w/ir/x/w/sdk/pkg/frontend_server/lib/frontend_server.dart:694:32)
<asynchronous suspension>
#3 FrontendCompiler.compile (file:///opt/s/w/ir/x/w/sdk/pkg/frontend_server/lib/frontend_server.dart:602:9)
<asynchronous suspension>
#4 listenAndCompile.<anonymous closure> (file:///opt/s/w/ir/x/w/sdk/pkg/frontend_server/lib/frontend_server.dart:1199:11)
<asynchronous suspension>
Finished with error: the Dart compiler exited unexpectedly.
Failed to compile application.
I am getting this error when i ran a flutter project from github... i tried everything.
i tried many command but no luck
Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline'.
theme.primaryTextTheme.headline;
^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/velocity_x-0.3.4/lib/src/flutter/appbar.dart:338:45: Error: The getter 'body1' isn't defined for the class 'TextTheme'.
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/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 'body1'.
TextStyle sideStyle = widget.textTheme?.body1 ??
^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/velocity_x-0.3.4/lib/src/flutter/appbar.dart:339:32: Error: The getter 'body1' isn't defined for the class 'TextTheme'.
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/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 'body1'.
appBarTheme.textTheme?.body1 ??
^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/velocity_x-0.3.4/lib/src/flutter/appbar.dart:340:32: Error: The getter 'body1' isn't defined for the class 'TextTheme'.
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/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 'body1'.
theme.primaryTextTheme.body1;
Launching lib\main.dart on Edge in debug mode...
lib\main.dart:1
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/velocity_x-0.3.4/lib/src/flutter/appbar.dart:322:57: Error: No named parameter with the name 'nullOk'.
final ScaffoldState scaffold = Scaffold.of(context, nullOk: true);
^^^^^^
/C:/flutter/packages/flutter/lib/src/material/scaffold.dart:1769:24: Context: Found this candidate, but the arguments don't match.
static ScaffoldState of(BuildContext context) {
^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/velocity_x-0.3.4/lib/src/flutter/appbar.dart:335:47: Error: The getter 'headline' isn't defined for the class 'TextTheme'.
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/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 'headline'.
TextStyle centerStyle = widget.textTheme?.headline ??
^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/velocity_x-0.3.4/lib/src/flutter/appbar.dart:336:32: Error: The getter 'headline' isn't defined for the class 'TextTheme'.
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/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 'headline'.
appBarTheme.textTheme?.headline ??
^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/velocity_x-0.3.4/lib/src/flutter/appbar.dart:337:32: Error: The getter 'headline' isn't defined for the class 'TextTheme'.
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/flutter/packages/flutter/lib/src/material/text_theme.dart').
^^^^^
Failed to compile app.
Exited (sigterm)
You are attempting to use code written for an older version of flutter, that is the problem, you need to either downgrade your SDK or update the code.
Updating the code should be simple enough, most changes are very intuitive and IntelliSense can autocomplete what you don't know, however it seems like the original code used the getflutter package, which has since been discontinued and now is getWidget, I've never used neither, but the migration shouldn't be too hard.
If you are interested in updating the code here are the main changes I can see:
The getter 'body1' isn't defined for the class 'TextTheme'.
just change body1 to bodyText1
The getter 'headline' isn't defined for the class 'TextTheme'.
just change headline to headline1
And if what you want to do is downgrade the SDK, which might be the better option, simply download an older version from here
I already using flutter clean but it doesn’t work
../../Resource/flutter/.pub-cache/hosted/pub.dartlang.org/chewie-0.12.0/lib/src/chewie_player.dart:85:7: Error: No named parameter with the name 'resizeToAvoidBottomPadding'. resizeToAvoidBottomPadding: false,
^^^^^^^^^^^^^^^^^^^^^^^^^^
../../Resource/flutter/packages/flutter/lib/src/material/scaffold.dart:1451:9: Context: Found this candidate, but the arguments don't match. const Scaffold({
^^^^^^^^
../../Resource/flutter/.pub-cache/hosted/pub.dartlang.org/chewie_audio-1.1.1/lib/src/chewie_player.dart:99:17: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.
'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../Resource/flutter/packages/flutter/lib/src/widgets/framework.dart'). Try correcting the name to the name of an existing method, or defining a method named 'inheritFromWidgetOfExactType'. context.inheritFromWidgetOfExactType(_ChewieAudioControllerProvider) as _ChewieAudioControllerProvider; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../Resource/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.19.1/lib/src/picture_provider.dart:52:59: Error: No named parameter with the name 'nullOk'. context != null ? Localizations.localeOf(context, nullOk: true) : null, ^^^^^^
../../Resource/flutter/packages/flutter/lib/src/widgets/localizations.dart:413:17: Context: Found this candidate, but the arguments don't match. static Locale localeOf(BuildContext context) {
sry after i update to flutter 2.0.1, i forget to flutter pub upgrade
After make update the windows I got the below errors and I don't know why this happen.
D:/dev/courses/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/stacked_services-0.4.11/lib/src/snackbar_service.dart:74:7:
Error: Type 'SnackStatusCallback' not found.
SnackStatusCallback onStatusChanged,
^^^^^^^^^^^^^^^^^^^ /D:/dev/courses/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/stacked_services-0.4.11/lib/src/navigation_service.dart:94:35:
Error: The getter 'defaultDurationTransition' isn't defined for the
class '_GetImpl'.
'_GetImpl' is from 'package:get/get_core/src/get_main.dart' ('/D:/dev/courses/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/get-3.24.0/lib/get_core/src/get_main.dart').
Try correcting the name to the name of an existing getter, or defining
a getter or field named 'defaultDurationTransition'.
duration: duration ?? Get.defaultDurationTransition,
^^^^^^^^^^^^^^^^^^^^^^^^^ /D:/dev/courses/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/stacked_services-0.4.11/lib/src/navigation_service.dart:113:33:
Error: The getter 'defaultDurationTransition' isn't defined for the
class '_GetImpl'.
'_GetImpl' is from 'package:get/get_core/src/get_main.dart' ('/D:/dev/courses/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/get-3.24.0/lib/get_core/src/get_main.dart').
Try correcting the name to the name of an existing getter, or defining
a getter or field named 'defaultDurationTransition'.
duration: duration ?? Get.defaultDurationTransition,
^^^^^^^^^^^^^^^^^^^^^^^^^ /D:/dev/courses/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/stacked_services-0.4.11/lib/src/snackbar_service.dart:74:7:
Error: 'SnackStatusCallback' isn't a type.
SnackStatusCallback onStatusChanged,
^^^^^^^^^^^^^^^^^^^ /D:/dev/courses/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/stacked_services-0.4.11/lib/src/snackbar_service.dart:111:9:
Error: No named parameter with the name 'onStatusChanged'.
onStatusChanged: onStatusChanged,
^^^^^^^^^^^^^^^ /D:/dev/courses/flutter/flutter_windows_1.22.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/get-3.24.0/lib/get_navigation/src/snackbar/snack.dart:12:3:
Context: Found this candidate, but the arguments don't match.
GetBar({ ^^^^^^ 2
FAILURE: Build failed with an exception.
Where: Script 'D:\dev\courses\flutter\flutter_windows_1.22.5-stable\flutter\packages\flutter_tools\gradle\flutter.gradle'
line: 904
I updated Provider package. Now it's not wroking.
ProxyProvider<CategoriesRepository, CategoryBloc>(
update: (context, categoryRepo, categoryBloc) =>//builder:
CategoryBloc(categoryRepository: categoryRepo),
dispose: (context, categoryBloc) => categoryBloc.dispose(),
).didChangeDependencies(context, categoryBloc).deleteEntry();
Full Error
lib/screens/home/widgets/drawer.dart:297:15: Error: The method
'didChangeDependencies' isn't defined for the class
'ProxyProvider'.
- 'ProxyProvider' is from 'package:provider/src/proxy_provider.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/provider-4.0.0/lib/src/proxy_provider.dart').
- 'CategoriesRepository' is from 'package:yellochat/repository/category_repository.dart'
('lib/repository/category_repository.dart').
- 'CategoryBloc' is from 'package:yellochat/screens/categories/category_bloc.dart'
('lib/screens/categories/category_bloc.dart'). Try correcting the name
to the name of an existing method, or defining a method named
'didChangeDependencies'.
).didChangeDependencies(context, categoryBloc).deleteEntry();
Doing that was never supported and is anti pattern.
Just call your method directly inside update