import 'package:flutter/material.dart';

void main() => runApp(TanyaOnline());

class TanyaOnline extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Tanya Online'),
          backgroundColor: Colors.deepOrange,
        ),
        body: Center(
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.stretch,
            children: <Widget>[
              Card(
                elevation: 3,
                margin: EdgeInsets.all(16.0),
                child: Column(
                  children: <Widget>[
                    ListTile(
                      title: Text(
                        'Apa yang harus dilakukan kalau kalori saya kurang? \n-Steven',
                        style: TextStyle(fontWeight: FontWeight.bold),
                      ),
                    ),
                    Padding(
                      padding: EdgeInsets.all(16.0),
                      child: Text('Anda harus makan lebih sering'),
                    ),
                  ],
                ),
              ),
              Card(
                elevation: 3,
                margin: EdgeInsets.all(16.0),
                child: Column(
                  children: <Widget>[
                    ListTile(
                      title: Text(
                        'Apa saja kandungan buah pir? \n-Steven',
                        style: TextStyle(fontWeight: FontWeight.bold),
                      ),
                    ),
                    Padding(
                      padding: EdgeInsets.all(16.0),
                      child: Text('Vitamin A'),
                    ),
                  ],
                ),
              ),
              Padding(
                padding: EdgeInsets.all(16.0),
                child: Row(
                  children: <Widget>[
                    Expanded(
                      child: TextField(
                        decoration: InputDecoration(
                          hintText: 'Masukkan pesan Anda...',
                          border: OutlineInputBorder(),
                        ),
                      ),
                    ),
                    IconButton(
                      icon: Icon(Icons.send),
                      color: Colors.deepOrange,
                      onPressed: () {
                        // Aksi yang ingin Anda eksekusi saat tombol diklik.
                      },
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
