Skip to content

Conversation

@mhmmdlkts
Copy link

Cast response.message to Map<String, dynamic> in checkout() to fix a Dart type error (Map<dynamic, dynamic> can’t be assigned to Map<String, dynamic>).

This ensures compatibility with strict type checking and prevents runtime errors.

Cast response.message to Map<String, dynamic> in checkout() to fix a Dart type error (Map<dynamic, dynamic> can’t be assigned to Map<String, dynamic>).

This ensures compatibility with strict type checking and prevents runtime errors.
@sstasi95
Copy link
Collaborator

Hi @mhmmdlkts, is it just a linter error or a runtime one? If it's runtime, can you point me to the line of code where the error is thrown?
Because I see that SumupPluginCheckoutResponse.fromMap accepts a Map<dynamic, dynamic>, so there should be no error there.

Anyway, I agree that Map<String, dynamic> should be preferred to Map<dynamic, dynamic>

@sstasi95 sstasi95 self-assigned this Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants