import 'package:flutter/material.dart';
class MainButton extends StatelessWidget{
final String text;
final Function() onPressed;
final Color color;
const MainButton({Key? key,
required this.text,
required this.onPressed,
required this.color
}) : super(key: key);
@override
Widget build(BuildContext context) {
return ElevatedButton(
style: ElevatedButton.styleFrom(
primary: color,
),
child: Text(text),
onPressed: onPressed,
);
}
}
No comments:
Post a Comment