From 87ab8d9e78dc446c8bb6f62920dcc71257d4a35c Mon Sep 17 00:00:00 2001 From: Anigulig Date: Thu, 13 Aug 2020 07:45:57 +0500 Subject: [PATCH 1/2] added splashRadius field --- example/ios/Flutter/.last_build_id | 1 + example/ios/Runner.xcodeproj/project.pbxproj | 3 --- lib/animated_icon_button.dart | 7 +++++++ 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 example/ios/Flutter/.last_build_id diff --git a/example/ios/Flutter/.last_build_id b/example/ios/Flutter/.last_build_id new file mode 100644 index 0000000..5c8cb4b --- /dev/null +++ b/example/ios/Flutter/.last_build_id @@ -0,0 +1 @@ +a3c81953453de1dc1b5b6fdbfa1e257c \ No newline at end of file diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 5f1bf4c..d59cc08 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -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; diff --git a/lib/animated_icon_button.dart b/lib/animated_icon_button.dart index 177968c..d40b3c1 100644 --- a/lib/animated_icon_button.dart +++ b/lib/animated_icon_button.dart @@ -141,6 +141,8 @@ class AnimatedIconButton extends StatefulWidget { /// background color whenever [AnimatedIconButton] is pressed. final AnimationController animationController; + double splashRadius; + AnimatedIconButton({ Key key, this.size, @@ -164,6 +166,7 @@ class AnimatedIconButton extends StatefulWidget { this.endBackgroundColor, this.startBackgroundColor, this.animationController, + this.splashRadius, }); @override _AnimatedIconButtonState createState() => _AnimatedIconButtonState( @@ -188,6 +191,7 @@ class AnimatedIconButton extends StatefulWidget { endBackgroundColor: this.endBackgroundColor, startBackgroundColor: this.startBackgroundColor, animationController: this.animationController, + splashRadius: this.splashRadius, ); } @@ -215,6 +219,7 @@ class _AnimatedIconButtonState extends State this.endBackgroundColor, this.startBackgroundColor, this.animationController, + this.splashRadius, }); double size; Icon startIcon; @@ -237,6 +242,7 @@ class _AnimatedIconButtonState extends State EdgeInsets padding; Alignment alignment; AnimationController animationController; + double splashRadius; bool hasCustomAnimationController; Icon nowIcon; @@ -351,6 +357,7 @@ class _AnimatedIconButtonState extends State visualDensity: visualDensity, padding: padding ?? const EdgeInsets.all(8.0), alignment: alignment ?? Alignment.center, + splashRadius: splashRadius, ); } } From 33f7d328fbbdefb3a4a04acc9c12b4f9ebb6fe02 Mon Sep 17 00:00:00 2001 From: Anigulig Date: Fri, 14 Aug 2020 00:23:47 +0500 Subject: [PATCH 2/2] Make field final and provide doc --- lib/animated_icon_button.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/animated_icon_button.dart b/lib/animated_icon_button.dart index d40b3c1..0854084 100644 --- a/lib/animated_icon_button.dart +++ b/lib/animated_icon_button.dart @@ -141,7 +141,11 @@ class AnimatedIconButton extends StatefulWidget { /// background color whenever [AnimatedIconButton] is pressed. final AnimationController animationController; - double splashRadius; + /// The splash radius. + /// + /// If null, default splash radius of [Material.defaultSplashRadius] is used. + /// Field of IconButton + final double splashRadius; AnimatedIconButton({ Key key,