defaultButton static method

Widget defaultButton({
  1. required VoidCallback handler,
  2. required Widget widget,
  3. Color? fillColor,
  4. bool border = false,
  5. EdgeInsets padding = const EdgeInsets.only(top: 10),
})

Implementation

static Widget defaultButton({
  required VoidCallback handler,
  required Widget widget,
  Color? fillColor,
  bool border = false,
  EdgeInsets padding = const EdgeInsets.only(top: 10),
}) {
  return Padding(
    padding: padding,
    child: ElevatedButton(
      onPressed: handler,
      style: ButtonStyle(
        backgroundColor: MaterialStateProperty.all<Color?>(fillColor),
      ),
      child: widget,
    ),
  );
}