Added basic app state with single timer
Signed-off-by: Andreas Fahrecker <AndreasFahrecker@gmail.com>
This commit is contained in:
parent
161d39aedc
commit
e004529eb8
23
lib/models/app_state.dart
Normal file
23
lib/models/app_state.dart
Normal file
@ -0,0 +1,23 @@
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:time_progress_calculator/models/timer.dart';
|
||||
|
||||
@immutable
|
||||
class AppState {
|
||||
final Timer timer;
|
||||
|
||||
AppState({this.timer});
|
||||
|
||||
AppState copyWith({Timer timer}) {
|
||||
return AppState(timer: timer ?? this.timer);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => timer.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is AppState &&
|
||||
runtimeType == other.runtimeType &&
|
||||
timer == other.timer;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user