Commit 5b81d029 authored by Budi Prasetyo's avatar Budi Prasetyo

dashboard

parent be5db7ae
import 'package:flutter/material.dart';
import 'package:easy_sidemenu/easy_sidemenu.dart';
class Dashboard extends StatefulWidget {
const Dashboard({Key? key}) : super(key: key);
@override
State<Dashboard> createState() => _DashboardState();
}
class _DashboardState extends State<Dashboard> {
PageController page = PageController();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
toolbarHeight: 60,
backgroundColor: Colors.white,
leadingWidth: 230,
leading: Padding(
padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 30),
child: Container(
width: 200,
decoration: BoxDecoration(image: DecorationImage(image: AssetImage('assets/logo/medapp-logo.png'),fit: BoxFit.fill)),
),
),
actions: [
TextButton.icon(onPressed: (){}, icon: Icon(Icons.remove_red_eye ), label: Text('Site Online'),)
],
),
body: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SideMenu(
showToggle: true,
controller: page,
// onDisplayModeChanged: (mode) {
// print(mode);
// },
style: SideMenuStyle(
openSideMenuWidth: 220,
displayMode: SideMenuDisplayMode.auto,
hoverColor: Colors.blue[100],
selectedColor: Colors.white,
selectedTitleTextStyle: const TextStyle(color: Colors.blueAccent),
selectedIconColor: Colors.blueAccent[700],
// decoration: BoxDecoration(
// borderRadius: BorderRadius.all(Radius.circular(10)),
// ),
backgroundColor: Colors.blue,
),
title: Column(
children: [
// ConstrainedBox(
// constraints: const BoxConstraints(
// maxHeight: 150,
// maxWidth: 150,
// ),
// child: Image.asset(
// 'assets/logo/medapp-logo.png',
// ),
// ),
// const Divider(
// indent: 8.0,
// endIndent: 8.0,
// ),
Container(height: 20,)
],
),
footer: const Padding(
padding: EdgeInsets.all(8.0),
child: Text(
'Medapp By Eksad',
style: TextStyle(fontSize: 15),
),
),
items: [
SideMenuItem(
priority: 0,
title: 'Dashboard',
onTap: () {
page.jumpToPage(0);
},
icon: const Icon(Icons.home),
// badgeContent: const Text(
// '3',
// style: TextStyle(color: Colors.white),
// ),
),
SideMenuItem(
priority: 2,
title: 'Files',
onTap: () {
page.jumpToPage(2);
},
icon: const Icon(Icons.file_copy_rounded),
),
SideMenuItem(
priority: 3,
title: 'WhatsApp Number',
onTap: () {
page.jumpToPage(3);
},
icon: const Icon(Icons.whatsapp),
),
SideMenuItem(
priority: 4,
title: 'Settings',
onTap: () {
page.jumpToPage(4);
},
icon: const Icon(Icons.settings),
),
],
),
Expanded(
child: PageView(
controller: page,
children: [
Container(
color: Colors.white,
child: const Center(
child: Text(
'Dashboard',
style: TextStyle(fontSize: 35),
),
),
),
Container(
color: Colors.white,
child: const Center(
child: Text(
'Users',
style: TextStyle(fontSize: 35),
),
),
),
Container(
color: Colors.white,
child: const Center(
child: Text(
'Files',
style: TextStyle(fontSize: 35),
),
),
),
Container(
color: Colors.white,
child: const Center(
child: Text(
'Download',
style: TextStyle(fontSize: 35),
),
),
),
Container(
color: Colors.white,
child: const Center(
child: Text(
'Settings',
style: TextStyle(fontSize: 35),
),
),
),
],
),
),
],
),
);
}
}
import 'package:flutter/material.dart';
import 'package:medapp_eksad/dashboard/main_dashboard.dart';
import 'package:medapp_eksad/homepage.dart';
import 'package:medapp_eksad/login.dart';
import 'package:medapp_eksad/screen/contact_us/contact_us.dart';
......@@ -23,6 +24,7 @@ class MyApp extends StatelessWidget {
'/solutions': (context) => const Solutions(),
'/contact': (context) => const ContactUs(),
'/login': (context) => const login(),
'/dashboard': (context) => const Dashboard()
},
);
}
......
......@@ -54,7 +54,7 @@ class ContactUs2 extends StatelessWidget {
'\n'
'an outsourcing partner '
'you can trust and thrive with',
textAlign: TextAlign.justify,
textAlign: TextAlign.left,
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 30,
......
......@@ -8,6 +8,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.2"
badges:
dependency: transitive
description:
name: badges
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
boolean_selector:
dependency: transitive
description:
......@@ -78,6 +85,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "5.0.2"
easy_sidemenu:
dependency: "direct main"
description:
name: easy_sidemenu
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.1"
fake_async:
dependency: transitive
description:
......
......@@ -35,6 +35,7 @@ dependencies:
font_awesome_flutter: ^10.1.0
intl: ^0.17.0
dropdown_search: ^5.0.2
easy_sidemenu: ^0.3.1
sidebarx: ^0.7.0
flutter_web_plugins:
sdk: flutter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment