Blame view

lib/common/blocs/timerbloc/timer_state.dart 671 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
  part of 'timer_bloc.dart';
  
  @immutable
  abstract class TimerState extends Equatable {
    /// 时间
    final int duration;
    /// 构造方法
    const TimerState(this.duration);
    @override
    List<Object> get props => [duration];
  }
  
  class TimerInitial extends TimerState {
    const TimerInitial(super.duration);
  }
  
  /// 暂停状态
  class PausedState extends TimerState {
    const PausedState(super.duration);
  }
  
  /// 运行状态
  class RunningState extends TimerState {
    const RunningState(super.duration);
  }
  
  /// 完成状态
  class FinishedState extends TimerState{
    const FinishedState() : super(0);
  }
  
  class BtnState extends TimerState {
    const BtnState(super.duration);
  }