getCommonButtonBlack function

Widget getCommonButtonBlack(
  1. String title,
  2. bool _isLoading,
  3. void onPressed()
)

Implementation

Widget getCommonButtonBlack(String title, bool _isLoading, void Function() onPressed){
  return TextButton(
    onPressed: onPressed,
    style: ButtonStyle(
      shape: WidgetStateProperty.all<RoundedRectangleBorder>(
        RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(18.0),
        ),
      ),
      backgroundColor: WidgetStateProperty.all<Color>(black),
    ),
    child: _isLoading
      ? const Padding(
    padding: EdgeInsets.only(top: 8,bottom: 8),
    child: SizedBox(width: 22,height: 22,child: CircularProgressIndicator(color: white,strokeWidth: 2)),
  )
      : Padding(
      padding: const EdgeInsets.only(left: 12,right: 12,top: 8,bottom: 8),
      child: Text(
        title,
        style: TextStyle(fontSize: subTitle, fontWeight: FontWeight.w500, color: white,),
      ),
    ),
  );
}