FlutterService class
Provides utilities for executing Flutter and Dart commands.
Resolves commands based on the project configuration, including FVM support, and exposes common development, generation, and build operations.
Constructors
- FlutterService(InitConfig config)
-
Creates a Flutter service using the provided project
config.
Properties
- config → InitConfig
-
The project configuration used to resolve Flutter and Dart commands.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
analyze(
{String target = 'lib'}) → Future< void> -
Analyzes the specified
target. -
build(
List< String> args) → Future<void> -
Runs a Flutter build command with the provided
args. -
buildRunner(
) → Future< void> - Runs build runner to generate project files.
-
clean(
) → Future< void> -
Runs
flutter clean. -
fix(
) → Future< void> - Applies automated Dart fixes to the project.
-
format(
{String target = 'lib'}) → Future< void> -
Formats Dart files in the specified
target. -
genL10n(
) → Future< void> - Generates Flutter localization files.
-
launcherIcons(
) → Future< void> -
Generates launcher icons using
flutter_launcher_icons. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postGenerate(
{bool buildRunner = false, bool format = true, bool genL10n = false}) → Future< void> - Executes configured post-generation tasks.
-
pubGet(
) → Future< void> -
Fetches project dependencies using
flutter pub get. -
run(
List< String> args) → Future<void> -
Runs the Flutter application with the provided
args. -
runDart(
List< String> args) → Future<void> -
Executes a Dart command with the provided
args. -
runFlutter(
List< String> args) → Future<void> -
Executes a Flutter command with the provided
args. -
runPub(
List< String> args) → Future<void> -
Executes a Flutter pub command with the provided
args. -
toString(
) → String -
A string representation of this object.
inherited
-
watchBuildRunner(
) → Future< void> - Runs build runner in watch mode.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited