customTextButton function

Widget customTextButton({
  1. required BuildContext context,
  2. required String text,
  3. required dynamic callback(),
  4. double width = 64,
  5. double height = 24,
})

Implementation

Widget customTextButton(
    {required BuildContext context,
    required String text,
    required Function() callback,
    double width = 64,
    double height = 24}) {
  return SizedBox(
    height: height,
    width: width,
    child: InkWell(
        onTap: callback,
        child: Align(
          alignment: Alignment.center,
          child: Text(
            text,
            style: Theme.of(context).textTheme.bodySmall?.copyWith(
                color: Theme.of(context).primaryColor,
                fontWeight: FontWeight.bold),
          ),
        )),
  );
}