generate method
void
generate({})
Generates necessary code for a SteamParam
Implementation
void generate({
required IOSink fileSink,
bool withDart = false,
bool withFunctionDart = false,
bool withFunctionC = false,
bool withName = false,
bool withCaller = false,
}) {
Token token = type.toToken();
if (withDart) {
fileSink.write(token.typeDart);
}
if (withFunctionDart) {
fileSink.write(token.typeFfiDart);
}
if (withFunctionC) {
fileSink.write(token.typeFfiC);
}
if (withName) {
fileSink.write(" ${name.clearSteamNaming().camelCase}");
}
if (withCaller) {
fileSink.write(
" ${token.caller.replaceAll("{0}", name.clearSteamNaming().camelCase)}",
);
}
fileSink.write(",");
}