0% found this document useful (0 votes)
7 views

Flutter Note

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Flutter Note

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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