mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-27 02:07:55 +00:00
76 lines
1.7 KiB
Dart
76 lines
1.7 KiB
Dart
// curtain_state.dart
|
|
import 'package:equatable/equatable.dart';
|
|
|
|
abstract class CurtainState extends Equatable {
|
|
const CurtainState();
|
|
|
|
@override
|
|
List<Object?> get props => [];
|
|
}
|
|
|
|
class CurtainInitial extends CurtainState {}
|
|
|
|
class UpdateCurtain extends CurtainState {
|
|
|
|
final double curtainWidth;
|
|
final double blindHeight;
|
|
final double openPercentage;
|
|
|
|
const UpdateCurtain({
|
|
required this.curtainWidth,
|
|
required this.blindHeight,
|
|
required this.openPercentage,
|
|
});
|
|
|
|
@override
|
|
List<Object?> get props => [curtainWidth, blindHeight, openPercentage];
|
|
}
|
|
|
|
class FailedState extends CurtainState {}
|
|
|
|
class CurtainLoadingState extends CurtainState {}
|
|
|
|
class CurtainsOpening extends CurtainState {
|
|
final double curtainWidth;
|
|
final double blindHeight;
|
|
final double openPercentage;
|
|
|
|
const CurtainsOpening({
|
|
required this.curtainWidth,
|
|
required this.blindHeight,
|
|
required this.openPercentage,
|
|
});
|
|
|
|
@override
|
|
List<Object?> get props => [curtainWidth, blindHeight, openPercentage];
|
|
}
|
|
|
|
class CurtainsClosing extends CurtainState {
|
|
final double curtainWidth;
|
|
final double blindHeight;
|
|
final double openPercentage;
|
|
|
|
const CurtainsClosing({
|
|
required this.curtainWidth,
|
|
required this.blindHeight,
|
|
required this.openPercentage,
|
|
});
|
|
|
|
@override
|
|
List<Object?> get props => [curtainWidth, blindHeight, openPercentage];
|
|
}
|
|
|
|
class CurtainsPaused extends CurtainState {
|
|
final double curtainWidth;
|
|
final double blindHeight;
|
|
final double openPercentage;
|
|
|
|
const CurtainsPaused({
|
|
required this.curtainWidth,
|
|
required this.blindHeight,
|
|
required this.openPercentage,
|
|
});
|
|
|
|
@override
|
|
List<Object?> get props => [curtainWidth, blindHeight, openPercentage];
|
|
} |