friendbuttons static method

Widget friendbuttons(
  1. String text,
  2. dynamic onPressed,
  3. Color color
)

Implementation

static Widget friendbuttons(String text, onPressed, Color color) {
  Color background = color;
  Color foregroundColor = Colors.white;
  return ElevatedButton(
    onPressed: () {
      onPressed();
    },
    style: ElevatedButton.styleFrom(
      backgroundColor: background, // Arka plan rengini belirleyin
      foregroundColor: foregroundColor,
      padding: const EdgeInsets.symmetric(vertical: 0, horizontal: 1),
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(8), // Kenar yarıçapını ayarlayın
      ),
    ),
    child: Text(
      text,
      style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 14),
    ),
  );
}