22 December, 2020

Flutter Commands List

 

Command to check flutter version:

D:\>flutter --version

Output:

Flutter 1.20.4 • channel unknown • unknown source

Framework • revision fba99f6cf9 (3 months ago) • 2020-09-14 15:32:52 -0700

Engine • revision d1bc06f032

Tools • Dart 2.9.2


 To generate an app bundle, run:

        flutter build appbundle --target-platform android-arm,android-arm64,android-x64

        Learn more on: 

    To split the APKs per ABI, run:

        flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi

        Learn more on:  

Resolve Conflicts: 

flutter packages pub run build_runner watch --delete-conflicting-outputs

Here is some useful command List:  run flutter help <command>  to get command related information

Command Name

Example

Comments

analyze

flutter analyze -d <DEVICE_ID>

Analyzes the project’s Dart source code.

Use instead of dartanalyzer.

assemble

flutter assemble -o <DIRECTORY>

Assemble and build flutter resources.

attach

flutter attach -d <DEVICE_ID>

Attach to a running application.

bash-completion

flutter bash-completion

Output command line shell completion setup scripts.

build

flutter build <DIRECTORY>

Flutter build commands.

channel

flutter channel <CHANNEL_NAME>

List or switch flutter channels.

config

flutter config --build-dir=<DIRECTORY>

Configure Flutter settings. To remove a setting, configure it to an empty string.

create

flutter create <DIRECTORY>

Creates a new project.

devices

flutter devices -d <DEVICE_ID>

List all connected devices.

doctor

flutter doctor

Show information about the installed tooling.

downgrade

flutter downgrade

Downgrade Flutter to the last active version for the current channel.

drive

flutter drive

Runs Flutter Driver tests for the current project.

emulators

flutter emulators

List, launch and create emulators.

format

flutter format <DART_FILE>

Format one or more dart files.

gen-l10n

flutter gen-l10n <DIRECTORY>

Generate localizations for the Flutter project.

install

flutter install -d <DEVICE_ID>

Install a Flutter app on an attached device.

logs

flutter logs

Show log output for running Flutter apps.

format

flutter format <DIRECTORY|DART_FILE>

Formats Flutter source code.

Use instead of dartfmt.

precache

flutter precache <ARGUMENTS>

Populates the Flutter tool’s cache of binary artifacts.

pub

flutter pub <PUB_COMMAND>

Works with packages.

Use instead of pub.

run

flutter run <DART_FILE>

Runs a Flutter program.

symbolize

flutter symbolize --input=<STACK_TRACK_FILE>

Symbolize a stack trace from the AOT compiled flutter application.

test

flutter test [<DIRECTORY|DART_FILE>]

Runs tests in this package.

Use instead of pub run test.

upgrade

flutter upgrade

Upgrade your copy of Flutter.


No comments:

Post a Comment

Microservices vs Monolithic Architecture

 Microservices vs Monolithic Architecture Here’s a clear side-by-side comparison between Microservices and Monolithic architectures — fro...