getCommonButtonWitoutFill function

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

Implementation

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