30 lines
690 B
Dart
30 lines
690 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;
|
|
|
|
const MyElevatedButton({
|
|
Key? key,
|
|
required this.title,
|
|
required this.onPressed,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ElevatedButton(
|
|
style: ButtonStyle(
|
|
backgroundColor: MaterialStateProperty.all(AppColor.primaryColor),
|
|
),
|
|
onPressed: onPressed,
|
|
child: Text(
|
|
title,
|
|
style: AppStyle.title.copyWith(color: AppColor.secondaryColor),
|
|
),
|
|
);
|
|
}
|
|
}
|