当前位置:网站首页>让你的聊天气泡丰富多彩
让你的聊天气泡丰富多彩
2022-07-27 16:43:00 【岛上码农】
前言
在聊天类应用中,通常用气泡作为聊天内容的背景色,比如微信的聊天背景,别人发过来的是白色的气泡,自己发的是绿色的气泡。
上面这种是比较普通的,这篇我们玩点有趣的,让聊天气泡是渐变色的。可能很多人会觉得渐变很简单,给 Container 来个decoration或者使用 DecoratedBox,使用渐变填充色就可以了,比如下面这种效果:
这个感觉也太丑了,本篇我们来一个高级的 —— 整个聊天窗口的气泡颜色是渐变的,而且随着滚动还会变化!先看看实现的效果,这里有两个效果:
- 整个窗口的聊天气泡背景色是连续渐变的,而不是每个气泡重复的渐变。
- 滚动的时候,气泡的背景色会随着滚动的位置变化。

代码实现
使用 Co
边栏推荐
- Technology Summit 58 Liu Yuan in the same city was invited to attend qecon 2022 global software quality & effectiveness conference
- Mongodb learning notes (1) - install mongodb and its related configurations
- 专项测试之「 性能测试」总结
- Idea optimization strategy
- VIVO应用市场APP上架总结
- Down sampling - signal phase and aliasing
- 2022备战秋招10W字面试小抄pdf版,附操作系统、计算机网络面试题
- Double insurance for line breaking
- Word 2007+ tips
- sql 字段类型转换
猜你喜欢
随机推荐
Rs2022/ cloud detection: semi supervised cloud detection in satellite images by considering the
Role authorization --- complete the addition and deletion of secondary menus by adding and deleting primary menus
Code interview of Amazon
Self control principle learning notes - system stability analysis (2) - loop analysis and Nyquist bode criterion
webservice的疑问
kettle JVM内存设置---效果不明显
Webmagic+selenium+chromedriver+jdbc grabs data vertically.
Kettle switch / case control to realize classification processing
WSN journal indexed by SCI
Performance analysis of continuous time systems (2) - second order system performance improvement methods PID, PR
Nacos的基本使用(1)——入门
Using vscode to build u-boot development environment
VMware: set up SSH
Normal distribution, lognormal distribution, generation of normal random numbers
Kinect2 for unity3d - avatardemo learning
C语言打印菱形
IDEA成功连接Database但不显示表怎么办
Questions about webservice
Down sampling - signal phase and aliasing
2022 preparation for autumn recruitment 10W word interview sketch PDF version, with operating system and computer network interview questions








