Skip to content

Commit

Permalink
Merge pull request #72 from icapps/feature/touchfeedback-shadow
Browse files Browse the repository at this point in the history
Added support for setting the touch feedback shadow
  • Loading branch information
vanlooverenkoen committed Jan 26, 2022
2 parents 2a4b87d + 3b87218 commit fb75781
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/src/widget/touch_feedback/touch_feedback.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class TouchFeedBack extends StatelessWidget {
final Color color;
final BorderRadius? borderRadius;
final double elevation;
final Color? shadowColor;
final ShapeBorder? shapeBorder;

const TouchFeedBack({
Expand All @@ -21,6 +22,7 @@ class TouchFeedBack extends StatelessWidget {
this.androidSplashColor,
this.color = Colors.transparent,
this.elevation = 0,
this.shadowColor,
this.shapeBorder,
Key? key,
}) : super(key: key);
Expand All @@ -36,6 +38,7 @@ class TouchFeedBack extends StatelessWidget {
color: color,
borderRadius: borderRadius,
elevation: elevation,
shadowColor: shadowColor,
shapeBorder: shapeBorder,
);
}
Expand All @@ -45,6 +48,7 @@ class TouchFeedBack extends StatelessWidget {
borderRadius: borderRadius,
color: color,
elevation: elevation,
shadowColor: shadowColor,
shape: shapeBorder,
child: onClick == null
? child
Expand All @@ -66,13 +70,15 @@ class TouchFeedBackIOS extends StatefulWidget {
final BorderRadius? borderRadius;
final ShapeBorder? shapeBorder;
final double elevation;
final Color? shadowColor;

const TouchFeedBackIOS({
required this.child,
required this.onClick,
this.borderRadius,
this.color = Colors.transparent,
this.shapeBorder,
this.shadowColor,
this.elevation = 0,
Key? key,
}) : super(key: key);
Expand Down Expand Up @@ -102,6 +108,7 @@ class _TouchFeedBackIOSState extends State<TouchFeedBackIOS> {
child: widget.child,
shape: widget.shapeBorder,
elevation: widget.elevation,
shadowColor: widget.shadowColor,
),
),
);
Expand Down

0 comments on commit fb75781

Please sign in to comment.