LATIHAN FLUTTER WEEK#2 : Card Widget

LATIHAN FLUTTER WEEK#2 : Card Widget

main.dart

import 'package:flutter/material.dart';
import './page1.dart';

void main(){
  runApp(new MaterialApp(
    title: "Pertemuan 2",
    home: page1(),
  ));
}

page1.dart

import 'package:flutter/material.dart';

class page1 extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text("Parsing Data"),
      ),
    );
  }
  
}

Tambahkan Body

body: Container(
  child: new Card(
    child: new Column(
      crossAxisAlignment: CrossAxisAlignment.stretch,
      children: <Widget>[
        new Icon(
          Icons.home,
          color: Colors.pink,
          size: 100.0,
        ),
      ],
    ),
  ),
),

Semoga Bermanfaat

Flutter Developer