You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
675 B

3 years ago
import 'package:flutter/material.dart';
class MyButton extends StatelessWidget {
const MyButton({
Key? key,
this.text = '',
@required this.onPressed,
}) : super(key: key);
final String? text;
final VoidCallback? onPressed;
@override
Widget build(BuildContext context) {
3 years ago
return TextButton( // FlatButton
3 years ago
onPressed: onPressed,
3 years ago
// textColor: Colors.white,
3 years ago
child: Container(
height: 48,
width: double.infinity,
alignment: Alignment.center,
child: Text(
text!,
style: TextStyle(
fontSize: 18,
),
)));
}
}