first commit
This commit is contained in:
43
lib/widgets/my_text_button.dart
Normal file
43
lib/widgets/my_text_button.dart
Normal file
@@ -0,0 +1,43 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class MyTextButton extends StatelessWidget {
|
||||
const MyTextButton({
|
||||
super.key,
|
||||
required this.onTap,
|
||||
required this.screenWidth,
|
||||
this.screenHeight = 80.0,
|
||||
this.fontSize = 20.0,
|
||||
this.backgroundColor = const Color.fromARGB(255, 66, 66, 66),
|
||||
this.textColor = Colors.white,
|
||||
required this.buttonText,
|
||||
});
|
||||
|
||||
final void Function()? onTap;
|
||||
final double screenWidth;
|
||||
final double screenHeight;
|
||||
final double fontSize;
|
||||
final Color backgroundColor;
|
||||
final Color textColor;
|
||||
final String buttonText;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
width: screenWidth,
|
||||
height: screenHeight,
|
||||
color: backgroundColor,
|
||||
child: Text(
|
||||
buttonText,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: fontSize,
|
||||
color: textColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user