Using Flutter to Design a Nice "Me" Page
Recently I ran into some really annoying trivial matters, my state has been pretty down, and a lot of things I had originally planned have been delayed. It's really hard to take…… I've seen friends in the backend keep asking why the blog and WeChat official account haven't been updated, so now that I'm done being busy and have some free time, I'm here with an update! Preface It started when I recently picked up an old project again (something I did as a hobby, planning to operate it myself if I get the chance) to continue improving it, then found that some of the UI design was too rough, really not satisfied ~~(even though that's because there weren't many features to begin with)~~, so I started optimizing~ This should turn into a series of articles, and today let's start with the App's "Me" page~ Effect
目录8 个章节
Recently I ran into some really annoying trivial matters, my state has been pretty down, and a lot of things I had originally planned have been delayed. It's really hard to take……
I've seen friends in the backend keep asking why the blog and WeChat official account haven't been updated, so now that I'm done being busy and have some free time, I'm here with an update!
Preface
It started when I recently picked up an old project again (something I did as a hobby, planning to operate it myself if I get the chance) to continue improving it, then found that some of the UI design was too rough, really not satisfied (even though that's because there weren't many features to begin with), so I started optimizing~ This should turn into a series of articles, and today let's start with the App's "Me" page~
Screenshots
Without further ado, here are the screenshots.
Before the change, the top of the page only had three elements—avatar, name, and signature—which looked quite empty; after the change, I added social-attribute elements like level (experience), posts, following, and followers, plus a QR code icon. It looks a bit more high-end~
| Before | After |
|---|---|
![]() |
Different Themes and Night Mode
Take a look at the effect under different themes and night mode (actually this night mode still needs optimization, I feel the contrast is too high)
| Theme 1 | Theme 2 | Night Mode |
|---|---|---|
![]() |
Ideas for Improving the Page Header
For this page's header I referenced Coolapk App's design. I originally planned to reference the Bilibili client, but found that Bilibili's was a bit perfunctory, not to mention ugly (to my aesthetic), and it didn't even have interaction effects. It felt like a product of programmers being forced by a deadline (shrug)
First, take a look at my nested-doll structure

It's actually quite simple: just insert another Container in the middle of the original Column that held the name and signature to implement level, experience, and a progress bar, and that's ok~
The code is as follows (due to length, only the key code is shown here):
Widget _buildHeader() {
return Consumer<UserModel>(
builder: (BuildContext context, UserModel userModel, Widget child) {
var row = Row(
children: <Widget>[
ClipOval(child: daAvatar(userModel.user.avatar)),
Expanded(
child: Column(
children: <Widget>[
// 用户名
Text(userModel.isLogin ? userModel.user.nickname : '注册或登录'),
// 等级、经验
if (userModel.isLogin)
Container(
child: Column(children: [
Row(children: [
Text('LV3')),
Text('9372/27000'),
]),
LinearProgressIndicator(value: 0.3, valueColor: AlwaysStoppedAnimation(Colors.blue)),
]),
),
// 个性签名
Text(userModel.isLogin ? (userModel.user.signature ?? '没有个性签名') : '请先登录以获得专属服务~'),
],
),
),
// 二维码和右箭头
Icon(Icons.qr_code, color: Theme.of(context).primaryTextTheme.headline6.color),
VerticalDivider(width: 10),
Icon(Icons.chevron_right, color: Theme.of(context).primaryTextTheme.headline6.color),
],
);
},
);
}
Design of the Posts, Following, and Followers Component
Below the page header there's also this component, used to display social-related information. This component is embedded in the listview below, and can slide along with the page.
The implementation is very simple, I'll just put the code:
Widget _buildCard() {
return Container(
margin: EdgeInsets.fromLTRB(5, 10, 5, 10),
child: Card(
child: Container(
margin: EdgeInsets.fromLTRB(5, 10, 5, 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
_buildNumberTextWidget('62', '动态'),
_buildNumberTextWidget('18', '关注'),
_buildNumberTextWidget('89', '粉丝'),
],
),
),
),
);
}
The implementation of _buildNumberTextWidget is as follows:
Widget _buildNumberTextWidget(String number, String text) {
var foreColor = Global.profile.darkMode ? Colors.white54 : Theme.of(context).primaryColor;
return TextButton(
child: Column(children: [
Text(number, style: TextStyle(fontSize: 30, color: foreColor)),
Text(text, style: TextStyle(color: foreColor)),
]),
style: ButtonStyle(padding: MaterialStateProperty.all(EdgeInsets.symmetric(horizontal: 40))),
onPressed: () => BotToast.showText(text: '妙啊'),
);
}
Because I needed to consider interaction feedback, I wrapped the content with a TextButton widget here. (Note: the TextButton widget was introduced in the new version of Flutter to replace the original FlatButton)
Interaction Effects
I recorded an animation, take a look at the final interaction effect:

