ethanblake4/dart_eval

Method not found containsKey on Map

cuifengcn opened this issue · 3 comments

final testMap = {'default': ''};
print(testMap.containsKey('default'));

When starting compile, it has this error

flutter: │ ⛔ CompileError: Method not found containsKey on Map at "testMap.containsKey(..." (file package:example/main.dart)
flutter: │ ⛔ #0      Compiler.compileSources (package:dart_eval/src/eval/compiler/compiler.dart:497:7)
flutter: │ ⛔ #1      Compiler.compile (package:dart_eval/src/eval/compiler/compiler.dart:164:12)

dart_eval 0.7.1

Hi @ethanblake4 and @cuifengcn,

I would love to work on this issue. Can you elaborate more on what it entails?

@DeleMike Sure, this is a great place to start on dart_eval as it just involves making standard library bindings. I'd recommend reviewing this PR to see an example of some functions that were added to List and Iterable. In this case you'd be adding the function containsKey to $Map in map.dart.

Released in v0.7.2