-
Couldn't load subscription status.
- Fork 151
feat:优化首页交互逻辑 #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat:优化首页交互逻辑 #18
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0475ded
feat:add scrollable demo
7e7dcc9
feat: ListView
DIVINER-only 33e99ba
Merge branch 'test' of https://github.com/efoxTeam/flutter-ui into test
DIVINER-only f267807
feat: add scrollable
wanwusangzhi ec7a819
feat:优化首页功能
wanwusangzhi a1f661b
优化首页功能
wanwusangzhi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1 change: 1 addition & 0 deletions
docs/widget/regular/listview/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ## **ListView** |
59 changes: 59 additions & 0 deletions
docs/widget/scrollview/customscrollview/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| ## **CustomScrollView** | ||
|
|
||
| > 一个使用slivers创建自定义的滚动效果的ScrollView | ||
|
|
||
| ### 构造方法 | ||
| ``` | ||
| CustomScrollView({ | ||
| Key key, | ||
| Axis scrollDirection = Axis.vertical, | ||
| bool reverse = false, | ||
| ScrollController controller, | ||
| bool primary, | ||
| ScrollPhysics physics, | ||
| bool shrinkWrap = false, | ||
| Key center, | ||
| double anchor = 0.0, | ||
| double cacheExtent, | ||
| this.slivers = const <Widget>[], | ||
| int semanticChildCount, | ||
| DragStartBehavior dragStartBehavior = DragStartBehavior.start, | ||
| }) | ||
| ``` | ||
|
|
||
| ### 属性介绍 | ||
| > viewportBuilder:显示滚动组件的属性,实例CustomScrollView/SingleChildScrollView实现不同的滚动效果。 | ||
| - CustomScrollView: 实现随滚动条,appbar向上移动效果 | ||
| - SingleChildScrollView:参考SingleChildScrollView | ||
|
|
||
| ### CustomScrollView | ||
| > CustomScrollView:结合slivers使用,常用小组件为SliverAppBar, SliverGrid,SliverFixedExtentList | ||
| > SliverAppBar: 滚动标题头小组件 | ||
| ```dart | ||
| SliverAppBar({ | ||
| Key key, | ||
| this.leading, | ||
| this.automaticallyImplyLeading = true, | ||
| this.title, | ||
| this.actions, | ||
| this.flexibleSpace, | ||
| this.bottom, | ||
| this.elevation, | ||
| this.forceElevated = false, | ||
| this.backgroundColor, | ||
| this.brightness, | ||
| this.iconTheme, | ||
| this.textTheme, | ||
| this.primary = true, | ||
| this.centerTitle, | ||
| this.titleSpacing = NavigationToolbar.kMiddleSpacing, | ||
| this.expandedHeight, | ||
| this.floating = false, | ||
| this.pinned = false, | ||
| this.snap = false, | ||
| }) | ||
|
|
||
| ``` | ||
| - pinned: 默认为false, 非滚动至顶部时,标题头始终处于隐藏,当true时,标题头始终显示,但不会显示flexibleSpace内容 | ||
| - floating: 默认为false,当为true时,下拉会显示appbar,但不会自动展开flexibleSpace的内容 | ||
| - snap: 默认为false,当floating为true, 当前才能为true,向下拉时,会自动显示flexibleSpace的内容 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ## **ListView** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
docs/widget/scrollview/singlechildscrollview/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| ## **SingleChildScrollView** | ||
| > 当组件内容超出可视范围或高度时,可增加SingleChildScrollView,通过滚动解决问题 | ||
|
|
||
| ### 构造函数 | ||
|
|
||
| ``` | ||
| SingleChildScrollView({ | ||
| Key key, | ||
| this.scrollDirection = Axis.vertical, | ||
| this.reverse = false, | ||
| this.padding, | ||
| bool primary, | ||
| this.physics, | ||
| this.controller, | ||
| this.child, | ||
| this.dragStartBehavior = DragStartBehavior.down, | ||
| }); | ||
| ``` | ||
|
|
||
| ### 属性介绍 | ||
| > 滚动参数很多同等gridview介绍。 | ||
|
|
||
| ### 用例 | ||
| > 在固定容器超出屏幕高度则滚动显示 | ||
| ``` | ||
| Container( | ||
| decoration: BoxDecoration( | ||
| border: Border.all( | ||
| width: 1, | ||
| color: Colors.blue, | ||
| ), | ||
| ), | ||
| height: 100, | ||
| child: SingleChildScrollView( | ||
| child: Text( | ||
| '这里是高度100,增加SingleChildScrollView, 内容超过时可滚动。这里是高度100,增加SingleChildScrollView, 内容超过时可滚动。这里是高度100,增加SingleChildScrollView, 内容超过时可滚动。这里是高度100,增加SingleChildScrollView, 内容超过时可滚动。', | ||
| style: TextStyle( | ||
| color: Colors.blue, | ||
| ), | ||
| ), | ||
| ), | ||
| ) | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.