Flutter - Project Setup with GetX CLI Tool
Last Updated :
21 Apr, 2025
In this article, we will learn how to set up or file structure our Flutter project using get_cli. You might be aware of the GetX state management. If not, let us explain to you all the things so that you are familiar with these terms. State Management is to manage the things between 2 or more screens or in a complete app. It helps to create heavy applications and sustain data on every screen. GetX is one of the state management tools, dependency managers, and navigation managers that we are using in Flutter. Previously, it was limited to state management only. A command line interface (CLI) is a text-based interface where you can input commands that interact with a computer's operating system. Let's learn how to add get_cli to the Flutter project and maintain app structure, dependencies, and many more. In the time of automation, you should not create the UI structure manually when you can do it through a single command.
Step-by-Step Implementation
Step 1: Install the get_cli on your device
You can install the CLI on your system
Dart
flutter pub global activate get_cli
Step 2: Create a Flutter project
Create a new Flutter application using the command Prompt. To create a new app, write the following command and run it.
Dart
To know more about it refer this article: Creating a Simple Application in Flutter
Or you can create a project from get_cli
Dart
If you have an existing project, you can use the following command to generate the structure.
Dart
It will ask you to choose one of the options below
- GetX Pattern (by Kauê)
- CLEAN (by Arktekko)
Choose "Getx pattern" by pressing "1" and Enter.
If your project's lib folder contains any code, then it will ask for your permission to override it. So, answer accordingly.
It will create a folder structure like this
Step 3: Create a page using the command
Create a page that will contain a controller, view, and binding with the page name that you provide.
Dart
get create page:page_name
It will create a folder structure like this.

It will have a view file where you will create a UI like a textfield, text, column, and row. Controllers will contain API calls and navigation, and data where you will set the data. Bindings are classes where we can declare our dependencies and then ‘bind’ them to the routes. From the below command, you can manage the app from the CLI, as you now have access to get commands. Let's understand how to handle different things
1. To generate a model file
Dart
get generate model on home with assets/models/user.json
Here assets/models/user.json is the kind of data for which you want to create the model file.
2. Add the package
Dart
Here, http is the package name you want to add to your project.
3. To remove the package
This is to remove the package from the app
Dart
4. To generate a localization file
Dart
get generate locales assets/locales
assets/locales is the path name where we have to create a locales file.
5. To install the dev dependency
Dart
get install flutter_launcher_icons --dev
6. To update the get_cli
To update the get cli.
Dart
You have successfully learnt the basics of get_cli from the above command. Hope you have understood all the things.
Similar Reads
Flutter - GestureDetector Widget
A GestureDetector is a very useful Flutter widget that allows you to recognize and respond to various touch gestures, such as taps, swipe, double taps, drags, and more. It provides a way to make your Flutter app interactive and responsive to user input. In this article, we are going to implement and
4 min read
Flutter - Load Images with image.file
In this article, we will learn how to show file images in Flutter. There is an image widget available in Flutter. In that, you may have to use Image.network, Image.asset, Image.memory. But have you used Image.file? Maybe you have used it. If not then Let's learn about this. Sometimes we have to show
4 min read
Flutter - Passing Multiple Data with GetX
GetX is a state management library for Flutter that provides a simple and powerful way to manage the state of your application. It provides various features like State management, Routing, etc. Passing back the Data from the Second Screen to the First Screen involves State Management. To achieve thi
5 min read
Flutter - Set the Height of the AppBar
In Flutter, the AppBar widget has a default height of 56 logical pixels. If you want to increase the height of the AppBar, you can use the toolbarHeight property. How to Use?Dart AppBar( toolbarHeight: 120, title: // tittle of the appbar ), Step By Step Implementation Step 1: Create a New Project in
3 min read
Build Responsive UI with Flutter
In this article, we'll go over the different widgets using which we can build responsive applications with Flutter. 1. The LayoutBuilder: Builds a widget tree that can depend on the parent widget's size. This is useful if we want to change or hide something depending on the parent size. Dart LayoutB
4 min read
10 Best Flutter Projects with Source Code in 2025
Are you eager to begin your journey into Flutter app development but find yourself unsure of where to start? Look no further! This article serves as a comprehensive guide for aspiring developers, offering a wide range of innovative Flutter project ideas. Whether you're looking to refine your skills
7 min read
Flutter - Android Studio Not Showing Project Files
There are a couple of errors that come up while making an Android app. Making the project requires less time rather than debugging the same project with errors. One such error is that when we develop a project and when we open it after a few days it does not show us the files present in the folder,
3 min read
How to Get the Height of a Widget in Flutter?
To get the height of a widget in Flutter, you can use the LayoutBuilder widget to obtain the constraints of the parent container and then get the height from those constraints. How to use it? You can simply use this widget anywhere in your project as you needed that. LayoutBuilder( builder: (BuildCo
3 min read
Flutter Projects From Beginner to Advanced
Flutter is an open-source UI software development kit created by Google, designed for building natively compiled applications for mobile, web, and desktop from a single codebase. It uses the Dart programming language and provides a rich set of pre-designed widgets, allowing developers to create visu
4 min read
Flutter - Display Text Over the Image
In this article, we will implement How the set the text on over the Image in Flutter. A sample image is given below to get an idea about what we are going to do in this article. Â Approach In Data structure everyone knows the stack linear data structure, Stack is nothing just placing an item one over
3 min read