O Flutter parece não estar compilando por completo, carrega apenas a estrutura com as cores, mas não detalhes como numero da conta, padding.
import 'package:flutter/material.dart';
void main() => runApp(ByteBankApp());
class ByteBankApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Criando Transferencias'),
),
body: Column(
children: [
TextField(),
TextField(),
RaisedButton(),
],
)));
}
}
class FormularioTransferencia extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Criando Transferencia'),
),
body: Column(children: <Widget>[
Padding(
padding: const EdgeInsets.all(24.0),
child: TextField(
style: TextStyle(fontSize: 24.0),
decoration: InputDecoration(
labelText: ('Número da Conta'),
hintText: ('0000'),
),
keyboardType: TextInputType.number, //TECLADO
),
),
Padding(
padding: const EdgeInsets.all(24.0),
child: TextField(
style: TextStyle(fontSize: 24.0),
decoration: InputDecoration(
icon: Icon(Icons.monetization_on),
labelText: ('Valor'),
hintText: ('00.00'),
),
keyboardType: TextInputType.number, //TECLADO
),
),
RaisedButton()
]),
);
}
}
class ListaTransferencias extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Transferencias'),
),
body: Column(
children: <Widget>[
ItemTransferencias(Transferencia(200.00, 3940)),
ItemTransferencias(Transferencia(300.00, 4632)), //REFATORANDO
ItemTransferencias(Transferencia(500.00, 7459)),
],
),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.add),
),
);
//throw UnimplementedError();
}
}
class ItemTransferencias extends StatelessWidget {
final Transferencia _transferencia;
ItemTransferencias(this._transferencia);
@override
Widget build(BuildContext context) {
return Card(
child: ListTile(
leading: Icon(Icons.monetization_on),
title: Text(_transferencia.valor.toString()),
subtitle: Text(_transferencia.numeroConta.toString()),
));
}
}
class Transferencia {
final double valor;
final int numeroConta;
Transferencia(this.valor, this.numeroConta); //alt+insert construtores
}