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

Dashboard Dart

Uploaded by

jugarapcharles3
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Dashboard Dart

Uploaded by

jugarapcharles3
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

import 'package:awesome_dialog/awesome_dialog.

dart';

import 'package:flutter/material.dart';

import 'package:untitled/activity_one.dart';

import 'package:untitled/login_screen.dart';

class Dashboard extends StatelessWidget{

@override

Widget build(BuildContext context) {

return MaterialApp(

debugShowCheckedModeBanner: false,

home:DashboardHome() ,

);

class DashboardHome extends StatefulWidget{

@override

State<DashboardHome> createState() => _DashboardHomeState();

class _DashboardHomeState extends State<DashboardHome> {

@override

Widget build(BuildContext context) {

return Scaffold(

drawer: InkWell(

onTap:(){

AwesomeDialog(

context: context,

dialogType: DialogType.question,
title: 'Logout',

desc: "Are you want to Logout",

btnOkOnPress:(){

Navigator.of(context).push(MaterialPageRoute(builder:
(BuildContext context)=> LoginScreen()));

},

btnOkText: 'Yes',

btnCancelText: 'No',

btnCancelOnPress: (){

).show();

},

child: Drawer(

child: Column(

mainAxisAlignment: MainAxisAlignment.center,

children: [

CircleAvatar(

radius: 40.0,

backgroundImage: NetworkImage(' '),

),

Text("Menu",

style: TextStyle(fontSize: 30,fontWeight: FontWeight.bold),

),

ListTile(
leading: Icon(Icons.home),

title: Text("Logout"),

),

ListTile(

leading: Icon(Icons.contacts),

title: Text("List of Users"),

),

ListTile(

leading: Icon(Icons.settings),

title: Text("Album"),

),

],

),

backgroundColor: Colors.greenAccent,

),

),

appBar: AppBar(

title: Text("ActivityOne"),

),

bottomNavigationBar: BottomNavigationBar(

items:[

BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),

BottomNavigationBarItem(icon: Icon(Icons.contacts), label:


'Contacts'),

BottomNavigationBarItem(icon: Icon(Icons.settings), label:


'Settings'),

),
body: Center(

child: Column(

mainAxisAlignment: MainAxisAlignment.center,

children: [

CircleAvatar(

radius: 90.0,

backgroundImage: NetworkImage(' '),

),

Text(

"Edzel Reeve Angus",

style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold),

),

Text("Bachelor of Science and Information Technology"),

ElevatedButton(

onPressed: (){

Navigator.of(context).push(MaterialPageRoute(builder:
(BuildContext context)=> ActivityOne()));

},

child: Text('To Activity One')

),

],

),

),

backgroundColor: Colors.lightGreen,

);

You might also like