configuração inicial Flutter
This commit is contained in:
28
lib/widgets/button_default.dart
Normal file
28
lib/widgets/button_default.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
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
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user