Make Flutter development easy with Getx and CLI tool

Bayu Nugroho
2 min readMay 1, 2021

On this occasion I want to share an easy way to develop flutter with Getx and Get CLI Tool

  • INTALL

pub global activate get_cli

// (to use this add the following to system PATH: [FlutterSDKInstallDir]\bin\cache\dart-sdk\bin
  • CREATE PROJECT
get create project:project_name

When creating a new project, 2 choices will appear, then select the flutter project. and then input a company’s domain (com.yourcompany)

taraa, project has been completed

  • INIT
get init 

Use this command with care it will overwrite all files in the lib folder. It allows you to choose between two structures, getx_pattern and clean.

  • CREATE PAGE (will create controller, view and binding)
get create page:page_name// To create a new controller in a specific folder:
// Note: you don't need to reference the folder,
// Getx will search automatically for the home folder
// and add your controller there.

this command allows you to create modules, it is recommended for users who chose to use getx_pattern.

  • CREATE CONTROLLER
get create controller:controller_name on your_folder

create a controller in a specific folder.

Using with option You can now create a template file, the way you prefer.

run

get create controller:auth with examples/authcontroller.dart on your_folder 

or with url run

get create controller:auth with 'https://raw.githubusercontent.com/jonataslaw/get_cli/master/samples_file/controller.dart.example' on your_folder 
  • CREATE SCREEN
get create screen:name

source : https://pub.dev/packages/get_cli

--

--

Bayu Nugroho

Passionate programmer obsessed with perfection. Enjoys creating web and mobile applications, exploring music, technical blogging, and more.