• Stars
    star
    192
  • Rank 201,240 (Top 4 %)
  • Language
    Dart
  • License
    Academic Free Lic...
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

flutter luckin coffee application(仿瑞幸咖啡)

app_head

flutter_luckin_coffee 2.0

flutter luckin coffee application(仿瑞幸咖啡)

老版本使用 api工厂 的分支 v1.0,如果有之前克隆过数据的同学,可以评论区留言或私信我你的 ID

Flutter Version

Flutter 2.10.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 5464c5bac7 (8 weeks ago) • 2022-04-18 09:55:37 -0700
Engine • revision 57d3bac3dd
Tools • Dart 2.16.2 • DevTools 2.9.2

Wiki

总结,升级 2.0 过程中,遇到问题解决的思路,以及最终使用的方法,希望对你有帮助!!!

升级 flutter 2.0 总结

升级思路

  1. jsonserialize 中之前保留了一份 mockdata.json,使用直接读取 json 的方式代替 dio 请求
  2. 移除 dio 相关代码
  3. 移除处理请求,数据转换的特殊逻辑
  4. mock.js 生成随机数据去替代 mockdata.json
  5. 路由方面的管理和 provide 改为getx
  6. 尽量用原生的方式去替代 a_button, a_checkbox...类似 weight

这里不得不说一下,为啥最近又要维护这个项目了,没办法呀公司又开了个 flutter 项目,开发也接近尾声了,有了新的理解,在这个项目上实践一下。

进度

  • 本地 mockdata.json 数据替换api工厂
  • 简化 mockdata 中的数据
  • 去掉一些跟 api 工厂强关联的逻辑
  • 升级 flutter 2.10.x
  • 升级插件
  • 移除多余组件,尽量使用原生组件

最后大致的方向

项目可能更加会趋向于一个偏向前端的纯模板,大家有需要的页面可以直接拷进自己的项目,不用修改很多不必要的逻辑。

类似于这样的:

More Repositories

1

flutter_dating_template

flutter 版本的交友 app 模板,总计页面35个,测试数据基于 mockjs 创建(A dating app template for The Flutter version, with a total of 35 pages, was created based on MockJS.)
Dart
212
star
2

eagleuse

Eagle App was used as the background management system to quickly build pic website and self-built pic library. / 使用《Eagle App》作为后台管理系统,快速构建 WEB 图片站、自建图床。
JavaScript
169
star
3

vite-plugin-vue-docs-2

Vite plugin - automatically generate Vue component documentation website.
TypeScript
53
star
4

css.ist

分享响应式、多主题模板/组件,基于 tailwindcss、daisyui。
Vue
37
star
5

eagle-web

eagle图片管理工具的web版本
JavaScript
37
star
6

acss-dnd

一款基于原子类 css 特性的 web 拖拽式编辑器(An web dnd editor on atomic css features)
TypeScript
21
star
7

eagle-api

让你的eagle拥有查询api能力,基于json-server
JavaScript
15
star
8

ghost-themes

Ghost博客主题,响应式设计,amp,mip,评论功能
CSS
10
star
9

iconfont_dart

导入 iconfont,只需要编译一次,就可以帮你快速生成 icon。(To import iconcont, you only need to compile it once to help you generate icons quickly.)
HTML
10
star
10

color_dart

color_dart, display the color of the current rendering value in vscode.
Dart
9
star
11

hapv

electron 开发的一个可以播放,下载国内主流视频的播放器。A player developed by electron that can play and download domestic mainstream video.
Vue
9
star
12

sitemap-nodejs

nodejs爬虫,输入网站自动生成网站sitemap
JavaScript
8
star
13

flutter_collapse

flutter collapse折叠面板
Dart
7
star
14

flutter_tailwindcss

Experience using tailwind on the Flutter!
Dart
3
star
15

editor

一款简易的web富文本编辑器
JavaScript
1
star
16

tabmain

Astro
1
star