Skip to content

Commit 884fcfd

Browse files
committed
New
1 parent 8d638a1 commit 884fcfd

File tree

9 files changed

+250
-26
lines changed

9 files changed

+250
-26
lines changed

.idea/workspace.xml

Lines changed: 21 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Flutter-NoteBooks/demo15.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
> * FocusNode:用于管理焦点的类。
66
> * LayoutBuilder:一个响应父容器布局约束的构建器小部件,它允许根据父级的尺寸动态调整子小部件的布局。它特别适合用于自适应布局场景,确保 UI 在不同屏幕尺寸下都能合理显示。
77
> * ScrollController:用于控制滚动视图的一个类。它允许你在代码中管理滚动位置、监听滚动事件等。
8+
> * RawScrollbar:滚动条小部件,它允许你自定义滚动条的样式和行为。
9+
810

911
## FutureBuilder类
1012
### 默认构造函数
@@ -124,4 +126,59 @@ ScrollController({
124126
| onAttach | void Function | 在控制器附加到 Scrollable 时调用的回调函数 |
125127
| onDetach | void Function | 在控制器从 Scrollable 分离时调用的回调函数 |
126128

129+
## RawScrollbar类
130+
### 默认构造函数
131+
```text
132+
RawScrollbar({
133+
super.key,
134+
required this.child,
135+
this.controller,
136+
this.thumbVisibility,
137+
this.shape,
138+
this.radius,
139+
this.thickness,
140+
this.thumbColor,
141+
this.minThumbLength = _kMinThumbExtent,
142+
this.minOverscrollLength,
143+
this.trackVisibility,
144+
this.trackRadius,
145+
this.trackColor,
146+
this.trackBorderColor,
147+
this.fadeDuration = _kScrollbarFadeDuration,
148+
this.timeToFade = _kScrollbarTimeToFade,
149+
this.pressDuration = Duration.zero,
150+
this.notificationPredicate = defaultScrollNotificationPredicate,
151+
this.interactive,
152+
this.scrollbarOrientation,
153+
this.mainAxisMargin = 0.0,
154+
this.crossAxisMargin = 0.0,
155+
this.padding,
156+
})
157+
```
127158

159+
### RawScrollbar(...)参数解析
160+
| 参数名称 | 使用类型 | 参数介绍 |
161+
|-----------------------|-----------------------------------------------|--------------------------------------------------|
162+
| key | Key | 用于标识这个小部件,通常用于构建 widget 树时的性能优化 |
163+
| child | Widget | 必填参数,表示要包裹的子组件 |
164+
| controller | ScrollController | ScrollController 实例,用于控制和监听滚动事件 |
165+
| thumbVisibility | bool | 控制滑块的可见性,类型为 ScrollbarVisibility |
166+
| shape | OutlinedBorder | 用于定义滚动条的形状 |
167+
| radius | Radius | 定义滑块的圆角半径 |
168+
| thickness | double | 定义滑块的宽度 |
169+
| thumbColor | Color | 定义滑块的颜色 |
170+
| minThumbLength | double | 定义滑块的最小长度,默认为 _kMinThumbExtent |
171+
| minOverscrollLength | double | 定义滑块在超出可滚动区域时的最小长度 |
172+
| trackVisibility | bool | 控制轨道的可见性 |
173+
| trackRadius | Radius | 定义轨道的圆角半径 |
174+
| trackColor | Color | 定义轨道的颜色 |
175+
| trackBorderColor | Color | 定义轨道边框的颜色 |
176+
| fadeDuration | Duration | 定义滑块淡入淡出的持续时间,默认为 _kScrollbarFadeDuration |
177+
| timeToFade | Duration | 定义滑块消失的时间,默认为 _kScrollbarTimeToFade |
178+
| pressDuration | Duration | 定义滑块被按下的持续时间,默认为 Duration.zero |
179+
| notificationPredicate | bool Function | 定义通知的预测条件,默认为 defaultScrollNotificationPredicate |
180+
| interactive | bool | 定义滚动条是否支持交互 |
181+
| scrollbarOrientation | ScrollbarOrientation ScrollbarOrientation | 定义滚动条的方向(水平或垂直) |
182+
| mainAxisMargin | double | 定义滑块在主轴方向上的边距,默认为 0.0 |
183+
| crossAxisMargin | double | 定义滑块在交叉轴方向上的边距,默认为 0.0 |
184+
| padding | EdgeInsets | 定义滑块的内边距 |

Flutter-NoteBooks/demo16.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
> * CircularProgressIndicator:一个圆形进度条。
44
> * BoxDecoration:用于装饰Container等组件的类,可以让组件拥有背景颜色、渐变、圆角边框、阴影等效果。它提供了一些非常灵活的装饰属性,使你可以轻松地定制组件的外观。
55
6+
67
## LinearProgressIndicator类
78
### 默认构造函数
89
```text
@@ -116,3 +117,4 @@ BoxDecoration({
116117
| gradient | Gradient | 设置渐变效果 |
117118
| backgroundBlendMode | BlendMode | 设置背景的混合模式 |
118119
| shape | BoxShape | 用于设置组件的形状 |
120+

0 commit comments

Comments
 (0)