It's passable I guess (no UI, so I can only cobble something together myself hh)
Afterword
After more than half a year, coming back to Flutter, I found that Flutter has already been updated to version 2.x, and the new dart language has also added null safety, taking another step closer to kotlin/c#. Mainstream third-party libraries have also followed up, all releasing null safety versions of their libraries. Overall the development experience is still pretty good~
But the finished product, the feeling it gives me, still doesn't match native in performance, and it's hard to achieve the same silky smoothness as native. But Flutter is really fast for building UIs, and the Chinese community is very active. Domestically, thanks to several big companies taking the lead, attention is high. For basic CRUD scenarios, Flutter handles them with no pressure, and you can also get better performance and a better user experience than React Native or uni-app. The only regret is that you can't make WeChat mini programs…
This OneCat App, throughout such a long period of development and testing, has always had various small issues pop up, always some place that's not quite satisfactory, which made me once want to rewrite it in native. But later I thought Flutter is fast for writing UIs, so I let it go, just writing it for fun~
Welcome to Discuss
Programming Lab focuses on exploring popular new internet technologies and team agile development practices. Reply linux, flutter, c#, netcore, android, kotlin, java, python, etc. in the backend of the WeChat official account 「Programming Lab」 to get related technical articles and materials. At the same time, if you have any questions you can leave a message in the official account backend~

- Cnblogs: https://www.cnblogs.com/deali/
- Coding livestream: https://live.bilibili.com/11883038
- Zhihu: https://www.zhihu.com/people/dealiaxy
_EOF_
Using Flutter to Design a Nice "Me" Page
- 本文作者:
- 程序设计实验室
- 版权声明:
- 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
相关文章
Windows上怎么配置flutter开发环境?这篇文章手把手教你
前言 在Windows上做开发,一个字:坑。 但是有时候外出只能带着笔记本,Linux在一些笔记本上不太兼容,驱动支持不完美,而且电源管理不够好,所以无奈的情况下只能用Windows暂时顶一下,就像现在我要在Windows上搭建Flutter的开发环境一样,太坑了。 进入正题 先安装Android SDK 首先,你要有一种可以下载到Android SDK的方式,可以是梯子,或者是国内镜像,具体我就
2023-03-05 · Flutter · 约 1 分钟
Flutter开发:ListView手动滚动到底部
这个问题搜了很久都没找到,国内关于flutter的研究好像还没多少,不过stackoverflow真的是万能的,这里记录一下~ 原文 Use ScrollController.jumpTo() or ScrollController.animateTo() method to achieve this. Here is code snippet (After 1 second, the ListV
2021-12-18 · Flutter · 约 1 分钟
Flutter移动应用快速构建实践——状态管理、国际化、数据持久化、性能优化(二)
继续上一篇:极简诗词开发背后:Flutter移动应用快速构建实践——状态管理、国际化、数据持久化、性能优化(一) 前文中说到了项目结构、状态管理和国际化的方案,本文继续聊聊数据持久化和粗略的性能优化。 数据持久化 目前的话,flutter用的比较多比较成熟的数据持久化就是shared_preferences和SQFLite,一个是ini配置文件,一个是SQLite数据库,小应用我比较倾向只用前者,
2021-12-18 · Flutter · 约 1 分钟
初见Flutter!框架简单介绍以及构建可发布的签名Apk包
哈喽!好久不见,算起来我已经一个多月没更新博客了,近期刚刚完成了一个项目,正好抽出时间整理一下学到的东西并且写写博客。 关于flutter 开始使用flutter还是春节后的事情,其实之前很早就想学一下flutter了,毕竟谷歌出的技术总是不会太差的,无奈一直没有时间和做app的需求,这次接触了flutter之后仿佛发现了新大陆,原来开发app还能这么方便,真的颠覆了我原来的认知啊,热更新也太好用
2021-12-18 · Flutter · 约 1 分钟
讨论
共 0 条加载评论中…

