closureParamError static method
Error text when a @LuaWidget param is a Dart function/closure.
Implementation
static String closureParamError({
required String className,
required String paramName,
required String dartType,
}) {
return '@LuaWidget parameter `$paramName` on `$className` cannot be a '
'Dart function/closure (got `$dartType`). Fluau cannot pass live '
'callbacks across the Lua↔Flutter bridge. Use `Map<String, dynamic>?` '
'(event payload) and dispatch via `PluginEventScope.dispatch` from the '
'widget; handle it in Lua `on_event`, or pass a Lua function that the '
'runtime registers as a reserved `action` event.';
}