ColabOutlinedButton.icon constructor

ColabOutlinedButton.icon({
  1. Key? key,
  2. required String label,
  3. VoidCallback? onPressed,
  4. bool upperCase = true,
  5. bool progressIndication = false,
  6. Color? backgroundColor,
  7. required IconData icon,
  8. required Color foreGroundColor,
  9. 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,
                   ),
                 ],
               ),
     );