Closed yanweimin7 closed 9 months ago
sorry my pool english
I want add a element to list(exist outside of dart_eval) in dart_eval runtime. i use code like this
final a = Data(); a.name = "c"; DataManager().dataList.add(a);
it throw error:
type '$Data' is not a subtype of type 'Data' of 'value'
DataManager:
@Bind() class DataManager { static final DataManager singleton = DataManager.internal(); factory DataManager() { return singleton; } DataManager.internal(); List<Data> dataList = []; }
i think it's a bug from $List
when add element ,its should add value.$value.
(target!.$value as List).add(value.$value);
Fixed in v0.7.5 using the new writeback-capable $List.view() (see #162). If you re-run dart_eval bind it should automatically generate this for you.
$List.view()
dart_eval bind
sorry my pool english
I want add a element to list(exist outside of dart_eval) in dart_eval runtime. i use code like this
it throw error:
DataManager:
i think it's a bug from $List
when add element ,its should add value.$value.