2020-06-02 18:03:05 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
2020-06-10 16:17:55 +00:00
|
|
|
class TrailButton extends StatelessWidget {
|
2021-01-13 17:18:28 +00:00
|
|
|
TrailButton({@required this.caption, @required this.onPressed});
|
2020-06-02 18:03:05 +00:00
|
|
|
|
2020-06-10 16:17:55 +00:00
|
|
|
final String caption;
|
2020-06-02 18:03:05 +00:00
|
|
|
final VoidCallback onPressed;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return ButtonTheme(
|
|
|
|
minWidth: double.minPositive,
|
|
|
|
highlightColor: Colors.transparent,
|
|
|
|
splashColor: Colors.transparent,
|
|
|
|
child: FlatButton(
|
2021-01-13 17:18:28 +00:00
|
|
|
padding: EdgeInsets.all(0),
|
|
|
|
child: Text(
|
|
|
|
caption,
|
|
|
|
style: TextStyle(
|
|
|
|
color:
|
2021-01-15 17:41:30 +00:00
|
|
|
Theme.of(context).accentTextTheme.bodyText2.color,
|
2021-01-13 17:18:28 +00:00
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
fontSize: 14),
|
|
|
|
),
|
|
|
|
onPressed: onPressed),
|
2020-06-02 18:03:05 +00:00
|
|
|
);
|
|
|
|
}
|
2021-01-13 17:18:28 +00:00
|
|
|
}
|