cake_wallet/lib/src/widgets/trail_button.dart

31 lines
867 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
2021-01-18 20:52:12 +00:00
import 'package:cake_wallet/palette.dart';
class TrailButton extends StatelessWidget {
2021-02-01 18:12:37 +00:00
TrailButton({@required this.caption, this.textColor, @required this.onPressed});
final String caption;
final VoidCallback onPressed;
2021-02-01 18:12:37 +00:00
final Color textColor;
@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(
2021-02-01 18:12:37 +00:00
color: textColor ??
Theme.of(context).textTheme.subhead.decorationColor,
2021-01-18 20:52:12 +00:00
fontWeight: FontWeight.w600,
2021-01-13 17:18:28 +00:00
fontSize: 14),
),
onPressed: onPressed),
);
}
2021-01-13 17:18:28 +00:00
}