Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions lib/screens/profileScreen_dharshini.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import 'package:flutter/material.dart';

class ProfileScreenDharshini extends StatelessWidget {
const ProfileScreenDharshini({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Profile"),
centerTitle: true,
),
body: Column(
children: [
const SizedBox(height: 30),

// Avatar
CircleAvatar(
radius: 45,
backgroundColor: Colors.grey.shade300,
child: const Icon(
Icons.person,
size: 50,
color: Colors.white,
),
),

const SizedBox(height: 12),

// User Name
const Text(
"John Doe",
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
),
),

const SizedBox(height: 4),

// Email
const Text(
"john.doe@email.com",
style: TextStyle(
fontSize: 14,
color: Colors.grey,
),
),

const SizedBox(height: 30),

// Options list
const Divider(),

ListTile(
leading: const Icon(Icons.edit),
title: const Text("Edit Profile"),
trailing: const Icon(Icons.arrow_forward_ios, size: 16),
onTap: () {},
),

ListTile(
leading: const Icon(Icons.settings),
title: const Text("Settings"),
trailing: const Icon(Icons.arrow_forward_ios, size: 16),
onTap: () {},
),

ListTile(
leading: const Icon(Icons.logout, color: Colors.red),
title: const Text(
"Logout",
style: TextStyle(color: Colors.red),
),
onTap: () {},
),
],
),
);
}
}
51 changes: 51 additions & 0 deletions lib/widgets/bottomNav_dharshini.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import 'package:flutter/material.dart';

class BottomNavDharshini extends StatefulWidget {
const BottomNavDharshini({super.key});

@override
State<BottomNavDharshini> createState() => _BottomNavDharshiniState();
}

class _BottomNavDharshiniState extends State<BottomNavDharshini> {
int _selectedIndex = 0;

static const List<Widget> _pages = <Widget>[
Center(child: Text('Home Screen', style: TextStyle(fontSize: 24))),
Center(child: Text('Menu Screen', style: TextStyle(fontSize: 24))),
Center(child: Text('Profile Screen', style: TextStyle(fontSize: 24))),
];

void _onItemTapped(int index) {
setState(() {
_selectedIndex = index;
});
}

@override
Widget build(BuildContext context) {
return Scaffold(
body: _pages[_selectedIndex],
bottomNavigationBar: BottomNavigationBar(
currentIndex: _selectedIndex,
onTap: _onItemTapped,
selectedItemColor: Colors.blue,
unselectedItemColor: Colors.grey,
items: const [
BottomNavigationBarItem(
icon: Icon(Icons.home),
label: 'Home',
),
BottomNavigationBarItem(
icon: Icon(Icons.menu),
label: 'Menu',
),
BottomNavigationBarItem(
icon: Icon(Icons.person),
label: 'Profile',
),
],
),
);
}
}
52 changes: 52 additions & 0 deletions lib/widgets/mealCard_dharshini.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import 'package:flutter/material.dart';

class MealCardDharshini extends StatelessWidget {
const MealCardDharshini({
super.key,
this.mealName = "Sample Meal",
this.mealType = "Breakfast",
});

final String mealName;
final String mealType;

@override
Widget build(BuildContext context) {
return Card(
elevation: 3,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
margin: const EdgeInsets.all(8),
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Row(
children: [
const CircleAvatar(
radius: 30,
child: Icon(Icons.fastfood, size: 30),
),
const SizedBox(width: 16),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
mealName,
style: const TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 4),
Text(
mealType,
style: const TextStyle(color: Colors.grey),
),
],
),
],
),
),
);
}
}