forked from alexvasl/drifter_app
35 lines
780 B
Dart
35 lines
780 B
Dart
|
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(
|
||
|
backgroundColor: AppColors.mainDarkBlue,
|
||
|
shape: RoundedRectangleBorder(
|
||
|
borderRadius: BorderRadius.circular(8),
|
||
|
),
|
||
|
),
|
||
|
child: Text(
|
||
|
label,
|
||
|
style: const TextStyle(
|
||
|
fontSize: 16,
|
||
|
fontWeight: FontWeight.bold,
|
||
|
color: Colors.white,
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|