Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- void main() {
- runApp(MaterialApp(
- home: Home(),
- ));
- }
- class Home extends StatefulWidget {
- @override
- _HomeState createState() => _HomeState();
- }
- class _HomeState extends State<Home> {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(
- title: Text("Calculadora de IMC"),
- centerTitle: true,
- backgroundColor: Colors.green,
- actions: <Widget>[
- IconButton(
- icon: Icon(Icons.refresh),
- onPressed: () {},
- )
- ],
- ),
- backgroundColor: Colors.white,
- body: SingleChildScrollView(
- padding: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
- child:Column(
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: <Widget>[
- Icon(Icons.person_outline),
- TextField(
- keyboardType: TextInputType.number,
- decoration: InputDecoration(
- labelText: "Peso (kg)",
- labelStyle: TextStyle(color: Colors.green, fontSize: 25.0)
- ),
- textAlign: TextAlign.center,
- style: TextStyle(color: Colors.green,fontSize: 25.0 ),
- ),
- TextField(
- keyboardType: TextInputType.number,
- decoration: InputDecoration(
- labelText: "Altura (cm)",
- labelStyle: TextStyle(color: Colors.green, fontSize: 25.0)
- ),
- textAlign: TextAlign.center,
- style: TextStyle(color: Colors.green,fontSize: 25.0 ),
- ),
- Container(
- height: 50.0,
- child: RaisedButton(
- onPressed: () {},
- child: Text("Calcular",style: TextStyle(color: Colors.white),),
- color: Colors.green,
- ),
- ),
- Text("Info",
- textAlign: TextAlign.center,
- style: TextStyle(color: Colors.green, fontSize: 25.0),)
- ],
- ) ,)
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement