TemplatedSnackbar constructor
TemplatedSnackbar({
- Key? key,
- required dynamic title,
- required dynamic subTitle,
- required dynamic titleStyle,
- required dynamic subTitleStyle,
- required dynamic backgroundColor,
- required dynamic duration,
- required dynamic contentPadding,
- required dynamic outerPadding,
- required dynamic borderRadius,
- required dynamic animationCurve,
- required dynamic animateFrom,
- required dynamic elevation,
- required dynamic persist,
- required dynamic onDismissed,
- dynamic titleWidget,
- dynamic subTitleWidget,
- dynamic leading,
- dynamic trailing,
- dynamic shadowColor,
- dynamic distanceToTravelFromStartToEnd,
Implementation
TemplatedSnackbar({
super.key,
required title,
required subTitle,
required titleStyle,
required subTitleStyle,
required backgroundColor,
required duration,
required contentPadding,
required outerPadding,
required borderRadius,
required animationCurve,
required animateFrom,
required elevation,
required persist,
required onDismissed,
titleWidget,
subTitleWidget,
leading,
trailing,
shadowColor,
distanceToTravelFromStartToEnd,
}) : super(
shadowColor: shadowColor,
duration: duration,
animationCurve: animationCurve,
animateFrom: animateFrom,
elevation: elevation,
persist: persist,
onDismissed: onDismissed,
outerPadding: outerPadding,
backgroundColor: backgroundColor,
borderRadius: borderRadius,
distanceToTravelFromStartToEnd: distanceToTravelFromStartToEnd,
child: Container(
padding: contentPadding,
child: Row(
children: [
if (leading != null) leading!,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
title.isNotEmpty
? Text(
title,
style: titleStyle,
)
: titleWidget != null
? titleWidget!
: const SizedBox(),
subTitle.isNotEmpty
? Text(
subTitle,
style: subTitleStyle,
)
: subTitleWidget != null
? subTitleWidget!
: const SizedBox(),
],
),
const Spacer(),
if (trailing != null) trailing!,
],
),
),
);