mirror of
https://github.com/wgh136/flutter_qjs.git
synced 2025-09-27 05:27:23 +00:00
v0.3.4
This commit is contained in:
@@ -58,7 +58,7 @@ class CodeInputController extends TextEditingController {
|
||||
String oldText = oldSpan.toPlainText();
|
||||
String newText = value.text;
|
||||
if (oldText == newText) return oldSpan;
|
||||
(spanCall?.timeout(Duration.zero) ?? Future.delayed(Duration.zero))
|
||||
(spanCall?.timeout(Duration.zero) ?? Future.value())
|
||||
.then((_) => spanCall = compute(_convert, value.text).then((lsSpan) {
|
||||
TextSpan newSpan = TextSpan(style: style, children: lsSpan);
|
||||
if (newSpan.toPlainText() == value.text) oldSpan = newSpan;
|
||||
|
@@ -53,7 +53,6 @@ class _TestPageState extends State<TestPage> {
|
||||
if (engine != null) return;
|
||||
engine = IsolateQjs(
|
||||
moduleHandler: (String module) async {
|
||||
if (module == "test") return "export default '${new DateTime.now()}'";
|
||||
return await rootBundle.loadString(
|
||||
"js/" + module.replaceFirst(new RegExp(r".js$"), "") + ".js");
|
||||
},
|
||||
|
Reference in New Issue
Block a user