Skip to content

Commit 0bd36b6

Browse files
committed
Refactor: rename dart functions
1 parent f10d61b commit 0bd36b6

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

lib/modules/jsapi.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,21 +186,21 @@ class CoreCoder {
186186
instance.addTemplate(ctx,function, thisObject, argumentCount, arguments, exception);
187187
return nullptr;
188188
}
189-
189+
190190

191191
/// # ======== THE PRINT FUNCTION ========== # ///
192-
static Pointer flutterPrint(
192+
static Pointer jsPrint(
193193
Pointer ctx,
194194
Pointer function,
195195
Pointer thisObject,
196196
int argumentCount,
197197
Pointer<Pointer> arguments,
198198
Pointer<Pointer> exception) {
199-
instance._print(ctx, function, thisObject, argumentCount, arguments, exception);
199+
instance.print(ctx, function, thisObject, argumentCount, arguments, exception);
200200
return nullptr;
201201
}
202202

203-
Pointer _print(
203+
Pointer print(
204204
Pointer ctx,
205205
Pointer function,
206206
Pointer thisObject,

lib/modules/module_jsplugins.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class JsModule extends Module {
3434
var staticFunctions = JSStaticFunctionPointer.allocateArray([
3535
JSStaticFunctionStruct(
3636
name: 'print'.toNativeUtf8(),
37-
callAsFunction: Pointer.fromFunction(CoreCoder.flutterPrint),
37+
callAsFunction: Pointer.fromFunction(CoreCoder.jsPrint),
3838
attributes: JSPropertyAttributes.kJSPropertyAttributeNone,
3939
),
4040
JSStaticFunctionStruct(
@@ -79,27 +79,27 @@ class JsModule extends Module {
7979
jscore.JSStaticFunction(
8080
name: "writeFile",
8181
attributes: jscore.JSPropertyAttributes.kJSPropertyAttributeReadOnly,
82-
callAsFunction: Pointer.fromFunction(CoreCoder.flutterPrint)),
82+
callAsFunction: Pointer.fromFunction(CoreCoder.jsPrint)),
8383
jscore.JSStaticFunction(
8484
name: "appendFile",
8585
attributes: jscore.JSPropertyAttributes.kJSPropertyAttributeReadOnly,
86-
callAsFunction: Pointer.fromFunction(CoreCoder.flutterPrint)),
86+
callAsFunction: Pointer.fromFunction(CoreCoder.jsPrint)),
8787
jscore.JSStaticFunction(
8888
name: "readFile",
8989
attributes: jscore.JSPropertyAttributes.kJSPropertyAttributeReadOnly,
90-
callAsFunction: Pointer.fromFunction(CoreCoder.flutterPrint)),
90+
callAsFunction: Pointer.fromFunction(CoreCoder.jsPrint)),
9191
jscore.JSStaticFunction(
9292
name: "isExists",
9393
attributes: jscore.JSPropertyAttributes.kJSPropertyAttributeReadOnly,
94-
callAsFunction: Pointer.fromFunction(CoreCoder.flutterPrint)),
94+
callAsFunction: Pointer.fromFunction(CoreCoder.jsPrint)),
9595
jscore.JSStaticFunction(
9696
name: "isFile",
9797
attributes: jscore.JSPropertyAttributes.kJSPropertyAttributeReadOnly,
98-
callAsFunction: Pointer.fromFunction(CoreCoder.flutterPrint)),
98+
callAsFunction: Pointer.fromFunction(CoreCoder.jsPrint)),
9999
jscore.JSStaticFunction(
100100
name: "isDirectory",
101101
attributes: jscore.JSPropertyAttributes.kJSPropertyAttributeReadOnly,
102-
callAsFunction: Pointer.fromFunction(CoreCoder.flutterPrint)),
102+
callAsFunction: Pointer.fromFunction(CoreCoder.jsPrint)),
103103
];
104104
var classDef = jscore.JSClassDefinition(
105105
version: 0,

0 commit comments

Comments
 (0)