Ask Your Question
0

Is the type 'Map<Object, Object>' not considered a subtype of 'Map<String, dynamic>'?

asked 2022-07-08 11:00:00 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-02-27 07:00:00 +0000

nofretete gravatar image

No, the type 'Map<object, object="">' is not considered a subtype of 'Map<string, dynamic="">'. This is because 'Object' is a super type of 'String', and 'dynamic' is a super type of 'Object'. Therefore, a value of type 'Object' could be something other than 'String', and a value of type 'dynamic' could be something other than 'Object', so they are not compatible.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-07-08 11:00:00 +0000

Seen: 19 times

Last updated: Feb 27 '23