WebAssetSourceHandler class
Handles installation of models from Flutter assets on web platform
On web, Flutter assets are served by the web server at paths like:
- assets/models/gemma.task
- assets/lora/weights.bin
This handler:
- Registers the asset URL with WebFileSystemService
- Saves metadata to ModelRepository
- MediaPipe loads directly from the URL (no file copy)
Features:
- No file copying (web has no local file system)
- Direct URL registration for MediaPipe
- Simulated progress for UX consistency
- Instant "installation" (assets already bundled)
Platform: Web only
- Implemented types
Constructors
- WebAssetSourceHandler({required WebFileSystemService fileSystem, required ModelRepository repository})
Properties
- fileSystem → WebFileSystemService
- 
  
  final
- hashCode → int
- 
  The hash code for this object.
  no setterinherited
- repository → ModelRepository
- 
  
  final
- runtimeType → Type
- 
  A representation of the runtime type of the object.
  no setterinherited
Methods
- 
  install(ModelSource source, {CancelToken? cancelToken}) → Future< void> 
- 
  Installs the model from the given source
  override
- 
  installWithProgress(ModelSource source, {CancelToken? cancelToken}) → Stream< int> 
- 
  Installs the model with progress tracking
  override
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a nonexistent method or property is accessed.
  inherited
- 
  supports(ModelSource source) → bool 
- 
  Checks if this handler supports the given source type
  override
- 
  supportsResume(ModelSource source) → bool 
- 
  Checks if this source supports resume after interruption
  override
- 
  toString() → String 
- 
  A string representation of this object.
  inherited
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  inherited