ConvexButton.fab constructor
ConvexButton.fab({})
Make a centered convex button.
Implementation
factory ConvexButton.fab({
Key? key,
double? size,
double? thickness,
double? top,
double? sigma,
double iconSize = 32,
double border = 2,
Color color = Colors.redAccent,
IconData icon = Icons.keyboard_voice,
Color? backgroundColor,
VoidCallback? onTap,
}) {
thickness = thickness ?? _DEFAULT_THICKNESS;
var fab = Container(
margin: EdgeInsets.only(bottom: thickness),
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(color: color, width: border),
),
child: Icon(icon, color: color, size: iconSize),
);
return ConvexButton(
key: key,
size: size,
thickness: thickness,
top: top,
backgroundColor: backgroundColor,
sigma: sigma,
child: GestureDetector(onTap: onTap, child: fab),
);
}