actionButton method

TextButton actionButton(
  1. String value,
  2. Color color, {
  3. bool activate = true,
})

Implementation

TextButton actionButton(String value, Color color, {bool activate = true}) {
  return TextButton(
    style: TextButton.styleFrom(
        foregroundColor: Colors.white,
        backgroundColor: color,
        padding: const EdgeInsets.all(16)),
    child: Text(value),
    onPressed: () => action(activate),
  );
}