35 lines
730 B
Dart
35 lines
730 B
Dart
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
import '../../app/themes/app_colors.dart';
|
||
|
|
||
|
class MyButton extends StatelessWidget {
|
||
|
const MyButton({
|
||
|
Key? key,
|
||
|
required this.text,
|
||
|
this.onPressed,
|
||
|
}) : super(key: key);
|
||
|
|
||
|
final String text;
|
||
|
final VoidCallback? onPressed;
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return ElevatedButton(
|
||
|
style: ElevatedButton.styleFrom(
|
||
|
backgroundColor: mainColor,
|
||
|
shape: RoundedRectangleBorder(
|
||
|
borderRadius: BorderRadius.circular(30),
|
||
|
),
|
||
|
),
|
||
|
onPressed: onPressed,
|
||
|
child: Text(
|
||
|
text,
|
||
|
style: const TextStyle(
|
||
|
color: backgroundColor,
|
||
|
fontSize: 18,
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|