{"id":18160190,"url":"https://github.com/meetqy/flutter_luckin_coffee","last_synced_at":"2025-04-09T11:13:08.724Z","repository":{"id":41382175,"uuid":"200568518","full_name":"meetqy/flutter_luckin_coffee","owner":"meetqy","description":"flutter luckin coffee application（仿瑞幸咖啡）","archived":false,"fork":false,"pushed_at":"2022-07-01T08:16:09.000Z","size":23951,"stargazers_count":227,"open_issues_count":1,"forks_count":71,"subscribers_count":16,"default_branch":"v2.0","last_synced_at":"2025-04-02T09:08:24.882Z","etag":null,"topics":["dart","example","flutter","flutter-apps","flutter-demo","flutter-examples"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"afl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meetqy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-05T02:29:33.000Z","updated_at":"2025-03-06T03:48:23.000Z","dependencies_parsed_at":"2022-09-12T06:00:43.950Z","dependency_job_id":null,"html_url":"https://github.com/meetqy/flutter_luckin_coffee","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meetqy%2Fflutter_luckin_coffee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meetqy%2Fflutter_luckin_coffee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meetqy%2Fflutter_luckin_coffee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meetqy%2Fflutter_luckin_coffee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meetqy","download_url":"https://codeload.github.com/meetqy/flutter_luckin_coffee/tar.gz/refs/heads/v2.0","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248027411,"owners_count":21035594,"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":["dart","example","flutter","flutter-apps","flutter-demo","flutter-examples"],"created_at":"2024-11-02T08:07:40.231Z","updated_at":"2025-04-09T11:13:08.700Z","avatar_url":"https://github.com/meetqy.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"![app_head](./readme/images/githead1.png)\n\n# flutter_luckin_coffee 2.0\n\n\u003e flutter luckin coffee application（仿瑞幸咖啡）\n\n老版本使用 `api工厂` 的分支 [v1.0](https://gitee.com/meetqy/flutter_luckin_coffee/tree/v1.0/),如果有之前克隆过数据的同学,可以评论区留言或私信我**你的 ID**\n\n## Flutter Version\n\n```\nFlutter 2.10.5 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 5464c5bac7 (8 weeks ago) • 2022-04-18 09:55:37 -0700\nEngine • revision 57d3bac3dd\nTools • Dart 2.16.2 • DevTools 2.9.2\n```\n\n## Wiki\n\n总结，升级 2.0 过程中，遇到问题解决的思路，以及最终使用的方法，希望对你有帮助！！！\n\n[升级 flutter 2.0 总结](https://gitee.com/meetqy/flutter_luckin_coffee/wikis/%E5%8D%87%E7%BA%A72.0%E9%97%AE%E9%A2%98%E6%80%BB%E7%BB%93?sort_id=1729161)\n\n## 升级思路\n\n1. jsonserialize 中之前保留了一份 mockdata.json，使用直接读取 json 的方式代替 dio 请求\n2. 移除 dio 相关代码\n3. 移除处理请求，数据转换的特殊逻辑\n4. mock.js 生成随机数据去替代 mockdata.json\n5. `路由方面`的管理和 `provide` 改为`getx`\n6. 尽量用原生的方式去替代 a_button, a_checkbox...类似 weight\n\n\u003e 这里不得不说一下，为啥最近又要维护这个项目了，没办法呀公司又开了个 flutter 项目，开发也接近尾声了，有了新的理解，在这个项目上实践一下。\n\n## 进度\n\n- [ ] 本地 mockdata.json 数据替换`api工厂`\n- [x] 简化 mockdata 中的数据\n- [x] 去掉一些跟 api 工厂强关联的逻辑\n- [ ] 升级 flutter 2.10.x\n- [ ] 升级插件\n- [ ] 移除多余组件，尽量使用原生组件\n\n## 最后大致的方向\n\n项目可能更加会趋向于一个**偏向前端的纯模板**，大家有需要的页面可以直接拷进自己的项目，不用修改很多不必要的逻辑。\n\n类似于这样的：\n\n- [flutter 交友模板](https://github.com/meetqy/flutter_dating_template)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeetqy%2Fflutter_luckin_coffee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeetqy%2Fflutter_luckin_coffee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeetqy%2Fflutter_luckin_coffee/lists"}