29 lines
599 B
Dart
29 lines
599 B
Dart
import 'package:flutter/material.dart';
|
|
class ButtonDefault extends StatelessWidget {
|
|
var onPressed;
|
|
String title;
|
|
Color background;
|
|
Color textColor;
|
|
|
|
ButtonDefault({
|
|
required this.onPressed,
|
|
required this.title,
|
|
this.background = Colors.black38,
|
|
this.textColor = Colors.white
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return TextButton(
|
|
onPressed: onPressed,
|
|
style: TextButton.styleFrom(
|
|
backgroundColor: background,
|
|
foregroundColor: textColor,
|
|
),
|
|
child: Text(
|
|
title
|
|
)
|
|
);
|
|
}
|
|
}
|