Deleted abstract Action class and created LoadTimersAction,
TimersLoadedAction, TimersNotLoadedAction, AddTimerAction, UpdateTimerAction and DeleteTimerAction Signed-off-by: Andreas Fahrecker <AndreasFahrecker@gmail.com>
This commit is contained in:
parent
ec9b637198
commit
65fc97c9d1
@ -1,9 +1,30 @@
|
||||
import 'package:time_progress_calculator/models/timer.dart';
|
||||
|
||||
abstract class Action {}
|
||||
class LoadTimersAction {}
|
||||
|
||||
class UpdateTimerAction extends Action {
|
||||
class TimersLoadedAction {
|
||||
final List<Timer> timers;
|
||||
|
||||
TimersLoadedAction(this.timers);
|
||||
}
|
||||
|
||||
class TimersNotLoadedAction {}
|
||||
|
||||
class AddTimerAction {
|
||||
final Timer timer;
|
||||
|
||||
AddTimerAction(this.timer);
|
||||
}
|
||||
|
||||
class UpdateTimerAction {
|
||||
final String id;
|
||||
final Timer updatedTimer;
|
||||
|
||||
UpdateTimerAction(this.updatedTimer);
|
||||
}
|
||||
UpdateTimerAction(this.id, this.updatedTimer);
|
||||
}
|
||||
|
||||
class DeleteTimerAction {
|
||||
final String id;
|
||||
|
||||
DeleteTimerAction(this.id);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user