Feature/basic app (#1)
Feature/Basic App (#1) Basic App Structure Consists of Time Progress Dashboard, Time Progress Detail View and Time Progress Creator. All of these have an AppDrawer with a Link To the Dashboard and all your Track Time Progresses, also an About Button. Commits: * Undetailed Commit more work * Changed isEditing ? in Detail Screen and Extracted FAB row to widget * Extracted Progress Detail Fab Row and Progress Detail select Date Btn to widgets * Create Progress Detail Widgets Folder * Extracted Edit Dates Row Widget * Extracted Functions from ui * Made some fields private * LoadTimerProgressList if unloaded function * Created App Yes No Dialog Widget * Using Yes No Dialog in Detail Screen * Created TimeProgress Initial Default factory * Renamed to Time Progress Tracker * Added About Button in App Drawer * Code cleanup * Code clean up and fixed Bug with null as string in Repository Signed-off-by Andreas Fahrecker <AndreasFahrecker@gmail.com>
This commit is contained in:
committed by
GitHub
parent
976fbec455
commit
f013c0de65
@ -1,35 +1,36 @@
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:time_progress_calculator/models/time_progress.dart';
|
||||
import 'package:time_progress_tracker/models/time_progress.dart';
|
||||
|
||||
@immutable
|
||||
class AppState {
|
||||
final bool isLoading;
|
||||
final bool hasLoaded;
|
||||
final List<TimeProgress> timeProgressList;
|
||||
|
||||
AppState({
|
||||
this.isLoading = false,
|
||||
this.hasLoaded = false,
|
||||
this.timeProgressList = const [],
|
||||
});
|
||||
|
||||
factory AppState.initial() => AppState(isLoading: true);
|
||||
factory AppState.initial() => AppState(hasLoaded: false);
|
||||
|
||||
AppState copyWith({
|
||||
bool isLoading,
|
||||
bool hasLoaded,
|
||||
List<TimeProgress> timeProgressList,
|
||||
}) {
|
||||
return AppState(
|
||||
isLoading: isLoading ?? this.isLoading,
|
||||
hasLoaded: hasLoaded ?? this.hasLoaded,
|
||||
timeProgressList: timeProgressList ?? this.timeProgressList,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => timeProgressList.hashCode;
|
||||
int get hashCode => hasLoaded.hashCode ^ timeProgressList.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is AppState &&
|
||||
runtimeType == other.runtimeType &&
|
||||
hasLoaded == other.hasLoaded &&
|
||||
timeProgressList == other.timeProgressList;
|
||||
}
|
||||
|
Reference in New Issue
Block a user