import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/services/permission/permission_service.dart';
import 'package:flutter/material.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class DefaultButton extends StatelessWidget {
  final String text;
  final Function onPress;
  final Color textColor;
  final Color color;
  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)),
            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(), }));
  }
}
