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/lib/views/widgets/buttons/app_flat_button.dart

28 lines
817 B
Dart

3 years ago
import 'package:flutter/material.dart';
import 'package:test_sa/views/app_style/sizing.dart';
3 years ago
class AFlatButton extends StatelessWidget {
final String text;
final Color textColor;
final TextStyle style;
final EdgeInsets padding;
final VoidCallback onPressed;
const AFlatButton({Key key, this.text, this.textColor, this.style, this.onPressed, this.padding}) : super(key: key);
2 years ago
3 years ago
@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),
));
3 years ago
}
}