@@ -18,7 +18,7 @@ val pullToRefreshState = rememberPullToRefreshState()
18
18
var items by remember { mutableStateOf(1 ) }
19
19
val scope = rememberCoroutineScope()
20
20
21
- Surface {
21
+ Surface {
22
22
PullToRefresh (
23
23
pullToRefreshState = pullToRefreshState,
24
24
onRefresh = {
@@ -79,6 +79,7 @@ if (pullToRefreshState.isRefreshing) {
79
79
| pullToRefreshState | PullToRefreshState | Refresh state controller | - | Yes |
80
80
| onRefresh | () -> Unit | Refresh callback function | {} | Yes |
81
81
| modifier | Modifier | Container modifier | Modifier | No |
82
+ | contentPadding | PaddingValues | Content padding | PaddingValues(0.dp) | No |
82
83
| color | Color | Indicator color | PullToRefreshDefaults.color | No |
83
84
| circleSize | Dp | Indicator circle size | PullToRefreshDefaults.circleSize | No |
84
85
| refreshTexts | List\< String> | Text list for different states | PullToRefreshDefaults.refreshTexts | No |
@@ -91,29 +92,29 @@ PullToRefreshState controls the refresh state and can be created using `remember
91
92
92
93
#### Properties
93
94
94
- | Property Name | Type | Description | Default Value | Required |
95
- | --------------------------- | ------------ | ---------------------- | ------------- | -------- |
96
- | refreshState | RefreshState | Current refresh state | - | Yes |
97
- | isRefreshing | Boolean | Is refreshing | - | Yes |
98
- | pullProgress | Float | Pull progress (0-1) | - | Yes |
99
- | refreshCompleteAnimProgress | Float | Complete anim progress | - | Yes |
95
+ | Property Name | Type | Description | Required |
96
+ | --------------------------- | ------------ | ---------------------- | -------- |
97
+ | refreshState | RefreshState | Current refresh state | Yes |
98
+ | isRefreshing | Boolean | Is refreshing | Yes |
99
+ | pullProgress | Float | Pull progress (0-1) | Yes |
100
+ | refreshCompleteAnimProgress | Float | Complete anim progress | Yes |
100
101
101
102
#### Methods
102
103
103
- | Method Name | Parameters | Type | Description | Default Value | Required |
104
- | ------------------ | -------------------- | ---- | ------------------------------ | ------------- | -------- |
105
- | completeRefreshing | (suspend () -> Unit) | - | Complete refresh with callback | - | Yes |
104
+ | Method Name | Parameters | Description | Required |
105
+ | ------------------ | -------------------- | ------------------------------ | -------- |
106
+ | completeRefreshing | (suspend () -> Unit) | Complete refresh with callback | Yes |
106
107
107
108
### PullToRefreshDefaults Object
108
109
109
110
PullToRefreshDefaults provides default values for the component.
110
111
111
- | Property Name | Type | Description | Default Value |
112
- | ---------------- | ------------- | ----------------------- | --------------------------------------------------- |
113
- | color | Color | Default indicator color | Color.Gray |
114
- | circleSize | Dp | Default indicator size | 20.dp |
115
- | refreshTexts | List\< String> | Default text list | [ "Pull down to refresh", "Release to refresh", ...] |
116
- | refreshTextStyle | TextStyle | Default text style | TextStyle(fontSize = 14.sp, fontWeight = Bold, ...) |
112
+ | Property Name | Type | Description | Default Value |
113
+ | ---------------- | ------------- | ----------------------- | ----------------------------------------------------------------------------------------- |
114
+ | color | Color | Default indicator color | Color.Gray |
115
+ | circleSize | Dp | Default indicator size | 20.dp |
116
+ | refreshTexts | List\< String> | Default text list | [ "Pull down to refresh", "Release to refresh", "Refreshing ...", "Refreshed successfully" ] |
117
+ | refreshTextStyle | TextStyle | Default text style | TextStyle(fontSize = 14.sp, fontWeight = Bold, color = color) |
117
118
118
119
## Advanced Usage
119
120
0 commit comments