Skip to content
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

Exception occurs when I am run the below command #1116

Closed
bajibabashaik-sayukth opened this issue Aug 5, 2024 · 2 comments
Closed

Exception occurs when I am run the below command #1116

bajibabashaik-sayukth opened this issue Aug 5, 2024 · 2 comments
Assignees
Labels
bug Something isn't working needs triage

Comments

@bajibabashaik-sayukth
Copy link

Command:
flutter pub run build_runner build --delete-conflicting-outputs

Deprecated. Use dart run instead.
[INFO] Generating build script completed, took 598ms
[WARNING] ../../.pub-cache/hosted/pub.dev/freezed-2.5.7/lib/src/freezed_generator.dart:546:45: Error: Required named parameter 'withNullability' must be provided.
.map((e) => e.getDisplayString())
^
../../.pub-cache/hosted/pub.dev/freezed-2.5.7/lib/src/freezed_generator.dart:547:16: Error: The argument type 'List' can't be assigned to the parameter type 'List'.

  • 'List' is from 'dart:core'.
    .toList(),
    ^
    ../../.pub-cache/hosted/pub.dev/freezed-2.5.7/lib/src/templates/parameter_template.dart:16:45: Error: Required named parameter 'withNullability' must be provided.
    generics.map((e) => e.getDisplayString()).toList(),
    ^
    ../../.pub-cache/hosted/pub.dev/freezed-2.5.7/lib/src/templates/parameter_template.dart:16:49: Error: The argument type 'List' can't be assigned to the parameter type 'List'.
  • 'List' is from 'dart:core'.
    generics.map((e) => e.getDisplayString()).toList(),
    ^
    ../../.pub-cache/hosted/pub.dev/freezed-2.5.7/lib/src/tools/type.dart:54:46: Error: Required named parameter 'withNullability' must be provided.
    String? displayType = type.getDisplayString();
    ^
    ../../.pub-cache/hosted/pub.dev/freezed-2.5.7/lib/src/tools/type.dart:97:44: Error: Required named parameter 'withNullability' must be provided.
    displayType = modified.getDisplayString();
    ^
    ../../.pub-cache/hosted/pub.dev/freezed-2.5.7/lib/src/templates/concrete_template.dart:562:47: Error: Required named parameter 'withNullability' must be provided.
    String? type = element.type.getDisplayString();
    ^
    [INFO] Precompiling build script... completed, took 1.2s
    [SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
    This is likely caused by a misconfigured builder definition.

My Dart Version:
Flutter 3.22.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 761747bfc5 (9 weeks ago) • 2024-06-05 22:15:13 +0200
Engine • revision edd8546116
Tools • Dart 3.4.3 • DevTools 2.34.3

I am using latest version of the Freezed 2.5.7

@tanvi12
Copy link

tanvi12 commented Oct 4, 2024

Any update on this?

@rrousselGit
Copy link
Owner

Make sure your dependencies are up-to-date. Run dart pub upgrade. That generally should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

3 participants