SHARE
TWEET

imc

a guest Nov 22nd, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() {
  4.   runApp(MaterialApp(
  5.     home: Home(),
  6.   ));
  7. }
  8.  
  9. class Home extends StatefulWidget {
  10.   @override
  11.   _HomeState createState() => _HomeState();
  12. }
  13.  
  14. class _HomeState extends State<Home> {
  15.   @override
  16.   Widget build(BuildContext context) {
  17.     return Scaffold(
  18.       appBar: AppBar(
  19.         title: Text("Calculadora de IMC"),
  20.         centerTitle: true,
  21.         backgroundColor: Colors.green,
  22.         actions: <Widget>[
  23.           IconButton(
  24.             icon: Icon(Icons.refresh),
  25.             onPressed: () {},
  26.           )
  27.         ],
  28.       ),
  29.       backgroundColor: Colors.white,
  30.       body: SingleChildScrollView(
  31.         padding: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
  32.         child:Column(
  33.         crossAxisAlignment: CrossAxisAlignment.stretch,
  34.         children: <Widget>[
  35.           Icon(Icons.person_outline),
  36.           TextField(
  37.             keyboardType: TextInputType.number,
  38.             decoration: InputDecoration(
  39.                 labelText: "Peso (kg)",
  40.                 labelStyle: TextStyle(color: Colors.green, fontSize: 25.0)
  41.           ),
  42.             textAlign: TextAlign.center,
  43.             style: TextStyle(color: Colors.green,fontSize: 25.0 ),
  44.           ),
  45.           TextField(
  46.             keyboardType: TextInputType.number,
  47.             decoration: InputDecoration(
  48.                 labelText: "Altura (cm)",
  49.                 labelStyle: TextStyle(color: Colors.green, fontSize: 25.0)
  50.           ),
  51.             textAlign: TextAlign.center,
  52.             style: TextStyle(color: Colors.green,fontSize: 25.0 ),
  53.           ),
  54.           Container(
  55.             height: 50.0,
  56.             child: RaisedButton(
  57.               onPressed: () {},
  58.               child: Text("Calcular",style: TextStyle(color: Colors.white),),
  59.               color: Colors.green,
  60.  
  61.           ),
  62.           ),
  63.           Text("Info",
  64.           textAlign: TextAlign.center,
  65.           style: TextStyle(color: Colors.green, fontSize: 25.0),)
  66.          
  67.         ],
  68.       ) ,)
  69.     );
  70.   }
  71. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top