build method

Future<BuildResult> build(
  1. String platform,
  2. {String? target,
  3. required Map<String, dynamic> arguments,
  4. Map<String, String>? environment}
)

Implementation

Future<BuildResult> build(
  String platform, {
  String? target,
  required Map<String, dynamic> arguments,
  Map<String, String>? environment,
}) {
  final builder = _builders.firstWhere((e) => e.match(platform, target));
  if (!builder.isSupportedOnCurrentPlatform) {
    throw UnsupportedError(
      '${builder.runtimeType} is not supported on the current platform',
    );
  }
  return builder.build(
    arguments: arguments,
    environment: environment,
  );
}