You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cloudsolutions-atoms/old_lib/views/widgets/buttons/app_flat_button.dart

28 lines
791 B
Dart

import 'package:flutter/material.dart';
import '../../app_style/sizing.dart';
class AFlatButton extends StatelessWidget {
final String text;
final Color? textColor;
final TextStyle? style;
final EdgeInsets? padding;
final VoidCallback? onPressed;
const AFlatButton({Key? key, required this.text, this.textColor,this.style ,this.onPressed, this.padding}) : super(key: key);
@override
Widget build(BuildContext context) {
return TextButton(
style: TextButton.styleFrom(
foregroundColor: this.textColor ?? Colors.black, padding: padding,
),
onPressed: onPressed,
child: Text(
text??"",
style: style ?? Theme.of(context).textTheme.bodyText1,
textScaleFactor: AppStyle.getScaleFactor(context),
)
);
}
}