local_build 0.2.1 copy "local_build: ^0.2.1" to clipboard
local_build: ^0.2.1 copied to clipboard

Extensible local Flutter build and release orchestration.

example/local_build_example.dart

import 'dart:io';

import 'package:local_build/local_build.dart';

/// Previews a configured build without invoking Flutter or any publisher.
///
/// Run this example from a Flutter project that has a Local Build YAML file:
///
/// ```sh
/// dart run example/local_build_example.dart .local-build.yaml development
/// ```
Future<void> main(List<String> arguments) async {
  if (arguments.isEmpty) {
    stderr.writeln(
      'Usage: dart run example/local_build_example.dart '
      '<config-path> [profile]',
    );
    exitCode = 64;
    return;
  }

  await runLocalBuild([
    'build',
    '--config',
    arguments.first,
    '--profile',
    arguments.length > 1 ? arguments[1] : 'development',
    '--dry-run',
  ]);
}