Skip to content

Commit 8b3ec2d

Browse files
committed
release/v2.2.0
1 parent 67598b7 commit 8b3ec2d

File tree

5 files changed

+22
-7
lines changed

5 files changed

+22
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 2.2.0
2+
- Added *clipBehavior* and the *elevation* arguments of the *MaterialIndicatorDelegate* class.
13
## 2.1.0
24
- Updated the dart sdk constraints
35
## 2.0.1

example/lib/widgets/example_list.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ class Element extends StatelessWidget {
7272
children: <Widget>[
7373
FakeBox(height: 80, width: 80, child: child),
7474
const SizedBox(width: 20),
75-
Expanded(
75+
const Expanded(
7676
child: Column(
7777
mainAxisSize: MainAxisSize.min,
7878
mainAxisAlignment: MainAxisAlignment.start,
7979
crossAxisAlignment: CrossAxisAlignment.start,
80-
children: const [
80+
children: [
8181
FakeBox(height: 8, width: double.infinity),
8282
FakeBox(height: 8, width: double.infinity),
8383
FakeBox(height: 8, width: 200),

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ packages:
4747
path: ".."
4848
relative: true
4949
source: path
50-
version: "2.1.0"
50+
version: "2.2.0"
5151
fake_async:
5252
dependency: transitive
5353
description:

lib/src/delegates/material_indicator_delegate.dart

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,13 @@ class MaterialIndicatorDelegate extends IndicatorBuilderDelegate {
3131

3232
/// The indicator background color
3333
final Color? backgroundColor;
34-
35-
/// The indicator elevation
34+
35+
/// The z-coordinate at which to place this material relative to its parent.
36+
///
37+
/// This controls the size of the shadow below the material and
38+
/// the opacity of the elevation overlay color if it is applied.
39+
///
40+
/// Defaults to `2.0`.
3641
final double elevation;
3742

3843
/// Builds the content for the indicator container
@@ -41,9 +46,15 @@ class MaterialIndicatorDelegate extends IndicatorBuilderDelegate {
4146
/// Builds the scrollable.
4247
final IndicatorBuilder scrollableBuilder;
4348

44-
/// When set to *true*, the indicator will rotate in the [IndicatorState.loading] state.
49+
/// When set to *true*, the indicator will rotate
50+
/// in the [IndicatorState.loading] state.
4551
final bool withRotation;
4652

53+
/// The content will be clipped (or not) according to this option.
54+
///
55+
/// Defaults to [Clip.none].
56+
final Clip clipBehavior;
57+
4758
const MaterialIndicatorDelegate({
4859
required this.builder,
4960
this.scrollableBuilder = _defaultBuilder,
@@ -52,6 +63,7 @@ class MaterialIndicatorDelegate extends IndicatorBuilderDelegate {
5263
this.edgeOffset = 0.0,
5364
this.withRotation = true,
5465
this.elevation = 2.0,
66+
this.clipBehavior = Clip.none,
5567
});
5668

5769
static Widget _defaultBuilder(
@@ -88,6 +100,7 @@ class MaterialIndicatorDelegate extends IndicatorBuilderDelegate {
88100
margin: const EdgeInsets.all(4.0),
89101
child: Material(
90102
type: MaterialType.circle,
103+
clipBehavior: clipBehavior,
91104
color: backgroundColor,
92105
elevation: elevation,
93106
child: _InfiniteRotation(

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: custom_refresh_indicator
22
description: Flutter Widget that make it easy to implement custom refresh indicator.
3-
version: 2.1.0
3+
version: 2.2.0
44
repository: https://github.com/gonuit/flutter-custom-refresh-indicator
55
issue_tracker: https://github.com/gonuit/flutter-custom-refresh-indicator/issues
66
homepage: https://github.com/gonuit/flutter-custom-refresh-indicator

0 commit comments

Comments
 (0)