In this tutorial, we'll learn how to connect Xano, a powerful no-code backend platform, to FlutterFlow, a popular app development tool. By the end, you'll have a fully functional to-do list application that allows users to sign up, log in, and perform CRUD (Create, Read, Update, Delete) operations on tasks. Let's get started!
First, let's set up the necessary APIs in Xano. We'll be using the "To-Do List" template from the Xano Marketplace with a few modifications, along with the "BasicAuth" starter template for authentication.
In Xano, navigate to the "To-Do APIs" section. Here, we'll only need the POST, GET, and DELETE APIs.
Open the POST API and take note of the following:
Open the GET API and note the custom query to-do.userId = auth.id, which fetches tasks for the authenticated user.
The DELETE API should be straightforward, allowing the user to delete a task.
In FlutterFlow, create a new project called "XanoToDo" based on the blank app template.
Delete the default "Home" page and create two new pages: "Login" and "Home."
On the "Login" page, add the "Authenticate Solo Alt" widget and remove any unnecessary components like "Forget Password."
On the "Home" page, add a tab bar with three tabs: "To Do," "Work in Progress," and "Done." Remove any dummy data or actions from the template.
In FlutterFlow, go to the API Calls section and create a new POST API call named "Xano Login."
Set the endpoint URL to the Xano Basic Auth Login API.
Add two variables: email and password (type: stream).
In the body section, paste the schema from Xano's Swagger UI documentation.
Replace the dummy data with the email and password variables.
On the "Login" page, click the "Sign In" button and set up an action flow:
email and password variables.auth_token.Create a new POST API call named "Xano Sign Up" and set the endpoint URL to the Xano Basic Auth Sign Up API.
Add three variables: name, email, and password (type: string).
In the body section, paste the schema from Xano's Swagger UI documentation and replace the dummy data with the variables.
On the "Sign Up" page, click the "Create Account" button and set up an action flow:
name, email, and password variables.email and password to log in the user after sign-up.auth_token.In FlutterFlow, create a new GET API call named "Get User Data" with the endpoint URL from the Xano "To-Do" API.
Add a header with Authorization: Bearer {auth_token} and a variable auth_token (type: string).
In the response section, create JSON path variables for the required data (e.g., card_id, user_id, category_to_do, category_work_in_progress, category_done).
On the "Home" page, click the tab bar and set up a backend query using the "Get User Data" API call, passing the auth_token from the local state.
On each tab ("To Do," "Work in Progress," "Done"), generate dynamic cards based on the corresponding category JSON path variable.
Set up the card UI to display the task name, image (if available), due date, and priority status.
In FlutterFlow, create a new DELETE API call named "Delete" with the endpoint URL from the Xano "To-Do" API.
Add a variable id (type: int) for the task ID.
On each dynamic card, set up an action flow for the delete icon:
id from the card's JSON path.In FlutterFlow, create a new POST API call named "Create Card" with the endpoint URL from the Xano "To-Do" API.
Add variables for the required fields (e.g., task, user_id, due_date, important, category, image).
In the body section, initialize each variable and set it to the corresponding value.
Create a new tab called "Add" with a form containing text fields for task name, category, a switch for priority status, a date picker, and a button to submit the new card.
On the "Submit" button, set up an action flow:
Delete any remaining dummy containers or actions from the template.
Set up a conditional visibility for the date picker text to prevent errors when no date is selected.
Test the application by running it in FlutterFlow and ensuring all functionalities work as expected.
Congratulations! You've successfully connected Xano to FlutterFlow and created a fully functional to-do list application with authentication, data management, and dynamic UI rendering. Feel free to explore and customize the project further to suit your needs.
Join 100,000+ people already building with Xano.
Start today and scale to millions.
Start building for free