Skip to content

Provide better way to access constants through source mirrors. #18346

Closed
@efortuna

Description

@efortuna

Currently with a String constant, you can say Dart2JsStringConstantMirror.reflectee and get the original String object.

Why can't we do this with composite objects like Map and List?

As it is, to get the original value, I need to check if the particular mirror is of type Dart2JsMapConstantMirror or Dart2JsListConstantMirror and then call the corresponding method, which seems pretty suboptimal, especially since those aren't public interfaces.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions