{"id":18438184,"url":"https://github.com/easemob/easemob-demo-flutter","last_synced_at":"2026-01-22T20:33:39.247Z","repository":{"id":235125476,"uuid":"790105538","full_name":"easemob/easemob-demo-flutter","owner":"easemob","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-20T07:36:47.000Z","size":834,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-20T08:36:53.892Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/easemob.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-04-22T09:19:04.000Z","updated_at":"2024-05-13T07:10:00.000Z","dependencies_parsed_at":"2025-04-14T13:15:45.916Z","dependency_job_id":"32134e56-e478-4508-b33f-a94e911360fa","html_url":"https://github.com/easemob/easemob-demo-flutter","commit_stats":null,"previous_names":["easemob/chat-flutter","easemob/easemob-demo-flutter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/easemob/easemob-demo-flutter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easemob%2Feasemob-demo-flutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easemob%2Feasemob-demo-flutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easemob%2Feasemob-demo-flutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easemob%2Feasemob-demo-flutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/easemob","download_url":"https://codeload.github.com/easemob/easemob-demo-flutter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easemob%2Feasemob-demo-flutter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28670382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T19:36:09.361Z","status":"ssl_error","status_checked_at":"2026-01-22T19:36:05.567Z","response_time":144,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-06T06:18:58.542Z","updated_at":"2026-01-22T20:33:39.241Z","avatar_url":"https://github.com/easemob.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 环信即时通讯 IM Demo \n\n环信即时通讯 IM Demo 提供用户登录、单聊、群组、子区、消息(文字、表情、语音、视频、图片、文件等)发送及管理、会话管理、好友管理、用户属性、用户在线状态（Presence）以及实时音视频通话等功能。\n\n## Demo 体验  \n\n你可以进入 [环信官网](https://www.easemob.com/download/demo) 体验即时通讯 IM Demo。\n注意：Demo里登录时获取验证码功能在模拟器上不支持，请使用真机。\n\n## 快速跑通 Demo 源码\n\n### 开发环境要求\n\n- flutter 3.3.0+\n- ios 12+\n- android sdk api 21+\n\n### 跑通步骤\n\n1. [创建应用](https://doc.easemob.com/product/enable_and_configure_IM.html#%E5%88%9B%E5%BB%BA%E5%BA%94%E7%94%A8)。   \n2. [获取应用的 App Key](https://doc.easemob.com/product/enable_and_configure_IM.html#%E8%8E%B7%E5%8F%96%E7%8E%AF%E4%BF%A1%E5%8D%B3%E6%97%B6%E9%80%9A%E8%AE%AF-im-%E7%9A%84%E4%BF%A1%E6%81%AF)。\n3. [创建用户](https://doc.easemob.com/product/enable_and_configure_IM.html#%E5%88%9B%E5%BB%BA-im-%E7%94%A8%E6%88%B7)。\n4. [下载即时通讯 IM Demo 项目源码](https://github.com/easemob/easemob-demo-flutter)。\n5. 下载完毕，打开 lib/main.dart\n6. 将你的应用的 App Key 填写到 `appkey` 中。\n7. 编译运行项目。\n8. 使用注册的用户 ID 和密码登录。\n\n\n### App Server\n\n为方便开发者快速体验即时通讯 IM 功能，跑通本工程 Demo 源码默认使用开发者注册的用户 ID 和密码直接登录，不需要依赖部署服务端 App Server。但是在此模式下，手机验证码、用户头像和 EaseCallKit 实时音视频等相关功能不可用，你可以通过部署 App Server 完整体验这些功能。\n\nApp Server 为 Demo 提供以下功能：\n\n- 通过手机号获取验证码。\n- 通过手机号和验证码返回环信用户 ID 和环信用户 Token。\n- 上传头像并返回地址。\n- 根据用户的信息生成 [EaseCallKit](https://github.com/easemob/ease-callkit-flutter.git) 登录所需的 Token。\n- 获取音视频通话时环信用户 ID 和 Agora UID 的映射关系。\n\n你通过以下步骤部署 App Server：\n\n1. 部署 App Server。详见 [服务端源码](https://github.com/easemob/easemob-im-app-server/tree/dev-demo)。\n2. 在 lib/main.dart 填写 App Server 的域名 和 rtcAppId。\n\n**服务端中的 App Key 要跟客户端的 App Key 保持一致。**\n\n## Demo 项目结构\n\n### Demo 架构\n\n```shell\n.\n├── custom\n│   └── chat_route_filter.dart // chat-uikit 自定义拦截类，所有对chat-uikit 的自定义通过该文件实现。\n├── demo_config.dart           // demo 运行的配置类，包含appkey， agoraAppId， appServer\n├── demo_localizations.dart    // demo 国际化类，用于对demo中文字国际化\n├── main.dart                  // 项目入口，包括了初始化sdk，设置主题\n├── notifications\n│   └── app_settings_notification.dart      // 主题变更通知\n├── pages\n│   ├── call                                // 呼叫相关页面\n│   │   ├── call_handler_widget.dart        // 呼叫监听页面，当home页启动时会初始化，用于监听语音会叫回调。\n│   │   ├── call_helper.dart                // 呼叫工具类，集成了1v1音视频呼叫和多人呼叫的方法。\n│   │   ├── call_pages                      // 呼叫相关的ui页面\n│   │   │   ├── call_button.dart            // 呼叫使用的自定义按钮\n│   │   │   ├── call_user_info.dart         // 用于展示呼叫的头像昵称\n│   │   │   ├── multi_call_item_view.dart   // 多人呼叫时的单人展示信息\n│   │   │   ├── multi_call_page.dart        // 多人呼叫时的总页面\n│   │   │   ├── multi_call_view.dart        // 多人呼叫中的page页面\n│   │   │   └── single_call_page.dart       // 单人呼叫页面\n│   │   └── group_member_select_view.dart   // 群成员选择页面，用户多人呼叫时选则参与人\n│   ├── contact\n│   │   └── contact_page.dart               // 通讯录页面\n│   ├── conversation\n│   │   └── conversation_page.dart          // 会话列表页面\n│   ├── help\n│   │   └── download_page.dart              // 附件消息下载页面\n│   ├── home_page.dart                      // 主页\n│   ├── login_page.dart                     // 登录页面\n│   ├── me\n│   │   ├── about_page.dart                 // about 页面\n│   │   ├── my_page.dart                    // 个人页面\n│   │   ├── personal\n│   │   │   └── personal_info_page.dart     // 个人详情页\n│   │   └── settings\n│   │       ├── advanced_page.dart          // 特性开关页面\n│   │       ├── general_page.dart           // 设置页面\n│   │       ├── language_page.dart          // 语言选择页面\n│   │       └── translate_page.dart         // 选择翻译目标语言页面\n│   └── welcome_page.dart                   // 启动页\n├── tool\n│   ├── app_server_helper.dart              // appServer 请求封装页面，用于封装向AppServer的请求\n│   ├── format_time_tool.dart               // 时间工具，用于格式化通话时间\n│   ├── settings_data_store.dart            // 配置存储工具\n│   └── user_data_store.dart                // 用户属性存储类\n└── widgets\n    ├── list_item.dart                      // 设置页面的item\n    ├── toast_handler_widget.dart           // toast 页面，对uikit中事件结果的封装，如添加好友的loading toast等\n    ├── token_status_handler_widget.dart    // token 过期监听页，用于监听sdk登录用户token过期。\n    └── user_provider_handler_widget.dart   // 用户数据配置类，用于把用户信息传给uikit和根据 uikit 的请求返回对应用户数据\n```\n\n### 核心模块\n\n| 模块               | 描述   | \n| :------------------- | :----- |\n| 聊天模块    | 展示如何依赖 [ChatUIKit](https://doc.easemob.com/uikit/chatroomuikit/flutter/roomuikit_overview.html) 实现聊天页面，如何发送消息、消息管理、扩展消息类型及如何增加扩展菜单等的逻辑。    | \n| 会话列表模块 | 展示如何依赖 [ChatUIKit](https://doc.easemob.com/uikit/chatroomuikit/flutter/roomuikit_overview.html) 实现会话列表的逻辑及实现系统消息的具体逻辑。   | \n| 联系人模块  | 展示如何依赖 [ChatUIKit](https://doc.easemob.com/uikit/chatroomuikit/flutter/roomuikit_overview.html) 实现联系人列表的逻辑。   | \n| 我的模块  | 账户管理、用户状态管理及APP的一些功能样式设置    | \n| 开发者模块  | 展示 IM SDK 提供的一些常规的开发者可以设置的功能。   |\n\n## Demo 设计\n\n关于 Demo 的设计，详见 [设计文档](https://www.figma.com/community/file/1327193019424263350/chat-uikit-for-mobile) 。\n\n## Q\u0026A\n\n如有问题请联系环信技术支持或者发邮件到 [issue@easemob.com](mailto:issue@easemob.com)。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasemob%2Feasemob-demo-flutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feasemob%2Feasemob-demo-flutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasemob%2Feasemob-demo-flutter/lists"}