Особенно эти два момента:
@override bool operator ==(Object other) =>
identical(this, other) ||
other is AppState &&
runtimeType == other.runtimeType &&
isLoading == other.isLoading &&
todos == other.todos &&
activeTab == other.activeTab &&
activeFilter == other.activeFilter;
И этот:
AppState copyWith({
bool isLoading,
List<Todo> todos,
AppTab activeTab,
VisibilityFilter activeFilter,
}) {
return AppState(
isLoading: isLoading ?? this.isLoading,
todos: todos ?? this.todos,
activeTab: activeTab ?? this.activeTab,
activeFilter: activeFilter ?? this.activeFilter,
);
}