textButton static method

Widget textButton({
  1. required VoidCallback handler,
  2. required Widget widget,
  3. EdgeInsets padding = const EdgeInsets.only(top: 10),
  4. Color? overlayColor,
})

Implementation

static Widget textButton({
  required VoidCallback handler,
  required Widget widget,
  EdgeInsets padding = const EdgeInsets.only(top: 10),
  Color? overlayColor,
}) {
  return Padding(
    padding: padding,
    child: TextButton(
      onPressed: handler,
      style: ButtonStyle(
        overlayColor: MaterialStateProperty.all<Color?>(overlayColor),
      ),
      child: widget,
    ),
  );
}