timer_state.dart 671 Bytes
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);
}