Loading repository data…
Loading repository data…
efraindrummer / repository
Una simple calculadora con diseño bonito y lógica básica que toda calculadora sencilla debe tener
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Esta es una aplicacion basica de calculadora echa en flutter
clonar el repositorio con el siguiente comando git clone https://github.com/efraindrummer/calculadora_app_flutter
No cambien el siguiente codigo dentro de la carpeta widget/CalcButton.dart ya que este es el controlador principal de la aplicacion, toda la aplicacion esta parametrizada
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class CalcButton extends StatelessWidget {
final String text;
final int fillColor;
final int textColor;
final double textSize;
final Function callback;
const CalcButton({
Key key,
this.text,
this.textColor = 0xFFFFFFFF,
this.fillColor,
this.textSize = 28,
this.callback,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.all(10),
child: SizedBox(
width: 65,
height: 65,
child: FlatButton(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(50)),
child: Text(
text,
style: GoogleFonts.rubik(
textStyle: TextStyle(
fontSize: textSize,
)
)),
onPressed: (){
callback(text);
},
color: fillColor != null ? Color(fillColor) : null,
textColor: Color(textColor),
),
),
);
}
}