getCommonButtonWhite function

Widget getCommonButtonWhite(
  1. String title,
  2. void onPressed(),
  3. bool isLoading
)

Implementation

Widget getCommonButtonWhite(String title, void Function() onPressed, bool isLoading) {
  return TextButton(
    onPressed: onPressed,
    style: ButtonStyle(
      shape: WidgetStateProperty.all<RoundedRectangleBorder>(
        RoundedRectangleBorder(borderRadius: BorderRadius.circular(kButtonCornerRadius)),
      ),
      backgroundColor: WidgetStateProperty.all<Color>(white),
    ),
    child: isLoading
      ? const Padding(
        padding: EdgeInsets.only(top: 8,bottom: 8),
        child: SizedBox(width: 20,height: 20,child: CircularProgressIndicator(color: black,strokeWidth: 2)),
      )
      : Padding(
      padding: const EdgeInsets.only(top: 8,bottom: 8),
        child: Text(title,
        style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w400, color: black,),
      ),
    ),
  );
}