Flutter Engine
The Flutter Engine
|
Public Member Functions | |
boolean | contains (@NonNull String engineId) |
FlutterEngine | get (@NonNull String engineId) |
void | put (@NonNull String engineId, @Nullable FlutterEngine engine) |
void | remove (@NonNull String engineId) |
void | clear () |
Static Public Member Functions | |
static FlutterEngineCache | getInstance () |
Package Functions | |
FlutterEngineCache () | |
Static singleton cache that holds io.flutter.embedding.engine.FlutterEngine
instances identified by String
s.
The ID of a given io.flutter.embedding.engine.FlutterEngine
can be whatever
is desired.
String
FlutterEngineCache
is useful for storing pre-warmed io.flutter.embedding.engine.FlutterEngine
instances. io.flutter.embedding.android.FlutterActivity
and io.flutter.embedding.android.FlutterFragment
use the FlutterEngineCache
singleton internally when instructed to use a cached io.flutter.embedding.engine.FlutterEngine
based on a given ID. See io.flutter.embedding.android.FlutterActivity.CachedEngineIntentBuilder
and io.flutter.embedding.android.FlutterFragment#withCachedEngine(String)
for related APIs.
Definition at line 29 of file FlutterEngineCache.java.
|
inlinepackage |
Definition at line 48 of file FlutterEngineCache.java.
|
inline |
Removes all io.flutter.embedding.engine.FlutterEngine
's that are currently in the cache.
Definition at line 96 of file FlutterEngineCache.java.
|
inline |
Returns true
if a io.flutter.embedding.engine.FlutterEngine
in this cache is associated with the given engineId
.
Definition at line 54 of file FlutterEngineCache.java.
|
inline |
Returns the io.flutter.embedding.engine.FlutterEngine
in this cache that is associated with the given engineId
, or null
is no such io.flutter.embedding.engine.FlutterEngine
exists.
Definition at line 64 of file FlutterEngineCache.java.
|
inlinestatic |
Returns the static singleton instance of FlutterEngineCache
.
Creates a new instance if one does not yet exist.
Definition at line 38 of file FlutterEngineCache.java.
|
inline |
Places the given io.flutter.embedding.engine.FlutterEngine
in this cache and associates it with the given engineId
.
If a io.flutter.embedding.engine.FlutterEngine
already exists in this cache for the given engineId
, that io.flutter.embedding.engine.FlutterEngine
is removed from this cache.
Definition at line 76 of file FlutterEngineCache.java.
|
inline |
Removes any io.flutter.embedding.engine.FlutterEngine
that is currently in the cache that is identified by the given engineId
.
Definition at line 88 of file FlutterEngineCache.java.