5package io.flutter.embedding.engine;
7import androidx.annotation.NonNull;
8import androidx.annotation.Nullable;
9import androidx.annotation.VisibleForTesting;
10import java.util.HashMap;
45 private final Map<String, FlutterEngine> cachedEngines =
new HashMap<>();
54 public boolean contains(@NonNull String engineId) {
55 return cachedEngines.containsKey(engineId);
65 return cachedEngines.get(engineId);
78 cachedEngines.put(engineId,
engine);
80 cachedEngines.remove(engineId);
88 public void remove(@NonNull String engineId) {
97 cachedEngines.clear();
static FlutterEngineCache getInstance()
void put(@NonNull String engineId, @Nullable FlutterEngine engine)
boolean contains(@NonNull String engineId)