Unverified Commit eae67f05 authored by Keerti Parthasarathy's avatar Keerti Parthasarathy Committed by GitHub

Make const available for classes that override AssetBundle (#31807)

parent 9937d3df
......@@ -5,7 +5,7 @@
import 'dart:async';
import 'package:args/args.dart';
import 'package:flutter_tools/src/asset.dart';
import 'package:flutter_tools/src/asset.dart' hide defaultManifestPath;
import 'package:flutter_tools/src/base/context.dart';
import 'package:flutter_tools/src/base/file_system.dart' as libfs;
import 'package:flutter_tools/src/base/io.dart';
......
......@@ -20,6 +20,8 @@ import 'globals.dart';
const AssetBundleFactory _kManifestFactory = _ManifestAssetBundleFactory();
const String defaultManifestPath = 'pubspec.yaml';
/// Injected factory class for spawning [AssetBundle] instances.
abstract class AssetBundleFactory {
/// The singleton instance, pulled from the [AppContext].
......@@ -36,11 +38,11 @@ abstract class AssetBundle {
bool wasBuiltOnce();
bool needsBuild({ String manifestPath = _ManifestAssetBundle.defaultManifestPath });
bool needsBuild({ String manifestPath = defaultManifestPath });
/// Returns 0 for success; non-zero for failure.
Future<int> build({
String manifestPath = _ManifestAssetBundle.defaultManifestPath,
String manifestPath = defaultManifestPath,
String assetDirPath,
String packagesPath,
bool includeDefaultFonts = true,
......@@ -69,7 +71,6 @@ class _ManifestAssetBundle implements AssetBundle {
DateTime _lastBuildTimestamp;
static const String defaultManifestPath = 'pubspec.yaml';
static const String _assetManifestJson = 'AssetManifest.json';
static const String _fontManifestJson = 'FontManifest.json';
static const String _fontSetMaterial = 'material';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment