Last active
July 5, 2020 09:09
-
-
Save nguyenchilong/84a7380db74a14de9ea060851c70f5c4 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
| class AppState { | |
| final IndexState indexState; | |
| final OfferState offerState; | |
| final NotificationState notificationState; | |
| final OrderState orderState; | |
| final AddressState addressState; | |
| final NewsState newsState; | |
| final AuthState auhtState; | |
| final ProductState productState; | |
| final QuestionState questionState; | |
| final PhotoState photoState; | |
| final CategoryState categoryState; | |
| final CartState cartState; | |
| final ChatState chatState; | |
| AppState({ | |
| @required this.productState, | |
| }); | |
| factory AppState.initial() { | |
| return AppState( | |
| productState: ProductState( | |
| allProducts: Map(), | |
| myProducts: Map(), | |
| product: null, | |
| searchProducts: Map(), | |
| products: Map(), | |
| status: Map(), | |
| page: Page(), | |
| ), | |
| ); | |
| } | |
| // Make sure that method have data you want to show in debug | |
| toJson() { | |
| return { | |
| 'productState': this.productState, | |
| }; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment