mirror of
https://bitbucket.org/myhomie/myhomie_app.git
synced 2025-12-06 00:51:19 +00:00
38 lines
979 B
Dart
38 lines
979 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:myhomie_app/constants.dart';
|
|
|
|
class RoundedButton extends StatelessWidget {
|
|
final String text;
|
|
final Function press;
|
|
final Color color, textColor;
|
|
final double fontSize;
|
|
|
|
const RoundedButton({
|
|
Key key,
|
|
this.text,
|
|
this.press,
|
|
this.color = kBodyTextColor, // TODO
|
|
this.textColor = Colors.white,
|
|
this.fontSize
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Size size = MediaQuery.of(context).size;
|
|
return FlatButton(
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(35.0),
|
|
//side: BorderSide(color: kSubTitleColor)
|
|
),
|
|
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 25),
|
|
color: color,
|
|
onPressed: () => {
|
|
press()
|
|
},
|
|
child: Text(
|
|
text,
|
|
style: new TextStyle(color: textColor, fontSize: fontSize, fontWeight: FontWeight.w400),
|
|
),
|
|
);
|
|
}
|
|
} |