Skip to content
Merged
Changes from 1 commit
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
28 changes: 28 additions & 0 deletions lib/src/extensions/widget_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1384,4 +1384,32 @@ extension StyledWidget on Widget {
maxHeight: maxHeight,
child: this,
);

Widget material({
Key? key,
MaterialType type = MaterialType.canvas,
double elevation = 0.0,
Color? color,
Color? shadowColor,
TextStyle? textStyle,
BorderRadiusGeometry? borderRadius,
ShapeBorder? shape,
bool borderOnForeground = true,
Clip clipBehavior = Clip.none,
Duration animationDuration = kThemeChangeDuration,
}) =>
Material(
key: key,
type: type,
elevation: elevation,
color: color,
shadowColor: shadowColor,
textStyle: textStyle,
borderRadius: borderRadius,
shape: shape,
borderOnForeground: borderOnForeground,
clipBehavior: clipBehavior,
animationDuration: animationDuration,
child: this,
);
}