events.dart 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import 'dart:typed_data';
  2. import 'enums.dart';
  3. abstract class VidPlayerEvent {}
  4. class VidPlayerStatusChangeEvent extends VidPlayerEvent {
  5. VidPlayerStatusChangeEvent(this.status);
  6. final VidPlayStatus status;
  7. }
  8. class VidPlayerSpeedChangeEvent extends VidPlayerEvent {
  9. VidPlayerSpeedChangeEvent(this.speed);
  10. final double speed;
  11. }
  12. class VidPlayerFrameIndexChangeEvent extends VidPlayerEvent {
  13. VidPlayerFrameIndexChangeEvent(
  14. this.index,
  15. this.bytes,
  16. this.width,
  17. this.height,
  18. );
  19. final int index;
  20. final int width;
  21. final int height;
  22. final Uint8List bytes;
  23. }
  24. class VidPlayerBrightnessChangeEvent extends VidPlayerEvent {
  25. VidPlayerBrightnessChangeEvent(this.brightness);
  26. final int brightness;
  27. }
  28. class VidPlayerContrastChangeEvent extends VidPlayerEvent {
  29. VidPlayerContrastChangeEvent(this.contrast);
  30. final int contrast;
  31. }
  32. class VidPlayerFilterChangeEvent extends VidPlayerEvent {
  33. VidPlayerFilterChangeEvent(this.filterMatrix);
  34. final List<double> filterMatrix;
  35. }
  36. class VidPlayResetToneEvent extends VidPlayerEvent {
  37. VidPlayResetToneEvent();
  38. }
  39. class VidPlayerPlayOverEvent extends VidPlayerEvent {
  40. VidPlayerPlayOverEvent();
  41. }