flutter_tools.dart 829 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
Future<int> assembleFlx({
Ian Hickson's avatar
Ian Hickson committed
13
  Map<String, dynamic> manifestDescriptor: const <String, dynamic>{},
Devon Carew's avatar
Devon Carew committed
14
  File snapshotFile: null,
15 16 17 18 19
  String assetBasePath: flx.defaultAssetBasePath,
  String outputPath: flx.defaultFlxOutputPath,
  String privateKeyPath: flx.defaultPrivateKeyPath
}) async {
  return flx.assemble(
Ian Hickson's avatar
Ian Hickson committed
20 21 22 23 24
    manifestDescriptor: manifestDescriptor,
    snapshotFile: snapshotFile,
    assetBasePath: assetBasePath,
    outputPath: outputPath,
    privateKeyPath: privateKeyPath
25 26
  );
}