{"id":20936517,"url":"https://github.com/eneskaraosman/swifty_chat","last_synced_at":"2025-10-30T13:39:00.017Z","repository":{"id":41109174,"uuid":"370316666","full_name":"EnesKaraosman/swifty_chat","owner":"EnesKaraosman","description":"A Chat package for flutter","archived":false,"fork":false,"pushed_at":"2025-09-19T06:40:24.000Z","size":2664,"stargazers_count":24,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-19T08:33:35.244Z","etag":null,"topics":["chat","chatbot","flutter"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EnesKaraosman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-05-24T10:41:49.000Z","updated_at":"2025-09-19T06:40:05.000Z","dependencies_parsed_at":"2023-11-13T19:25:44.207Z","dependency_job_id":"ec4df382-217b-488a-8efc-1d35ed50f325","html_url":"https://github.com/EnesKaraosman/swifty_chat","commit_stats":{"total_commits":78,"total_committers":3,"mean_commits":26.0,"dds":0.02564102564102566,"last_synced_commit":"143fc9ae04554cbd34a746edd535c7065139e047"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/EnesKaraosman/swifty_chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnesKaraosman%2Fswifty_chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnesKaraosman%2Fswifty_chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnesKaraosman%2Fswifty_chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnesKaraosman%2Fswifty_chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EnesKaraosman","download_url":"https://codeload.github.com/EnesKaraosman/swifty_chat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnesKaraosman%2Fswifty_chat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280093316,"owners_count":26270915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-20T02:00:06.978Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat","chatbot","flutter"],"created_at":"2024-11-18T22:20:27.085Z","updated_at":"2025-10-20T12:37:36.371Z","avatar_url":"https://github.com/EnesKaraosman.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# swifty_chat\n\n| QuickReply, Text, Image      | Html  | Carousel | Custom |\n:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:\n\u003cimg src=\"https://github.com/EnesKaraosman/swifty_chat/blob/main/example/assets/screenshots/kind_image_and_quick_reply_and_text.png?raw=true\" width=\"240\"/\u003e | \u003cimg src=\"https://github.com/EnesKaraosman/swifty_chat/blob/main/example/assets/screenshots/kind_html.png?raw=true\" width=\"240\"/\u003e | \u003cimg src=\"https://github.com/EnesKaraosman/swifty_chat/blob/main/example/assets/screenshots/kind_carousel.png?raw=true\" width=\"240\"/\u003e | \u003cimg src=\"https://github.com/EnesKaraosman/swifty_chat/blob/main/example/assets/screenshots/kind_custom.png?raw=true\" width=\"240\"/\u003e\n\n### Platforms\n- [x] iOS, macOS\n- [x] Android\n- [x] Web\n\n### Features\n\nSupported Message types;\n- Text\n- Image\n  - `ImageProver` is required, so you can use network or assets to load images.\n- Html\n  - [flutter_html](https://pub.dev/packages/flutter_html) package is used for displaying HTMLs, so we have support what package supports.\n- QuickReply\n- Carousel\n- Custom\n  - See [CustomMessage.md](CustomMessage.md) for details.\n\nOther;\n\n- Scroll to bottom\n  + use `scrollToBottom` method on `Chat`\n\n### Usage\n\nTL;DR \u003cbr\u003e\nSee the example app in the `example` folder. It contains `BasicChat` \u0026 `AdvancedChat` pages.\n* BasicChat contains only text messages, it's good to see minimum requirements to have package up \u0026 running.\n* AdvancedChat sample contains all the supported message kinds and related action events like quick reply button tap event, also scrolling to bottom is activated.\n\n\nThis lib requires some abstract classes to be implemented to get started.\n* `Message` \n* `ChatUser`\n* `QuickReplyItem` (if `MessageKind.quickReply` is going to be used)\n* `CarouselItem` (if `MessageKind.carousel` is going to be used)\n\nNote that `packages/swifty_chat_mocked_data/lib/src/mock/models` folder contains `Mock...` prefixed classes are the concrete implementation of the related abstract classes.\n\nFor a chat app, you need messages right, so here what you need to have a message;\n\n```dart\nabstract class Message {\n  final ChatUser user;\n  final String id;\n  final bool isMe;\n  final MessageKind messageKind;\n}\n\nMockMessage(\n  user: MockChatUser(userName: \"Enes\"),\n  id: DateTime.now().toString(),\n  isMe: true,\n  messageKind: MessageKind.text(\"My First Message\"),\n)\n```\n\nAs you see above; \n* You need a `ChatUser` which means you need to have a class that extends from `ChatUser`, in our case its `MockChatUser`.\n* id to have unique messages.\n* isMe is to differentiate UI.\n* MessageKind is to determine how the message UI is going to look like.\n\n*What kind of message kind exists?*\n\n[MessageKind](packages/swifty_chat_data/lib/src/models/message_kind.dart)\n\n```dart\nclass MessageKind {\n  MessageKind.text(String text);\n  MessageKind.imageProvider(ImageProvider imageProvider);\n  MessageKind.quickReply(List\u003cQuickReplyItem\u003e quickReplies);\n  MessageKind.carousel(List\u003cCarouselItem\u003e carousel);\n  MessageKind.html(String html);\n  MessageKind.custom(dynamic? custom);\n}\n```\n\nFor more, visit [BasicChat](./example/lib/basic_chat.dart) \u0026 [AdvancedChat](./example/lib/advanced_chat.dart) \n\n### Message widget tap actions\n\nYou can be notified about message widget press actions\n  \n* QuickReply \n\n```dart\nChat(..)\n.setOnQuickReplyItemPressed((QuickReply item) {});\n```\n\n* Carousel\n\n```dart\nChat(..)\n.setOnCarouselItemButtonPressed((CarouselButtonItem item) {});\n```\n\n* Html\n\n```dart\nChat(..)\n.setOnHTMLWidgetPressed(\n  () =\u003e {\n  \"onLinkTap\": (url, _, __) =\u003e\n    debugPrint(\"onLinkTapped: $url\"),\n  \"onImageTap\": (src, _, __) =\u003e\n    debugPrint(\"onImageTapped: $src\")\n  },\n);\n```\n\n* For rest (Image, Text)\n\n```dart\nChat(..)\n.setOnMessagePressed((Message message) {});\n```\n\n### Avatar\n\nTo set avatar for a `ChatUser`, simply pass `avatar` parameter of the related user.\n\n```dart\nUserAvatar({\n    required this.imageProvider, // ImageProvider\n    this.size = 40,\n    this.position = AvatarPosition.center, // top, center, bottom\n});\n```\n\n### Theming\n\nVisit [Theming.md](Theming.md) for details.\n\n### Custom Message\n\nVisit [CustomMessage.md](CustomMessage.md) for details.\n\n### Message Cell Size Configuration\n\nVisit [MessageCellSizeConfiguration.md](MessageCellSizeConfiguration.md) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feneskaraosman%2Fswifty_chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feneskaraosman%2Fswifty_chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feneskaraosman%2Fswifty_chat/lists"}