Created
February 18, 2021 12:49
-
-
Save anubhav11803451/3ac03e46072a648a6a1622f312ed5d7e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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