Skip to content

Instantly share code, notes, and snippets.

@anubhav11803451
Created February 18, 2021 12:49
Show Gist options
  • Save anubhav11803451/3ac03e46072a648a6a1622f312ed5d7e to your computer and use it in GitHub Desktop.
Save anubhav11803451/3ac03e46072a648a6a1622f312ed5d7e to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
import 'package:redux_in_flutter/redux/states/photosState.dart';
@immutable
class AppState {
final PhotoState photoState;
AppState({
@required this.photoState,
});
factory AppState.initial() {
return AppState(
photoState: PhotoState.initial(),
);
}
AppState copyWith({
PhotoState photoState,
}) {
return AppState(
photoState: photoState ?? this.photoState,
);
}
@override
int get hashCode => photoState.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is AppState && photoState == other.photoState;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment