setEventHandler method
Sets the function that receives native events, or null to stop.
Implementation
@override
void setEventHandler(CarEventHandler? handler) {
methodChannel.setMethodCallHandler(
handler == null
? null
: (call) => handler(
call.method,
Map<String, Object?>.from(
(call.arguments as Map<Object?, Object?>?) ?? const {},
),
),
);
}