Blame view

lib/common/blocs/timerbloc/timer_event.dart 675 Bytes
17a80689   liangchengyou   feat:倒计时功能开发
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  part of 'timer_bloc.dart';
  
  @immutable
  abstract class TimerEvent extends Equatable {
    const TimerEvent();
  
    @override
    List<Object> get props => [];
  }
  
  /// 开始事件
  class StartEvent extends TimerEvent {
    /// 定时器时间
    final int duration;
  
    const StartEvent({required this.duration});
  }
  
  /// 定时器事件
  class TickEvent extends TimerEvent {
    const TickEvent({required this.duration});
    /// 当前时间
    final int duration;
  
    @override
    List<Object> get props => [duration];
  }
  
  /// 暂停事件
  class PausedEvent extends TimerEvent {}
  
  /// 恢复状态
  class ResumedEvent extends TimerEvent {}
  
  /// 重置状态
  class ResetEvent extends TimerEvent {}