getFineButtonShape static method
Implementation
static Widget getFineButtonShape(String? buttonLabel,
{Icon? icon,
ButtonIconPositionType iconPositionType = ButtonIconPositionType.left,
bool hasRadiusFactor = true,
Color buttonBodyColor = const Color(0xffeef2f7),
Color buttonBorderColor = Colors.indigo,
Color? textColor,
bool showBorder = false,
String tooltipText = ""}) {
icon = icon != null ? Icon(icon.icon, color: buttonBorderColor) : null;
return Container(
decoration: BoxDecoration(
color: buttonBodyColor,
borderRadius: const BorderRadius.all(Radius.circular(7.0)),
border: showBorder ? Border.all(color: buttonBorderColor) : Border.all(color: Colors.transparent),
),
child: Material(
color: Colors.transparent,
child: Tooltip(
message: tooltipText,
child: InkWell(
splashColor: Colors.white24,
borderRadius: const BorderRadius.all(Radius.circular(7.0)),
child: Padding(
padding: const EdgeInsets.only(top: 8, bottom: 8, left: 7, right: 7),
child: Center(
child: RichText(
text: TextSpan(
style: TextStyle(
fontWeight: FontWeight.w400,
fontSize: 16,
letterSpacing: 0.27,
color: textColor ?? Colors.black,
),
children: [
if (icon != null)
WidgetSpan(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 2.0),
child: icon,
),
),
TextSpan(text: buttonLabel),
],
),
),
),
),
),
),
),
);
}