LATIHAN FLUTTER WEEK#1 : Floating Action Button

LATIHAN FLUTTER WEEK#1 : Floating Action Button

Sebelumnya baca tutorial : LATIHAN FLUTTER WEEK#1 : COLOR CLASS

main.dart

import 'package:flutter/material.dart';

void main(){
  runApp(
    new MaterialApp(
      home: new Widget1(),
    )
  );
}

 

class Widget1 extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      backgroundColor: Colors.yellow[200],
      appBar: new AppBar(
        title: new Text("FLutter App #1"),
        backgroundColor: Color(0xFFFF7043),
      ),
      body: new Center(
        child: new Text(
            "meetAp Flutter Basic",
             style: TextStyle(color: Colors.redAccent[400]),
        ),
      ),

      floatingActionButton: FloatingActionButton(
          onPressed: null,
        tooltip: 'Camera',
        child: Icon(Icons.camera),
        backgroundColor: Colors.blue[400],
      ),
      floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
    );
  }
}

 

Floating Action Button

Semoga Bermanfaat

Flutter Developer