From the course: Flutter Essential Training: Build for Multiple Platforms

Using the GitHub exercise files

- [Instructor] Here is the GitHub repository that is associated with your LinkedIn learning course. There are branches for both the start and end states of each video where we work on code. You can view a list of all the branches here in GitHub from this branch dropdown. For example, if you wanted to find the start state for a video, which is 03_04, Which is "Placing and Alignments" video, you can change to this 03_04_b branch and you will get the beginning state of this video. And the ending state, which is what you will end up building by the end of this video, the code for that is available in 03_04_e branch. There are multiple ways to work with this project in Android Studio. One simple way is to copy the URL that you get when you click on this code and, in HTTPS here, you can get the URL here, and you can copy this and go back to Android Studio. Here, you can do get from version control, and here, you can add the URL that you just copied. You can change the directory name here, suppose I can make this demo slash something, and now you can press on clone. So now this will clone the repository that we have here with all the branches that is available. So finally, we have the repository here in our Android Studio, but our application code is in this chat_app directory, and you would want to work with this separately so that Android Studio can recognize this separately as a Dart project. So here in file, you can just open the chat_app separately inside learning-flutter. So here, we have the learning-flutter directory, and inside, we have the chat_app. Now we can just open this here to this window itself, and here, we can trust the project in Android Studio. And now, if you can see, this has a Flutter logo associated with this project because Android Studio recognizes this as a Flutter project now. Now, you must do flutter pub get, which you can get the command right here, or you can go to terminal and do flutter pub get. So the command is already running, and it typically takes longer when the project loads for the very first time. Once it's complete, you will be ready to work with this version of the code. By default, it is going to be at the main branch. If you can see in the bottom down of your Android Studio, here, you can check out a different branch. Suppose, like we were talking about, 03_04. So here, we can click on this and check out, and this will create a local version of 03_04_b branch. Let's make sure that we do flutter pub get every time you check out a new branch so that all our resources are ready for us to run this Flutter project. Once this is complete, we are now ready to work with this particular code as 03_04_b. If you run into trouble checking out the different branches or using Git in general, I recommend searching the library for the Git essential training videos.

Contents