Skip to content

Commit 18b6890

Browse files
committed
✨ 新增《活动入口网格》
1 parent 962ce5c commit 18b6890

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# 活动入口网格 - 2021/04/04
2+
3+
![](https://pic.alexv525.com/2021-04-04-095238.png)
4+
5+
实现一个类似「饿了么」和「美团」首页的活动入口网格布局,要求如下:
6+
* **不能使用 `GridView`**
7+
* 支持 **左右滑动切换页面**
8+
* 支持 **自定义横向和纵向的 item 数量**
9+
* item 支持 **自定义图标和文字**
10+
* item 支持 **自定义高度**,布局高度依据 item 高度确定;
11+
* item 支持 **点击事件**
12+
13+
加分项:
14+
* 在底部实现一个页数指示器;
15+
* item 支持 **自定义各自的图标和文字的大小及样式**,同时保证布局高度自适应;
16+
* 布局可以根据不同页面的 item 数量,**在切换时平滑调整高度**
17+
* item 基于类 (class) 组织内容,布局提供接口用于自定义 `itemBuilder`: `Widget Function(_ItemData item)`
18+
* 开放实现自定义页数指示器的接口 `PreferredSizeWidget Function(PageController controller, int pageCount)? indicatorBuilder`
19+
20+
![](https://pic.alexv525.com/2021-04-04-Kapture%202021-04-04%20at%2018.02.20.gif)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
1. 2020-11-27 [《注册表单的实现》](1%20-%20注册表单的实现%20-%2020201127)
99
2. 2020-12-02 [《百格齐放》](2%20-%20百格齐放%20-%2020201202)
10+
2. 2021-04-04 [《活动入口网格》](3%20-%20活动入口网格%20-%20210404)
1011

1112
## 提交说明
1213

0 commit comments

Comments
 (0)