blob: 6f9dae3d15405f9958c29b35b6ba4d08ca4483ef [file] [log] [blame]
// Copyright 2014 The Flutter 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 'asset.dart' show FlutterHookResult;
import 'base/context.dart' show context;
import 'base/logger.dart' show Logger;
import 'build_info.dart' show TargetPlatform;
import 'build_system/build_system.dart' show Environment;
FlutterHookRunner? get hookRunner => context.get<FlutterHookRunner>();
/// This is the interface used to run hooks.
///
/// To not need `isolated/` imports, we use this interface to be passed around
/// everywhere. It's implementation can run the build and link hooks during a
/// Flutter build/run/test/etc.
abstract interface class FlutterHookRunner {
Future<FlutterHookResult> runHooks({
required TargetPlatform targetPlatform,
required Environment environment,
required Logger? logger,
});
}