isModelCached method

Future<bool> isModelCached(
  1. String filename
)

Check if a model is cached in OPFS

Returns true if the file exists in OPFS.

Implementation

Future<bool> isModelCached(String filename) async {
  try {
    final result = await _opfs.isModelCached(filename.toJS).toDart;
    return result.toDart;
  } catch (e) {
    debugPrint('[WebOPFSService] Error checking cache for $filename: $e');
    return false;
  }
}