Skip to content

Commit 67598b7

Browse files
lukepighettigonuit
andauthored
allow changing the elevation of the material indicator (#41)
Co-authored-by: Kamil Klyta <37882650+gonuit@users.noreply.github.com>
1 parent fc4ef21 commit 67598b7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/src/delegates/material_indicator_delegate.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ class MaterialIndicatorDelegate extends IndicatorBuilderDelegate {
3131

3232
/// The indicator background color
3333
final Color? backgroundColor;
34+
35+
/// The indicator elevation
36+
final double elevation;
3437

3538
/// Builds the content for the indicator container
3639
final MaterialIndicatorBuilder builder;
@@ -48,6 +51,7 @@ class MaterialIndicatorDelegate extends IndicatorBuilderDelegate {
4851
this.displacement = 40.0,
4952
this.edgeOffset = 0.0,
5053
this.withRotation = true,
54+
this.elevation = 2.0,
5155
});
5256

5357
static Widget _defaultBuilder(
@@ -85,7 +89,7 @@ class MaterialIndicatorDelegate extends IndicatorBuilderDelegate {
8589
child: Material(
8690
type: MaterialType.circle,
8791
color: backgroundColor,
88-
elevation: 2.0,
92+
elevation: elevation,
8993
child: _InfiniteRotation(
9094
running: withRotation && controller.isLoading,
9195
child: builder(context, controller),

0 commit comments

Comments
 (0)