flutter_tools.dart 805 Bytes
Newer Older
1 2 3 4 5
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:async';
Devon Carew's avatar
Devon Carew committed
6
import 'dart:io';
7 8 9

import 'src/flx.dart' as flx;

10 11
/// Assembles a Flutter .flx file from a pre-existing manifest descriptor and a
/// pre-compiled snapshot.
12 13
Future<int> assembleFlx({
  Map manifestDescriptor: const {},
Devon Carew's avatar
Devon Carew committed
14
  File snapshotFile: null,
15 16 17 18 19 20 21 22 23 24 25 26
  String assetBasePath: flx.defaultAssetBasePath,
  String outputPath: flx.defaultFlxOutputPath,
  String privateKeyPath: flx.defaultPrivateKeyPath
}) async {
  return flx.assemble(
      manifestDescriptor: manifestDescriptor,
      snapshotFile: snapshotFile,
      assetBasePath: assetBasePath,
      outputPath: outputPath,
      privateKeyPath: privateKeyPath
  );
}