import 'package:fcs/helpers/theme.dart'; import 'package:fcs/pages/widgets/local_text.dart'; import 'package:flutter/material.dart'; import 'callbacks.dart'; class LocalButton extends StatelessWidget { final CallBack? callBack; final IconData? iconData; final String? textKey; final Color? color; const LocalButton( {Key? key, this.callBack, this.iconData, this.textKey, this.color = primaryColor}) : super(key: key); @override Widget build(BuildContext context) { return ElevatedButton( style: ElevatedButton.styleFrom( backgroundColor: color, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5))), onPressed: callBack, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ iconData == null ? Container() : Icon( iconData, color: Colors.white, ), SizedBox( width: 15, ), LocalText( context, textKey!, color: Colors.white, fontSize: 16, ), ], )); } }