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

30 lines
1.1 KiB
Dart

import 'package:diplomaticquarterapp/config/size_config.dart';
4 years ago
import 'package:diplomaticquarterapp/services/permission/permission_service.dart';
import 'package:flutter/material.dart';
import 'package:flutter/material.dart';
4 years ago
import 'package:flutter/services.dart';
class DefaultButton extends StatelessWidget {
final String text;
final Function onPress;
final Color textColor;
final Color color;
4 years ago
PermissionService permission = new PermissionService();
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)),
4 years ago
color: color != null ? color : Colors.grey[900],
textColor: color != null ? textColor : Colors.white,
child: Text(
this.text,
style: TextStyle(fontSize: SizeConfig.textMultiplier * 2),
),
4 years ago
onPressed: () =>{ this.onPress(), }));
}
}