Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- void main() {
- runApp(const MainApp());
- }
- class MainApp extends StatelessWidget {
- const MainApp({super.key});
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- debugShowCheckedModeBanner: false,
- home: DefaultTabController(
- length: 3,
- child: Scaffold(
- appBar: AppBar(
- title: Text('Latihan Widget 3'),
- actions: [
- PopupMenuButton(
- onSelected: (value) {
- //logika ketika menu di tekan
- },
- itemBuilder: (context) {
- return <PopupMenuEntry>[
- PopupMenuItem(
- value: 'menu 1',
- child: Text('Chats'),
- ),
- PopupMenuItem(
- value: 'menu 2',
- child: Text('Status'),
- ),
- PopupMenuItem(
- value: 'menu 3',
- child: Text('Call'),
- ),
- ];
- },
- ),
- ],
- bottom: TabBar(
- tabs: [
- Tab(text: 'Chats'),
- Tab(text: 'Status'),
- Tab(text: 'Call'),
- ],
- ),
- ),
- body: TabBarView(
- children: [
- ListView(
- children: [
- ListTile(
- leading: Icon(Icons.person),
- title: Text('AULIA'),
- onTap: () {
- //logic ketika di tekan
- },
- ),
- ListTile(
- leading: Icon(Icons.person),
- title: Text('PIAN'),
- onTap: () {
- //logic ketika di tekan
- },
- ),
- ListTile(
- leading: Icon(Icons.person),
- title: Text('DAENG'),
- onTap: () {
- //logic ketika di tekan
- },
- ),
- ListTile(
- leading: Icon(Icons.person),
- title: Text('RARA'),
- onTap: () {
- //logic ketika di tekan
- },
- ),
- ListTile(
- leading: Icon(Icons.person),
- title: Text('ZILAN'),
- onTap: () {
- //logic ketika di tekan
- },
- ),
- ListTile(
- leading: Icon(Icons.person),
- title: Text('JAFAR'),
- onTap: () {
- //logic ketika di tekan
- },
- ),
- ListTile(
- leading: Icon(Icons.person),
- title: Text('RAHMAT'),
- onTap: () {
- //logic ketika di tekan
- },
- ),
- ListTile(
- leading: Icon(Icons.person),
- title: Text('INNA'),
- onTap: () {
- //logic ketika di tekan
- },
- ),
- ListTile(
- leading: Icon(Icons.person),
- title: Text('LESRIANTO'),
- onTap: () {
- //logic ketika di tekan
- },
- ),
- ListTile(
- leading: Icon(Icons.person),
- title: Text('BAGUS'),
- onTap: () {
- //logic ketika di tekan
- },
- ),
- ListTile(
- leading: Icon(Icons.person),
- title: Text('SALEM'),
- onTap: () {
- //logic ketika di tekan
- },
- ),
- ListTile(
- leading: Icon(Icons.person),
- title: Text('HANNY'),
- onTap: () {
- //logic ketika di tekan
- },
- ),
- ListTile(
- leading: Icon(Icons.person),
- title: Text('TANIA'),
- onTap: () {
- //logic ketika di tekan
- },
- ),
- ListTile(
- leading: Icon(Icons.person),
- title: Text('AFIF'),
- onTap: () {
- //logic ketika di tekan
- },
- ),
- ListTile(
- leading: Icon(Icons.person),
- title: Text('RAVI'),
- onTap: () {
- //logic ketika di tekan
- },
- ),
- ],
- ),
- Container(
- color: Colors.blueGrey,
- child: ListView(
- children: [
- ListTile(
- leading: Icon(
- Icons.circle,
- size: 50,
- ),
- title: Text('KHOLIZA'),
- subtitle: Text('1 menit yang lalu'),
- textColor: Colors.white,
- iconColor: Colors.white,
- ),
- ListTile(
- leading: Icon(
- Icons.circle,
- size: 50,
- ),
- title: Text('PIAN'),
- subtitle: Text('2 menit yang lalu'),
- textColor: Colors.white,
- iconColor: Colors.white,
- ),
- ListTile(
- leading: Icon(
- Icons.circle,
- size: 50,
- ),
- title: Text('RAFLY'),
- subtitle: Text('4 menit yang lalu'),
- textColor: Colors.white,
- iconColor: Colors.white,
- ),
- ListTile(
- leading: Icon(
- Icons.circle,
- size: 50,
- ),
- title: Text('FAJAR'),
- subtitle: Text('3 menit yang lalu'),
- textColor: Colors.white,
- iconColor: Colors.white,
- ),
- ListTile(
- leading: Icon(
- Icons.circle,
- size: 50,
- ),
- title: Text('SASA'),
- subtitle: Text('1 menit yang lalu'),
- textColor: Colors.white,
- iconColor: Colors.white,
- ),
- ListTile(
- leading: Icon(
- Icons.circle,
- size: 50,
- ),
- title: Text('AFIF'),
- subtitle: Text('1 menit yang lalu'),
- textColor: Colors.white,
- iconColor: Colors.white,
- ),
- ListTile(
- leading: Icon(
- Icons.circle,
- size: 50,
- ),
- title: Text('RAVI'),
- subtitle: Text('2 menit yang lalu'),
- textColor: Colors.white,
- iconColor: Colors.white,
- ),
- ListTile(
- leading: Icon(
- Icons.circle,
- size: 50,
- ),
- title: Text('AZMI'),
- subtitle: Text('4 menit yang lalu'),
- textColor: Colors.white,
- iconColor: Colors.white,
- ),
- ListTile(
- leading: Icon(
- Icons.circle,
- size: 50,
- ),
- title: Text('TANIA'),
- subtitle: Text('3 menit yang lalu'),
- textColor: Colors.white,
- iconColor: Colors.white,
- ),
- ListTile(
- leading: Icon(
- Icons.circle,
- size: 50,
- ),
- title: Text('PUTRI'),
- subtitle: Text('1 menit yang lalu'),
- textColor: Colors.white,
- iconColor: Colors.white,
- ),
- ListTile(
- leading: Icon(
- Icons.circle,
- size: 50,
- ),
- title: Text('NOCA'),
- subtitle: Text('1 menit yang lalu'),
- textColor: Colors.white,
- iconColor: Colors.white,
- ),
- ListTile(
- leading: Icon(
- Icons.circle,
- size: 50,
- ),
- title: Text('NOVI'),
- subtitle: Text('2 menit yang lalu'),
- textColor: Colors.white,
- iconColor: Colors.white,
- ),
- ListTile(
- leading: Icon(
- Icons.circle,
- size: 50,
- ),
- title: Text('FEBRI'),
- subtitle: Text('4 menit yang lalu'),
- textColor: Colors.white,
- iconColor: Colors.white,
- ),
- ListTile(
- leading: Icon(
- Icons.circle,
- size: 50,
- ),
- title: Text('FEBRIKA'),
- subtitle: Text('3 menit yang lalu'),
- textColor: Colors.white,
- iconColor: Colors.white,
- ),
- ListTile(
- leading: Icon(
- Icons.circle,
- size: 50,
- ),
- title: Text('AYU'),
- subtitle: Text('1 menit yang lalu'),
- textColor: Colors.white,
- iconColor: Colors.white,
- ),
- ],
- ),
- ),
- Center(
- child: Text('Tidak ada riwayat panggilan'),
- )
- ],
- ),
- bottomNavigationBar: Container(
- color: Colors.blue,
- child: TabBar(
- tabs: [
- Tab(icon: Icon(Icons.chat),
- ),
- Tab(icon: Icon(Icons.image),
- ),
- Tab(icon: Icon(Icons.call),
- ),
- ],
- ),
- ),
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement