DEV Community

Cover image for Get_cli Unhandled exception on flutter project.
Shahin Alam
Shahin Alam

Posted on

Get_cli Unhandled exception on flutter project.

Image descriptionIn this blog post, we will explore how to create a Flutter project using get_cli and discuss a temporary solution for a specific issue that you might encounter during the process.

Introducing get_cli
get_cli is a powerful command-line interface (CLI) tool for Flutter that enhances your development workflow by automating repetitive tasks. With get_cli, you can quickly generate code and project structures, saving you valuable time and effort.

Creating a Flutter Project with get_cli

To create a Flutter project using **get_cli**, follow these simple steps:

Step 1:

Ensure that you have Flutter and Dart installed on your system. If not, you can install them by referring to the official Flutter installation guide.

Step 2:

Open your terminal or command prompt.

Step 3:

Activate get_cli by running the following command:

flutter pub global activate get_cli
Enter fullscreen mode Exit fullscreen mode

Step 4:

Generate a new Flutter project by running the following command:

get create project
Enter fullscreen mode Exit fullscreen mode

By default, this command will create a project in the current directory with a name matching the folder's name. If you prefer a different project name, you can use the following command:

get create project:my_project
Enter fullscreen mode Exit fullscreen mode

Replace my_project with your desired project name.

Step 5:

Wait for the project creation process to complete. Once finished, you will have a new Flutter project set up with the chosen structure.

Now that you have created a Flutter project using get_cli, you can dive right into developing your app using the generated code and project structure.

Temporary Solution for a Specific Issue

While creating your Flutter project, you may encounter a situation where the --enable_deprecated_wait_for flag does not work on your OS installation. This flag is typically used to enable the deprecated wait For function in the dart:cli library.

As a temporary solution, you can attempt the following command to activate get_cli from a specific GitHub source:

flutter pub global activate --source=git https://github.com/inyong1/get_cli.git
Enter fullscreen mode Exit fullscreen mode

By executing this command, you can activate get_cli from the specified GitHub source, allowing you to utilize it with the deprecated wait For function. However, it's important to note that this solution is temporary and may not be applicable in all scenarios.

Keep in mind that both the --enable_deprecated_wait_for flag and the temporary solution mentioned above should be used cautiously since the wait For function is deprecated and will eventually be completely removed.

Top comments (0)