Skip to content

Instantly share code, notes, and snippets.

@nuesslerm
Created June 9, 2023 14:21
Show Gist options
  • Select an option

  • Save nuesslerm/806ac7de002e6dbfb34f0366bbb5e30f to your computer and use it in GitHub Desktop.

Select an option

Save nuesslerm/806ac7de002e6dbfb34f0366bbb5e30f to your computer and use it in GitHub Desktop.

Revisions

  1. nuesslerm created this gist Jun 9, 2023.
    23 changes: 23 additions & 0 deletions main.dart
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    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;
    }
    3 changes: 3 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    # mellow-end-2335

    Created with <3 with [dartpad.dev](https://dartpad.dev).