CodeNestFloatingActionBtn.svg constructor
CodeNestFloatingActionBtn.svg({
- required String assetPath,
- required VoidCallback onPressed,
- Color iconColor = Colors.white,
- Color backgroundColor = Colors.blue,
- double elevation = 6.0,
- double size = 56.0,
- ShapeBorder shape = const CircleBorder(),
Constructor for using an SVG asset
Implementation
factory CodeNestFloatingActionBtn.svg({
required String assetPath,
required VoidCallback onPressed,
Color iconColor = Colors.white,
Color backgroundColor = Colors.blue,
double elevation = 6.0,
double size = 56.0,
ShapeBorder shape = const CircleBorder(),
}) {
return CodeNestFloatingActionBtn(
icon: SvgPicture.asset(assetPath, color: iconColor),
onPressed: onPressed,
backgroundColor: backgroundColor,
elevation: elevation,
size: size,
shape: shape,
);
}