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 {
|
|
|
|
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(
|
|
|
|
padding: EdgeInsets.all(0),
|
|
|
|
child: Text(
|
2020-06-10 16:17:55 +00:00
|
|
|
caption,
|
2020-06-02 18:03:05 +00:00
|
|
|
style: TextStyle(
|
|
|
|
color: Theme.of(context).primaryTextTheme.caption.color,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
fontSize: 14),
|
|
|
|
),
|
|
|
|
onPressed: onPressed),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|