{"id":723,"date":"2024-02-24T15:40:25","date_gmt":"2024-02-24T15:40:25","guid":{"rendered":"https:\/\/zerocodeskills.com\/?p=723"},"modified":"2024-02-24T15:40:31","modified_gmt":"2024-02-24T15:40:31","slug":"flutterflow-supabase-realtime-database-update","status":"publish","type":"post","link":"https:\/\/zerocodeskills.com\/flutterflow-supabase-realtime-database-update\/","title":{"rendered":"Beginner’s Guide to Flutterflow Supabase realtime database update"},"content":{"rendered":"\n

In today’s interconnected world, real-time data updates are essential for keeping users have access to the most up-to-date information at all times.<\/p>\n\n\n\n

Say you have an app built using FlutterFlow and data stored in SUPABASE<\/a>. You want any modification in your database to trigger an immediate update in your application interface.<\/p>\n\n\n\n

Whether it’s a change in a user’s age or the arrival of a new message in a chat app, real-time updates keep your users engaged and informed.<\/p>\n\n\n\n

Flutterflow Supabase realtime database update<\/h2>\n\n\n\n

The Challenge of Real-Time Implementation<\/strong><\/h3>\n\n\n\n

While SUPABASE offers real-time functionality, flutterflow does not support this feature with its supabase integration like the support flutterflow offers for firebase and to create this feature we will need a custom solution with  custom code.<\/p>\n\n\n\n

Crafting a Custom Solution<\/strong><\/h3>\n\n\n\n

First, login to your supabase dashboard<\/a> and make sure that realtime is selected on the supabase table that you want to monitor<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Next we will need to build a custom action in flutterflow <\/a>to perform this action so head over to your flutterflow app then click on the action builder and add a custom action. <\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n
\"\"<\/figure>\n\n\n\n

Building the Connection<\/strong><\/h3>\n\n\n\n

Let’s get practical. Firstly, we define the custom action name as “supabaseRealTime” within FlutterFlow<\/a>. <\/p>\n\n\n\n

This action will have parameters specifying the name of the target table and an action parameter. Once everything is set click on the boiler plate code to set it in the code editor.

<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Next add the body of the code pasted below;<\/p>\n\n\n\n