mirror of
https://github.com/wgh136/flutter_qjs.git
synced 2025-09-27 13:27:24 +00:00
fix jsRef free error
This commit is contained in:
@@ -41,11 +41,11 @@ abstract class JSRef {
|
|||||||
if (cache.contains(obj)) return;
|
if (cache.contains(obj)) return;
|
||||||
if (obj is List) {
|
if (obj is List) {
|
||||||
cache.add(obj);
|
cache.add(obj);
|
||||||
obj.forEach((e) => _callRecursive(e, cb, cache));
|
List.from(obj).forEach((e) => _callRecursive(e, cb, cache));
|
||||||
}
|
}
|
||||||
if (obj is Map) {
|
if (obj is Map) {
|
||||||
cache.add(obj);
|
cache.add(obj);
|
||||||
obj.values.forEach((e) => _callRecursive(e, cb, cache));
|
obj.values.toList().forEach((e) => _callRecursive(e, cb, cache));
|
||||||
}
|
}
|
||||||
if (obj is JSRef) {
|
if (obj is JSRef) {
|
||||||
cb(obj);
|
cb(obj);
|
||||||
|
@@ -151,4 +151,4 @@ packages:
|
|||||||
version: "2.1.0-nullsafety.5"
|
version: "2.1.0-nullsafety.5"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.12.0-0.0 <3.0.0"
|
dart: ">=2.12.0-0.0 <3.0.0"
|
||||||
flutter: ">=1.20.0 <2.0.0"
|
flutter: ">=1.20.0"
|
||||||
|
Reference in New Issue
Block a user