getCommonButtonSmall function
Implementation
Widget getCommonButtonSmall(String title, void Function() onPressed, bool isLoading){
return TextButton(
onPressed: onPressed,
style: ButtonStyle(
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)),
),
backgroundColor: WidgetStateProperty.all<Color>(black),
),
child: isLoading
? const Padding(
padding: EdgeInsets.only(top: 10,bottom: 10),
child: SizedBox(width: 20,height: 20,child: CircularProgressIndicator(color: white,strokeWidth: 2)),
)
: Padding(
padding: const EdgeInsets.fromLTRB(12, 2, 12, 2),
child: Text(title,
style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w500, color: Colors.white, ),
),
),
);
}