Skip to content

Commit f10d61b

Browse files
committed
Update jsapi.dart
1 parent a8a3ce9 commit f10d61b

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

lib/modules/jsapi.dart

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ class CoreCoder {
9494
static CoreCoder? _instance;
9595
static CoreCoder get instance{
9696
_instance ??= CoreCoder();
97-
_printDartFunc = _instance!._print;
9897
return _instance!;
9998
}
10099

@@ -188,10 +187,6 @@ class CoreCoder {
188187
return nullptr;
189188
}
190189

191-
/*static JSObjectCallAsFunctionCallbackDart? get jsAddTemplate{
192-
return _jsAddTemplate;
193-
}*/
194-
195190

196191
/// # ======== THE PRINT FUNCTION ========== # ///
197192
static Pointer flutterPrint(
@@ -201,16 +196,10 @@ class CoreCoder {
201196
int argumentCount,
202197
Pointer<Pointer> arguments,
203198
Pointer<Pointer> exception) {
204-
if (_printDartFunc != null) {
205-
_printDartFunc!(
206-
ctx, function, thisObject, argumentCount, arguments, exception);
207-
}
199+
instance._print(ctx, function, thisObject, argumentCount, arguments, exception);
208200
return nullptr;
209201
}
210202

211-
static JSObjectCallAsFunctionCallbackDart?
212-
_printDartFunc; // points to non static function
213-
214203
Pointer _print(
215204
Pointer ctx,
216205
Pointer function,

0 commit comments

Comments
 (0)