{"id":23898030,"url":"https://github.com/byteszero/flutter_multi_channel","last_synced_at":"2025-04-10T17:05:12.529Z","repository":{"id":85308975,"uuid":"356152357","full_name":"BytesZero/flutter_multi_channel","owner":"BytesZero","description":"Flutter 多渠道打包详解示例项目源码，掘金文章👇","archived":false,"fork":false,"pushed_at":"2021-08-27T09:20:51.000Z","size":6758,"stargazers_count":33,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T14:46:13.794Z","etag":null,"topics":["flutter","flutter-apps","flutter-examples"],"latest_commit_sha":null,"homepage":"https://juejin.cn/post/6949901619689586719","language":"Dart","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/BytesZero.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}},"created_at":"2021-04-09T05:52:56.000Z","updated_at":"2024-11-01T04:13:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"30b4375f-a012-4512-9ff6-884675cbd1e6","html_url":"https://github.com/BytesZero/flutter_multi_channel","commit_stats":null,"previous_names":["byteszero/flutter_multi_channel"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BytesZero%2Fflutter_multi_channel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BytesZero%2Fflutter_multi_channel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BytesZero%2Fflutter_multi_channel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BytesZero%2Fflutter_multi_channel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BytesZero","download_url":"https://codeload.github.com/BytesZero/flutter_multi_channel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248260169,"owners_count":21074207,"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","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":["flutter","flutter-apps","flutter-examples"],"created_at":"2025-01-04T17:19:36.035Z","updated_at":"2025-04-10T17:05:12.498Z","avatar_url":"https://github.com/BytesZero.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter 多渠道打包详解\n![image](https://user-images.githubusercontent.com/8764899/114137633-0e7d1580-993f-11eb-9287-55265649d0c1.png)\n\n\u003e 🔥🔥🔥 最新适配 Flutter 2.2 版本\n\n## 多渠道打包介绍\n多渠道打包的主要作用是满足产品的运营需求，统计渠道和活动效果。\n在之前原生（Android、iOS）开发 App 有各种工具来辅助我们完成多渠道打包。\n在我们开发过程中也需要为渠道功能负责，原生的开发工具就基本满足我们调试渠道包内容，但是在 Flutter 上需要更多的配置才可以完成，下文将一一介绍从配置=\u003e调试=\u003e打包的全部流程和细节。\n\n## 核心内容\n\n```Shell\n# run shell\nflutter run --dart-define=APP_CHANNEL=ZeroFlutter --dart-define=OTHER_VAR=Dart\n# build apk/ios\nflutter build [apk/ios] --dart-define=APP_CHANNEL=ZeroFlutter --dart-define=OTHER_VAR=Dart\n# main.dart\nclass EnvironmentConfig {\n  static const APP_CHANNEL = String.fromEnvironment('APP_CHANNEL');\n  static const OTHER_VAR = String.fromEnvironment('OTHER_VAR');\n}\n```\n\n## 用到的脚本\n使用前请是用 `chmod a+x fapkc.sh` 赋予可运行权限\n\n- [fapk_channel_all.sh](/shell/fapk_channel_all.sh)\n- [fapkc.sh](/shell/fapkc.sh)\n\n## 详细文章链接\n- [掘金](https://juejin.cn/post/6949901619689586719)\n- [CSDN](https://blog.csdn.net/yy1300326388/article/details/115725551)\n\n## 更新日志\n- [2021-06-08] [更新适配 Flutter 2.2 Gradle 脚本](https://github.com/yy1300326388/flutter_multi_channel/commit/7a78c80db1d7ed019048a094beae7efb1ac442b0)\n\n\n### 关于我\n\n- 15 年～18 年，使用 `Android` 原生做智能硬件相关的  App 研发\n- 18 年 5 月，一次偶然的机会接触到了 `Flutter` ，然后开始自学，可以看 [weather_flutter](https://github.com/yy1300326388/weather_flutter) 是我练习 Flutter 的入门实战项目（我现在依然觉得他非常适合 Flutter 入门练习使用）\n- 18 年 8 月，顶着巨大的压力（Flutter 当时还没有 Release 1.0）开始使用 Flutter 开发企业级项目，并且开发维护了十几个 Flutter 插件包（因为当时插件资源非常的匮乏）\n- 截止目前主导并参与上线了 4 款企业级`Flutter` App，当前正在负责开发的一款 App 累计用户 `百万级`，使用 `Flutter` 得到了极佳的体验\n\n### 关注我\n\n- 遇到问题可以找我帮助解决（联系方式在 [`GitHub`](https://github.com/yy1300326388) 主页）\n- 持续分享优质的 `Flutter` 文章和视频\n- 不定期分享 `Flutter` 开发小技巧\n- 百万级 `Flutter` 应用架构经验\n\n\u003cp\u003e\n  \u003ca href=\"https://github.com/yy1300326388\"\u003e\n    \u003cimg width=\"200\" alt=\"github\" src=\"https://raw.githubusercontent.com/yy1300326388/yy1300326388/main/images/follow/github_follow.png\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://juejin.cn/user/764915820276439\"\u003e\n    \u003cimg width=\"200\" alt=\"juejin\" src=\"https://raw.githubusercontent.com/yy1300326388/yy1300326388/main/images/follow/juejin_follow.png\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://space.bilibili.com/1698847208\"\u003e\n    \u003cimg width=\"200\" alt=\"csdn\" src=\"https://raw.githubusercontent.com/yy1300326388/yy1300326388/main/images/follow/bilibili_follow.png\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyteszero%2Fflutter_multi_channel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyteszero%2Fflutter_multi_channel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyteszero%2Fflutter_multi_channel/lists"}