Skip to content

Conditional member access for map children? #33903

Closed
@lukepighetti

Description

@lukepighetti

Any chance we can add conditional member access for map children?

Example:

Today it works like this

Map coolMap = {
  'foo':'bar'
};

final thing = coolMap['baz']['broke'] // error

Tomorrow it works like this?

Map coolMap = {
  'foo':'bar'
};

final thing = coolMap?.['baz']?.['broke'] // null

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-duplicateClosed in favor of an existing report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions