Flutter写的博客园客户端 - huhx
source link: https://www.cnblogs.com/huhx/p/17001815.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
几个月前在博客园发帖说要用Flutter
写个客户端,版本也在陆陆续续的迭代当中,软件也日臻完善起来,想着就把它开源以作Flutter学习。
目前软件已经上线Goolge Play
: https://play.google.com/store/apps/details?id=com.huhx.cnblog 。感兴趣的朋友可以自行下载
当前其实已经实现了博客园的绝大部分功能,其中包含却不限于:
- 首页各类博客的列表及详情
- 博客的评论以及点赞功能
- 各类新闻的浏览
- 闪存浏览以及评论
- 博问的浏览以及评论
- 我的资料以及动态
- 阅读记录的功能
Preview
博客园首页 | 新闻列表 | 博问列表 |
---|---|---|
闪存列表 | 我的 | 我的资料 |
---|---|---|
我的博客 | 阅读记录 | 知识库 |
---|---|---|
博客内容 | 粉丝关注 | 官方博客 |
---|---|---|
Packages
整个项目花了很长时间在博客内容的适配上面,因为使用webview展示内容,大小不同的设备适配起来还是有些吃力。软件用到的技术如下
- 状态管理: RiverPod
- Api请求:Dio和retrofit
- Splash screen:flutter_native_splash
- WebView: flutter_inappwebview
- UI effect: shimmer、badges、pull_to_refresh、fluttertoast、flutter_svg
SetUp
在启动项目之前,需要在根目录创建.env文件。里面包含博客园的id和secret
clientId={{cnblog_client_id}}
clientSecret={{cnblog_secret_id}}
notRobotCookie=CfDJ8EOBBtWq0dNFoDS-ZHPSe51ATHuFFilG3imii1Hj5WZ-TAK98xT4mJquvSMlYdkzfVCmpAWdt1VyGSpqZ5Q8GulXT3q-Essgs3ttLCLRTzIqo0Klt-nZCkblG6ST2zI2Og
Github
附上github的链接:https://github.com/huhx/flutter-cnblog
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK