You are on page 1of 3

//membuat button

floatingActionButton: FloatingActionButton.extended(
backgroundColor: Colors.redAccent,
foregroundColor: Colors.white,
onPressed: () {},
icon: Icon(Icons.add),
label: Text('Press This Button'),
),
//button location
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
);

body: Column(
children: [
Center(
child: Text('INI BAGIAN BODY'),
),
Center(
child: Text('DIDALAM COLUMN'),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [Text('TULISAN KIRI'), Text('TULISAN KANAN')],
)
],
),

drawer: Drawer(
child: ListView(
children: <Widget>[
DrawerHeader(
child: Text('Header Drawer'),
decoration: BoxDecoration(color: Colors.pink),
),
ListTile(
title: Text('Item 1'),
onTap: () {
Navigator.pop(context);
},
),
ListTile(
title: Text('item 2'),
onTap: () {
Navigator.pop(context);
},
)
],
),
),
bottomNavigationBar: BottomNavigationBar(items: const [
BottomNavigationBarItem(
icon: Icon(Icons.home),
label: 'Home',
),
BottomNavigationBarItem(icon: Icon(Icons.search), label: 'Search'),
BottomNavigationBarItem(icon: Icon(Icons.settings), label: 'Setting')
]),

You might also like