FluppyEvent class abstract

Base class for all Fluppy events.

Core events extend this class. Plugins can also extend this class to define plugin-specific events (e.g., S3PartUploaded).

Use pattern matching to handle events:

fluppy.events.listen((event) {
  switch (event) {
    case FileAdded(:final file):
      print('Added: ${file.name}');
    case UploadProgress(:final file, :final progress):
      print('${file.name}: ${progress.percent}%');
    case UploadComplete(:final file):
      print('Complete: ${file.name}');
    case UploadError(:final file, :final error):
      print('Error: $error');
    case S3PartUploaded(:final file, :final part):
      print('S3 part ${part.partNumber} uploaded');
    default:
      // Handle other events or ignore
  }
});
Implementers

Constructors

FluppyEvent()
const

Properties

file FluppyFile
The file associated with this event.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited