ColabOutlinedButton.icon constructor
ColabOutlinedButton.icon({
- Key? key,
- required String label,
- VoidCallback? onPressed,
- bool upperCase = true,
- bool progressIndication = false,
- Color? backgroundColor,
- required IconData icon,
- required Color foreGroundColor,
- EdgeInsetsGeometry? padding,
Implementation
ColabOutlinedButton.icon({
super.key,
required String label,
super.onPressed,
bool upperCase = true,
bool progressIndication = false,
Color? backgroundColor,
required IconData icon,
required Color foreGroundColor,
EdgeInsetsGeometry? padding,
}) : super(
style: OutlinedButton.styleFrom(
side: BorderSide(color: foreGroundColor),
foregroundColor: foreGroundColor,
backgroundColor: backgroundColor,
),
child:
progressIndication
? Center(
child: SizedBox(
width: 18,
height: 18,
child: CircularProgressIndicator(),
),
)
: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(icon, size: 20, color: foreGroundColor),
SizedBox(width: 8),
Text(
upperCase ? label.toUpperCase() : label,
textAlign: TextAlign.center,
),
],
),
);