Skip to content
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

added splashRadius field #3

Merged
merged 2 commits into from
Aug 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions example/ios/Flutter/.last_build_id
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a3c81953453de1dc1b5b6fdbfa1e257c
3 changes: 0 additions & 3 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -241,7 +241,6 @@
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -318,7 +317,6 @@
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -374,7 +372,6 @@
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
11 changes: 11 additions & 0 deletions lib/animated_icon_button.dart
Original file line number Diff line number Diff line change
@@ -141,6 +141,12 @@ class AnimatedIconButton extends StatefulWidget {
/// background color whenever [AnimatedIconButton] is pressed.
final AnimationController animationController;

/// The splash radius.
///
/// If null, default splash radius of [Material.defaultSplashRadius] is used.
/// Field of IconButton
final double splashRadius;

AnimatedIconButton({
Key key,
this.size,
@@ -164,6 +170,7 @@ class AnimatedIconButton extends StatefulWidget {
this.endBackgroundColor,
this.startBackgroundColor,
this.animationController,
this.splashRadius,
});
@override
_AnimatedIconButtonState createState() => _AnimatedIconButtonState(
@@ -188,6 +195,7 @@ class AnimatedIconButton extends StatefulWidget {
endBackgroundColor: this.endBackgroundColor,
startBackgroundColor: this.startBackgroundColor,
animationController: this.animationController,
splashRadius: this.splashRadius,
);
}

@@ -215,6 +223,7 @@ class _AnimatedIconButtonState extends State<AnimatedIconButton>
this.endBackgroundColor,
this.startBackgroundColor,
this.animationController,
this.splashRadius,
});
double size;
Icon startIcon;
@@ -237,6 +246,7 @@ class _AnimatedIconButtonState extends State<AnimatedIconButton>
EdgeInsets padding;
Alignment alignment;
AnimationController animationController;
double splashRadius;

bool hasCustomAnimationController;
Icon nowIcon;
@@ -351,6 +361,7 @@ class _AnimatedIconButtonState extends State<AnimatedIconButton>
visualDensity: visualDensity,
padding: padding ?? const EdgeInsets.all(8.0),
alignment: alignment ?? Alignment.center,
splashRadius: splashRadius,
);
}
}