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.
diplomatic-quarter/lib/widgets/buttons/defaultButton.dart

27 lines
894 B
Dart

import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:flutter/material.dart';
import 'package:flutter/material.dart';
class DefaultButton extends StatelessWidget {
final String text;
final Function onPress;
final Color textColor;
final Color color;
DefaultButton(this.text, this.onPress, {this.color, this.textColor});
@override
Widget build(BuildContext context) {
return Container(
height: 60,
child: RaisedButton(
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
color: color != null ? color : Colors.grey[900],
textColor: color != null ? textColor : Colors.white,
child: Text(
this.text,
style: TextStyle(fontSize: SizeConfig.textMultiplier * 2),
),
onPressed: () => this.onPress()));
}
}