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.
