Skip to content

This guide provides instructions on how to connect your FlutterFlow Studio project to a GitHub repository and manage custom code.

Connect a GitHub repo

In this section, we’ll learn how to connect your FlutterFlow Studio project to a GitHub repository. This includes creating a new repository, installing the FlutterFlow Studio GitHub App, and pushing your code to the repository.

Here’s how you do it:

  1. First, go to your GitHub account and create a new repository.

  1. Once the repository is created, install the FlutterFlow Studio GitHub App in your GitHub account.

  1. You can now push your code to the repository.

Manage Custom Code on GitHub

Writing custom code allows you to add features that are not supported by FlutterFlow Studio’s current functionality. This section outlines how you can manage custom code using GitHub to prevent FlutterFlow Studio from overriding it.

manage-custom-code

The diagram illustrates the flow or process of managing code in GitHub. This process allows you to leverage all the features from FlutterFlow Studio and deploy your app with a custom code.

Here’s a step-by-step explanation:

1. Connect FlutterFlow Studio to GitHub

First, set up the connection between your FlutterFlow Studio project and GitHub repository. Follow these steps if you haven’t already done so.

2. Establish a custom code branch

After pushing your FlutterFlow Studio code to GitHub, it lands in the flutterflow branch. To safeguard your custom modifications from being overwritten by future pushes, create a develop branch.

  1. Navigate to your GitHub repository.
  2. Switch from main to flutterflow in the branch dropdown.
  3. In the branch creation field, enter develop and create the branch from flutterflow.

3. Add custom code

Once your develop branch is ready, clone the repository to your local machine. Open the project in your IDE, switch to the develop branch, and add your custom code.

After making changes, commit and push them back to the develop branch.

4. Merge changes from FlutterFlow Studio

To integrate the latest updates of your FlutterFlow Studio project into your custom code:

  1. Create a pull request on GitHub from flutterflow to develop.
  2. Review and merge the changes, resolving any conflicts if necessary.

5. Final testing and deployment

After testing the changes in develop:

  1. Merge develop into main via a new pull request on GitHub.
  2. Once reviewed and merged, deploy your application from the main branch using FlutterFlow Studio’s deployment features.

Last updated on