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

bug: Required named parameter 'withNullability' must be provided #421

Closed
devj3ns opened this issue Aug 27, 2024 · 2 comments
Closed

bug: Required named parameter 'withNullability' must be provided #421

devj3ns opened this issue Aug 27, 2024 · 2 comments

Comments

@devj3ns
Copy link
Contributor

devj3ns commented Aug 27, 2024

When running the Supabase generator in version >= 0.1.1+1, the following error is thrown:

[WARNING] ../../../../AppData/Local/Pub/Cache/hosted/pub.dev/brick_supabase_generators-0.1.1+1/lib/src/supabase_serialize.dart:77:28: Error: Required named parameter 'withNullability' must be provided.
          .getDisplayString()
                           ^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/brick_supabase_generators-0.1.1+1/lib/src/supabase_serialize.dart:83:33: Error: Required named parameter 'withNullability' must be provided.
    return type.getDisplayString().replaceAll('?', '').replaceAll(typeRemover, '');

This is introduced by #417

@tshedor What was the reason for replacing getDisplayString(withNullability: false) with getDisplayString().replaceAll('?', '')?


This issue also exists for other packages:
brick_build -> shared_checker.dart
brick_graphql_generators -> graphql_serialize.dart
brick_json_generators -> json_deserialize.dart

@devj3ns devj3ns changed the title bug(brick_supabase_generators): Required named parameter 'withNullability' must be provided bug: Required named parameter 'withNullability' must be provided Aug 27, 2024
@tshedor
Copy link
Collaborator

tshedor commented Aug 27, 2024

@devj3ns I haven't updated the analyzer package in over a year, and they deprecated the named param withNullability. Essentially this removes the nullability suffix (#411).

Run dart pub upgrade, or pin analyzer in your dependencies to >= 6.0.0

@devj3ns
Copy link
Contributor Author

devj3ns commented Aug 27, 2024

Okay, now I understand 👌

@devj3ns devj3ns closed this as completed Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants