Book bridge example (not yet working)#161
Conversation
|
Was an error with the example, will be updated in next release. You can change the $new function in the $Book$bridge class to the following to fix: static $Value? $new(
Runtime runtime, $Value? target, List<$Value?> args) {
return $Book$bridge((args[0]!.$reified as List).cast());
} |
|
@ethanblake4 A new question.. I'd like to modify the list in the |
|
That specific use case isn't really supported with the built-in $List class currently. I created an issue to track it. You could make a custom $List wrapper that supports writeback via a type-mapper function, but if you want to do this now I'd suggest just making an addPage function or similar. |
|
This is now supported in v0.7.5 using the new |
@ethanblake4 Could you please have a look at this example? I've tried to reconstruct the Book bridge example from the
README.mdfile, but get the following error:dart_eval runtime exception: type 'List<$Value>' is not a subtype of type 'List<String>'