registerWith static method
Implementation
static void registerWith(Registrar registrar) {
final channel = MethodChannel(
'posthog_flutter',
const StandardMethodCodec(),
registrar,
);
final instance = PosthogFlutterWeb();
channel.setMethodCallHandler(instance.handleMethodCall);
// Set the platform instance so that Posthog() can call methods directly
// on the web implementation instead of going through the method channel.
// This is required because method channels can only pass serializable data,
// not function callbacks like onFeatureFlags.
PosthogFlutterPlatformInterface.instance = instance;
}