f
a simple shortcut, command line interface (cli) for a lazy (a.k.a effective) flutter developer in order to increase productivity and happiness.
installation
activate f cli from your terminal using this command.
pub global activate f
create new project
use this f command to create a flutter project:
f c myapp
cd myapp
it’s similar with using command flutter create myapp
.
to create a flutter project with some predefined dependencies, you can list the dependencies after your project name like this:
f c myapp path intl http provider
cd myapp
the above command will automatically create myapp
project in the myapp
directory, then automatically install all the required dependencies (in this example: path, intl, http, and provider).
feel free to add as many dependencies as you want.
you can also pass other arguments, such as project name, the organization name, or to specify the programming language used for the native platform:
f c --p myapp --org dev.flutter --a kotlin --i swift myapp path intl http provider
cd myapp
run project
to run a flutter project, you can use this command:
f r
it’s similar with using command flutter run
.
to run project as flutter run --profile
, use:
f rp
to run project as flutter run --release
, use:
f rr
other commands
the list of other f commands that you can use to increase productivity with flutter.
command | description |
---|---|
f a -d device_id |
analyzes the project’s dart source code. alias of flutter analyze |
f as -o directory |
assemble and build flutter resources. alias of flutter assemble |
f at -d device_id |
attach to a running application. alias of flutter attach |
f b directory |
flutter build commands. alias of flutter build |
f bs directory |
flutter build commands with split per abi. alias of flutter build --split-per-abi |
f ch channel_name |
list or switch flutter channels. alias of flutter channel |
f dev -d device_id |
list all connected devices. alias of flutter devices |
f doc |
show information about the installed tooling. alias of flutter doctor |
f drv |
runs flutter driver tests for the current project. alias of flutter drive |
f e |
list, launch and create emulators. alias of flutter emulators |
f f directory|dart_file |
formats flutter source code. alias of flutter format |
f i -d device_id |
install a flutter app on an attached device. alias of flutter install |
f l |
show log output for running flutter apps. alias of flutter logs |
f t [directory|dart_file] |
runs tests in this package. alias of flutter test |
f up |
upgrade your copy of flutter. alias of flutter upgrade |
f down |
downgrade flutter to the last active version for the current channel. alias of flutter downgrade |
Comments are closed.