You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Flutter SDK depends on the Android and iOS SDK.
Ideally, the SDK would also have a pure Dart client that works on Desktop or we should embed a Native SDK for Desktop such as the Rust SDK.
@CaptainDario unfortunately not yet, but please upvote for gathering interest.
We'd need to write a pure Dart SDK (not depending on the Native SDKs such as Android and iOS for Desktop) or embed a Native SDK for Desktop, such as the Rust SDK.
However, adding macOS support should be easier since the iOS SDK supports a macOS target.
Which targets do you need? Win/Lin/macOS or all of them?
Thank you for the quick response! I upvoted this issue.
I would need support for all platforms. But I also see quite an opportunity in supporting these platforms for this package. Because firebase does not support desktop, and everybody needing desktop support will look somewhere else (just like me)
Reacted by Manoel Aranda Neto, InfoFlow and Muragijimana
Yes, the format is mentioned, but they did not mention (or I did not see) that the time needs to be normalized to UTC. When sending my time zone (UTC+1), the server did not return an error, it sent the same response as with UTC but the data was not visible in the dashboard.
If this is obvious, I am sorry to spam this issue, I thought somebody else may have the same problems.
is there a way to gracefully turn off posthog on unsupported platforms such as linux?
i have a codebase which i run for web (in production) and linux (for testing), so i'm happy with just the web support. but when i run on linux i get errors like:
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: MissingPluginException(No implementation found for method screen on channel posthog_flutter)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:368:7)
<asynchronous suspension>
#1 PosthogFlutterIO.screen (package:posthog_flutter/src/posthog_flutter_io.dart:60:7)
<asynchronous suspension>
#2 _ProgrammerScreenState.initState (package:bodybuild/ui/programmer/page/programmer.dart:227:5)
<asynchronous suspension>
@marandaneto wow! this looks good. i was thinking that we'd manually set the no-op mode based on the platform, but doing it automatically works even better I think.
It's so weird. On your website you claim you ship fast. But you could not ship a Windows Desktop support in 3 years?
That's a matter of prioritization and not speed of shipping
PostHog has support for many products, and a wide range of SDKs https://posthog.com/docs/libraries
Implementing this requires implementing a new SDK (pure Dart SDK?) that works across Win/Linux, since this is just a wrapper on top of Android/Apple/Web
Or try to compile another SDK for those platforms eg .NET SDK, Rust, Pure Java, etc, since they work across all platforms.
If you have a rust SDK can't you just use it and just forward the calls using dart? Also, can't it just call the Rest API directly?
I currently use a competitor product because of the lack of windows support on your side, I'm really interested in using your product instead. it's sad that your priorities doesn't match my need. I personally think windows support is a huge opportunity regarding dart desktop app (usually phone app with a window version)
@stephane-archer#170 (comment)
A Rust SDK already exists, but it's stateless (for backend use). We'd need to adapt and add a stateful mode as well, similar to our Node and RN SDKs, which share a core module.
@marandaneto Thanks for the clarification, and apologies if I’m missing something here. I understand that a stateful implementation would be needed to support the full feature set. That said, would it be possible to expose at least part of the functionality using the current Rust SDK as it stands?
Even partial Windows support would already be a meaningful step forward for us and might be sufficient to justify switching.
Activity
marandaneto commentedon Oct 9, 2023
A workaround, for now, would be to create a Flutter bridge and call a Native SDK via FFI, eg, Rust SDK
dariyooo commentedon Jan 14, 2024
Is there anything planned in regard to this?
I would like to switch to this plugin but I need desktop support.
marandaneto commentedon Jan 15, 2024
@CaptainDario unfortunately not yet, but please upvote for gathering interest.
We'd need to write a pure Dart SDK (not depending on the Native SDKs such as Android and iOS for Desktop) or embed a Native SDK for Desktop, such as the Rust SDK.
However, adding macOS support should be easier since the iOS SDK supports a macOS target.
Which targets do you need? Win/Lin/macOS or all of them?
dariyooo commentedon Jan 15, 2024
Thank you for the quick response! I upvoted this issue.
I would need support for all platforms. But I also see quite an opportunity in supporting these platforms for this package. Because firebase does not support desktop, and everybody needing desktop support will look somewhere else (just like me)
marandaneto commentedon Jan 15, 2024
A quick workaround, for now, is to just call the API directly until we provide first-class support for Flutter Desktop.
dariyooo commentedon Jan 15, 2024
I totally missed the direct API access, this seems like a good solution.
dariyooo commentedon Jan 15, 2024
@marandaneto How can I overwrite the default timestamp?
When I try to set it the events are not registered anymore in the web UI.
This works and the event is registered in the UI
this even is not registered.
However, in both cases, the return value is
"{status: 1}".Do you have an idea how to overwrite it?
Edit: It works I had the time filters set to 24h.
dariyooo commentedon Jan 15, 2024
For anybody finding this, the current time can be set with
(DateTime.now().toUtc()).toIso8601String().marandaneto commentedon Jan 15, 2024
Yes, the docs mention the ISO8601 format.
dariyooo commentedon Jan 15, 2024
Yes, the format is mentioned, but they did not mention (or I did not see) that the time needs to be normalized to UTC. When sending my time zone (UTC+1), the server did not return an error, it sent the same response as with UTC but the data was not visible in the dashboard.
If this is obvious, I am sorry to spam this issue, I thought somebody else may have the same problems.
[-]Desktop support[/-][+]Desktop (Windows/Linux) support[/+]marandaneto commentedon Jan 17, 2024
macOS support has landed at least https://github.com/PostHog/posthog-flutter/releases/tag/4.0.0-beta.2
stephane-archer commentedon May 15, 2024
I hope to see a Windows version even if it's a quick and dirty version with helpers that call the API directly.
1 remaining item
mcquenji commentedon Dec 29, 2024
I've put together a quick 'n dirty posthog dart client https://github.com/necodeIT/posthog_dart for anyone interested
Dieterbe commentedon Apr 1, 2025
is there a way to gracefully turn off posthog on unsupported platforms such as linux?
i have a codebase which i run for web (in production) and linux (for testing), so i'm happy with just the web support. but when i run on linux i get errors like:
i have tried a patch like:
but that just results in a black screen when i start the app on linux.
the only "solution" i see is wrapping every single call to Posthog()... with an kIsWeb check, obviously that's quite messy and i want to avoid that.
marandaneto commentedon Apr 7, 2025
re https://posthog.com/questions/flutter-sdk-disable-for-unsupported-targets
@Dieterbe I think we have to have a NoOp at least so it does nothing on Linux and Window
Dieterbe commentedon Apr 7, 2025
@marandaneto wow! this looks good. i was thinking that we'd manually set the no-op mode based on the platform, but doing it automatically works even better I think.
fingoldo commentedon Dec 15, 2025
It's so weird. On your website you claim you ship fast. But you could not ship a Windows Desktop support in 3 years?
marandaneto commentedon Feb 26, 2026
That's a matter of prioritization and not speed of shipping
PostHog has support for many products, and a wide range of SDKs https://posthog.com/docs/libraries
Implementing this requires implementing a new SDK (pure Dart SDK?) that works across Win/Linux, since this is just a wrapper on top of Android/Apple/Web
Or try to compile another SDK for those platforms eg .NET SDK, Rust, Pure Java, etc, since they work across all platforms.
Happy to review PRs btw!
stephane-archer commentedon Feb 26, 2026
If you have a rust SDK can't you just use it and just forward the calls using dart? Also, can't it just call the Rest API directly?
I currently use a competitor product because of the lack of windows support on your side, I'm really interested in using your product instead. it's sad that your priorities doesn't match my need. I personally think windows support is a huge opportunity regarding dart desktop app (usually phone app with a window version)
marandaneto commentedon Feb 27, 2026
@stephane-archer #170 (comment)
A Rust SDK already exists, but it's stateless (for backend use). We'd need to adapt and add a stateful mode as well, similar to our Node and RN SDKs, which share a core module.
stephane-archer commentedon Feb 28, 2026
@marandaneto Thanks for the clarification, and apologies if I’m missing something here. I understand that a stateful implementation would be needed to support the full feature set. That said, would it be possible to expose at least part of the functionality using the current Rust SDK as it stands?
Even partial Windows support would already be a meaningful step forward for us and might be sufficient to justify switching.
marandaneto commentedon Feb 28, 2026
#313 is a great start, no testing at all, just using claude do its best for now but its a PoC
andronedev commentedon Jun 5, 2026
any updates ?
marandaneto commentedon Sep 22, 2026
sorry we've not prioritized this yet, we'll be having a new planning tomorrow and i'll get you an update if its something we're gonna do soon
ivradonov commentedon Sep 25, 2026
Hello, do you have any updates on prioritization?
dustinbyrne commentedon Sep 30, 2026
hey there! we're currently reviewing #621 as a resolution for this. feel free to leave feedback if you try it out 🙌