buildBtnFD method

Widget buildBtnFD({
  1. required bool isAvailable,
  2. required BoxDecoration decoration,
  3. required BorderRadius borderRadius,
  4. Color textColor = Colors.white,
  5. GestureTapCallback? onTap,
})

Implementation

Widget buildBtnFD(
    {required bool isAvailable,
    required BoxDecoration decoration,
    required BorderRadius borderRadius,
    Color textColor = Colors.white,
    GestureTapCallback? onTap}) {
  return Material(
    color: Colors.transparent,
    child: Ink(
        decoration: decoration,
        child: InkWell(
          onTap: isAvailable
              ? () {
                  onTap?.call();
                }
              : null,
          borderRadius: borderRadius,
          child: Container(
            alignment: Alignment.center,
            height: 50.h,
            width: double.infinity,
            child: Text(
              this,
              style: TextStyle(fontSize: 16.sp, color: textColor, fontWeight: FontWeight.bold),
            ),
          ),
        )),
  );
}