Class FlutterEngineCache

    • Method Detail

      • getInstance

        @NonNull
        public static FlutterEngineCache getInstance()
        Returns the static singleton instance of FlutterEngineCache.

        Creates a new instance if one does not yet exist.

      • contains

        public boolean contains​(@NonNull
                                String engineId)
        Returns true if a FlutterEngine in this cache is associated with the given engineId.
      • put

        public void put​(@NonNull
                        String engineId,
                        @Nullable
                        FlutterEngine engine)
        Places the given FlutterEngine in this cache and associates it with the given engineId.

        If a FlutterEngine already exists in this cache for the given engineId, that FlutterEngine is removed from this cache.

      • remove

        public void remove​(@NonNull
                           String engineId)
        Removes any FlutterEngine that is currently in the cache that is identified by the given engineId.
      • clear

        public void clear()
        Removes all FlutterEngine's that are currently in the cache.