2023-05-12 17:28:36 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:drifter/theme/app_colors.dart';
|
|
|
|
|
|
|
|
class OkButton extends StatelessWidget {
|
|
|
|
const OkButton({
|
|
|
|
super.key,
|
|
|
|
required this.onPressed,
|
|
|
|
required this.label,
|
|
|
|
});
|
|
|
|
|
|
|
|
final void Function()? onPressed;
|
|
|
|
final String label;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return ElevatedButton(
|
|
|
|
onPressed: onPressed,
|
|
|
|
style: ElevatedButton.styleFrom(
|
2023-05-17 23:16:20 +00:00
|
|
|
backgroundColor: AppColors.background,
|
2023-05-12 17:28:36 +00:00
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Text(
|
|
|
|
label,
|
|
|
|
style: const TextStyle(
|
|
|
|
fontSize: 16,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|