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
30 lines
675 B
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) {
|
|
return TextButton( // FlatButton
|
|
onPressed: onPressed,
|
|
// textColor: Colors.white,
|
|
child: Container(
|
|
height: 48,
|
|
width: double.infinity,
|
|
alignment: Alignment.center,
|
|
child: Text(
|
|
text!,
|
|
style: TextStyle(
|
|
fontSize: 18,
|
|
),
|
|
)));
|
|
}
|
|
}
|