Created with <3 with dartpad.dev.
Created
June 9, 2023 14:21
-
-
Save nuesslerm/806ac7de002e6dbfb34f0366bbb5e30f to your computer and use it in GitHub Desktop.
mellow-end-2335
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
| void main() { | |
| final ChatState state = ChatStateLoading(); | |
| final stateLoaded = state as ChatStateLoaded?; | |
| print('stateLoaded: $stateLoaded'); | |
| } | |
| abstract class ChatState { | |
| String? appBarTitle; | |
| String? appBarSubtitle; | |
| String? appBarAvatarUrl; | |
| } | |
| class ChatStateLoading extends ChatState {} | |
| class ChatStateLoaded extends ChatState { | |
| ChatStateLoaded({ | |
| required this.chat, | |
| }); | |
| final String chat; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment