Files
tripz/lib/views/widgets/elevated_btn.dart
Hamza-Ayed 8c61a79de3 2/9/1
2024-02-09 02:56:37 +03:00

32 lines
771 B
Dart

import 'package:flutter/material.dart';
import 'package:ride/constant/style.dart';
import '../../constant/colors.dart';
class MyElevatedButton extends StatelessWidget {
final String title;
final VoidCallback onPressed;
final Color kolor;
const MyElevatedButton({
Key? key,
required this.title,
required this.onPressed,
this.kolor = AppColor.primaryColor,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(kolor),
),
onPressed: onPressed,
child: Text(
title,
textAlign: TextAlign.center,
style: AppStyle.title.copyWith(color: AppColor.secondaryColor),
),
);
}
}