Skip to content

Instantly share code, notes, and snippets.

@nuesslerm
Created June 9, 2023 14:21
Show Gist options
  • Save nuesslerm/806ac7de002e6dbfb34f0366bbb5e30f to your computer and use it in GitHub Desktop.
Save nuesslerm/806ac7de002e6dbfb34f0366bbb5e30f to your computer and use it in GitHub Desktop.
mellow-end-2335
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