[go: up one dir, main page]

0% found this document useful (0 votes)
10 views3 pages

Flutter Note

The document describes a Flutter layout that includes a floating action button, a body with a column containing text and a row, a drawer with a header and list items, and a bottom navigation bar with three items. The floating action button is styled with red and white colors and positioned at the center. The drawer allows navigation with two list items, and the bottom navigation bar provides options for home, search, and settings.
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)
10 views3 pages

Flutter Note

The document describes a Flutter layout that includes a floating action button, a body with a column containing text and a row, a drawer with a header and list items, and a bottom navigation bar with three items. The floating action button is styled with red and white colors and positioned at the center. The drawer allows navigation with two list items, and the bottom navigation bar provides options for home, search, and settings.
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