acrolink
I thought of rendering the HTML containg the LiveView components using webview, but I prefer a more native way. How to achieve that ? Is there any helper libraries to use with Flutter (providing a similar experience to LiveView in the mobile applicatiin while communicating with a Phoenix back-end application) ?
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
arcanemachine
There’s a Dart package for interacting with Phoenix Channels:
I haven’t used it but it looks to be under active development.
There’s also a tutorial on GitHub showing how to put the pieces together:
https://github.com/dwyl/flutter-phoenix-channels-demo
Again, I haven’t done this tutorial, but I found the dwyl tutorials on GitHub to be very good when I was learning Phoenix.
Also, when I did go down this road, I did embed webviews into a Flutter app. The webview content can communicate with the “native” Flutter widgets via JS message passing. So your web stuff can be plain LiveView, and you can still interact with “native” Flutter widgets. Best of both worlds IMO since your web stuff can be reused on your mobile app. I encourage you to take a look at that before you make up your mind. (If you do, I found that this Dart webview package is way better than the official one, which was barely useable when I tried it ~2 years ago.)
jack456jokky
That sounds like a fascinating challenge! If you’re aiming for a seamless experience like LiveView in Flutter, have you considered using Flutter’s stream and StreamBuilder? They can handle real-time data efficiently. Plus, integrating Phoenix Channels with Flutter can give you that native feel while keeping everything in sync. Excited to see where this project takes you!
Nicodemus
Another option might be LiveView Native… I think it would be theoretically possible to embed both LVN and Flutter in a single app for different parts of it, wherever it makes sense. Of course, LVN is not yet ready, but something to keep an eye on.
LostKobrakai
I don’t think this has been mentioned yet, but LV does use more than just a phoenix channels client. The client would need to implement an alternative to morphdom and it would need to implement a resolver for the template diffing structure LV uses to send diffs on the wire. Then there’s all the event integrations for clicks, submits, … LiveView Native did invest a lot to make those things work for iOS and android. They do however have a shared library in rust, so they don’t duplicate work between the platforms. Maybe that one could (eventually) be used to power a flutter based approach as well. Though if you can go native why use flutter then I guess.
outlog
There is this PoC GitHub - alex-min/live_view_native_flutter_client: A flutter client for LiveView Native · GitHub, Releasing LiveView native with Flutter preview ⋅ Alex-min's tech blog
most likely a bit outdated by now..
acrolink
In the Flutter Application I will use
Firebsase Authentication. Do you think it will be possible to initiate the authentication in Flutter natively and use theFirebase access tokeninside thewebview?! I mean to send theaccess tokeninside theconnof LiveView inside thewebview?arcanemachine
If there is a reason that you can’t just use Postgres, you could probably make it work.
I have wrapped the
mix phx.gen.authgenerators to work with an external token before. It isn’t super difficult to do.But it would be way easier if you could just do the auth in Phoenix, and use that auth token to determine which screens should be displayed in the Flutter app.
acrolink
I need to authenticate the user in order to retrieve his personalized data .. Not just a matter of allowing or preventing access to certain pages.
arcanemachine
OK and where is this personalized data stored? In Postgres or Firebase?
I don’t remember if Phoenix has out-of-the-box bearer auth token support, but you can modify the
phx.gen.authgenerators to support this.acrolink
Postgres, will be eventually on AWS Aurora (Postgres based) with all nodes (Phoenix instances) accessing the same DB.
I guess even if I will be using an embedded
webviewin the smartphone application, I can still initiate theFirebase authenticationnatively inFlutterand then use the access token in order to initiate the socket connection, which will on Phoenix side, on connect event, look up the UID inPostgreSQLand assigns it toconn.assignsand that’s it.