import 'package:flutter/material.
dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: const NavigationScreen(),
);
}
}
class NavigationScreen extends StatefulWidget {
const NavigationScreen({Key? key}) : super(key: key);
@override
_NavigationScreenState createState() => _NavigationScreenState();
}
class _NavigationScreenState extends State<NavigationScreen> {
int _currentIndex = 0;
final List<Widget> _tabs = [
HomeTab(),
ServicesTab(),
BookingsTab(),
NotificationsTab(),
ProfileTab(),
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('EFOY', style: TextStyle(color: Colors.white)),
backgroundColor: Colors.purple,
actions: [
PopupMenuButton<String>(
onSelected: (value) {
// Handle the selection of an option from the menu
// You can perform different actions based on the selected option.
if (value == 'Option 1') {
// Do something for Option 1
} else if (value == 'Option 2') {
// Do something for Option 2
}
},
itemBuilder: (BuildContext context) {
return <PopupMenuEntry<String>>[
const PopupMenuItem<String>(
value: 'Option 1',
child: Text('Option 1'),
),
const PopupMenuItem<String>(
value: 'Option 2',
child: Text('Option 2'),
),
// Add more PopupMenuItems for additional options
];
},
),
],
),
body: _tabs[_currentIndex],
bottomNavigationBar: BottomNavigationBar(
type: BottomNavigationBarType.fixed,
currentIndex: _currentIndex,
onTap: (index) {
setState(() {
_currentIndex = index;
});
},
items: const [
BottomNavigationBarItem(
label: 'Home',
icon: Icon(Icons.home),
),
BottomNavigationBarItem(
label: 'Services',
icon: Icon(Icons.local_offer),
),
BottomNavigationBarItem(
label: 'Bookings',
icon: Icon(Icons.calendar_today),
),
BottomNavigationBarItem(
label: 'Notifications',
icon: Icon(Icons.notifications),
),
BottomNavigationBarItem(
label: 'Profile',
icon: Icon(Icons.person),
),
],
),
);
}
}
class HomeTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: HomeTabContent(),
);
}
}
class HomeTabContent extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
_buildPromotionAnnouncement(), // Add promotions and announcements here
_buildServiceCategories(),
],
),
);
}
Widget _buildPromotionAnnouncement() {
return GestureDetector(
onTap: () {
// Handle the tap on the announcement here
// For example, navigate to a new page
},
child: Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.purple,
borderRadius: BorderRadius.circular(12.0),
),
child: Column(
children: <Widget>[
Text(
"Check out our latest promotions and announcements!",
style: TextStyle(
color: Colors.white,
fontSize: 16.0,
),
),
],
),
),
);
}
Widget _buildServiceCategories() {
return GridView.count(
crossAxisCount: 2, // 2 columns
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
children: <Widget>[
_buildServiceCategory("Dressing and Rental Stores", Icons.shopping_bag),
_buildServiceCategory("Beauty and Hair Salon", Icons.spa),
_buildServiceCategory("Manicure, Steam, and Sauna", Icons.face),
_buildServiceCategory("Makeup", Icons.brush), // New "Makeup" category
// Add more service categories here
],
);
}
Widget _buildServiceCategory(String title, IconData icon) {
return GestureDetector(
onTap: () {
// Handle navigation to the service listings for this category
// You can create a new page with a list of stores/salons in this category.
},
child: Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 3,
offset: Offset(0, 2),
),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
icon,
size: 48.0,
color: Colors.purple,
),
SizedBox(height: 8.0),
Text(
title,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
textAlign: TextAlign.center,
),
],
),
),
);
}
}
class ServicesTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
_buildServiceList("Dressing and Rental Stores", Icons.shopping_bag),
_buildServiceList("Beauty and Hair Salon", Icons.spa),
_buildServiceList("Manicure, Steam, and Sauna", Icons.face),
_buildServiceList("Makeup", Icons.brush), // New "Makeup" category
// Add more service categories here
],
),
);
}
Widget _buildServiceList(String title, IconData icon) {
return Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 3,
offset: Offset(0, 2),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Icon(
icon,
size: 36.0,
color: Colors.purple,
),
Text(
title,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
Icon(
Icons.arrow_forward_ios,
size: 20.0,
color: Colors.purple,
),
],
),
SizedBox(height: 16.0),
// Add a list of individual stores/salons here
_buildStore("Store 1", "Description of Store 1", Icons.store),
_buildStore("Store 2", "Description of Store 2", Icons.store),
// Add more stores/salons as needed
],
),
);
}
Widget _buildStore(String storeName, String description, IconData icon) {
return Row(
children: <Widget>[
Icon(icon, size: 24.0),
SizedBox(width: 8.0),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
storeName,
style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold),
),
Text(
description,
style: TextStyle(fontSize: 14.0),
),
],
),
],
);
}
}
class BookingsTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
_buildBookingItem("Haircut", "Beauty Salon A", "July 15, 2023", "10:30 AM"),
_buildBookingItem("Manicure", "Nail Salon B", "July 17, 2023", "3:00 PM"),
_buildBookingItem("Spa Treatment", "Relaxation Spa C", "July 18, 2023", "2:30 PM"),
// Add more booking items here
],
),
);
}
Widget _buildBookingItem(String serviceName, String salonName, String date, String time) {
return Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 3,
offset: Offset(0, 2),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
serviceName,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
Text(
"Salon: $salonName",
style: TextStyle(
fontSize: 16.0,
),
),
Text(
"Date: $date",
style: TextStyle(
fontSize: 16.0,
),
),
Text(
"Time: $time",
style: TextStyle(
fontSize: 16.0,
),
),
],
),
);
}
}
class NotificationsTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
_buildNotification("New Message", "You have a new message from a salon."),
_buildNotification("Appointment Reminder", "Your appointment at Beauty Salon A is tomorrow."),
// Add more notifications here
],
),
);
}
Widget _buildNotification(String title, String content) {
return Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 3,
offset: Offset(0, 2),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
title,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
Text(
content,
style: TextStyle(
fontSize: 16.0,
),
),
],
),
);
}
}
class ProfileTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
_buildUserProfileHeader(),
_buildUserProfileInfo(),
// Add more profile-related content here
],
),
);
}
Widget _buildUserProfileHeader() {
return Container(
padding: EdgeInsets.all(16.0),
color: Colors.purple,
child: Column(
children: <Widget>[
CircleAvatar(
radius: 60.0,
backgroundImage: AssetImage('assets/profile_image.jpg'), // Add your profile image asset
),
SizedBox(height: 10.0),
Text(
"John Doe",
style: TextStyle(
color: Colors.white,
fontSize: 24.0,
fontWeight: FontWeight.bold,
),
),
Text(
"[email protected]",
style: TextStyle(
color: Colors.white,
fontSize: 16.0,
),
),
],
),
);
}
Widget _buildUserProfileInfo() {
return Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 3,
offset: Offset(0, 2),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"Contact Information",
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
Text(
"Phone: (123) 456-7890",
style: TextStyle(
fontSize: 16.0,
),
),
Text(
"Address: 123 Main St, City",
style: TextStyle(
fontSize: 16.0,
),
),
Text(
"Website: www.example.com",
style: TextStyle(
fontSize: 16.0,
),
),
// Add more user information as needed
],
),
);
}
}
class DressRentalDetailsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Dressing and Rental Stores"),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
// Add the detailed information and image about dressing and rental stores here
],
),
),
);
}
}
Widget _buildServiceCategory(String title, IconData icon) {
return GestureDetector(
onTap: () {
// Handle navigation to the detailed information page for "Dressing and Rental Stores"
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => DressRentalDetailsPage(),
),
);
},
child: Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 3,
offset: Offset(0, 2),
),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
icon,
size: 48.0,
color: Colors.purple,
),
SizedBox(height: 8.0),
Text(
title,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
textAlign: TextAlign.center,
),
],
),
),
);
}
Second
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: RegistrationPage(),
);
}
}
class RegistrationPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Registration'),
backgroundColor: Colors.deepPurple,
),
body: Container(
padding: EdgeInsets.all(20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
TextField(
decoration: InputDecoration(
labelText: 'Email',
icon: Icon(Icons.email),
),
),
SizedBox(height: 10),
TextField(
decoration: InputDecoration(
labelText: 'Password',
icon: Icon(Icons.lock),
),
obscureText: true,
),
SizedBox(height: 20),
ElevatedButton(
onPressed: () {
// Handle registration logic here
// If registration is successful, navigate to the home screen
Navigator.of(context).push(MaterialPageRoute(builder: (_) => HomeScreen()));
},
child: Text('Register'),
style: ElevatedButton.styleFrom(
primary: Colors.deepPurple,
padding: EdgeInsets.symmetric(horizontal: 50, vertical: 15),
),
),
SizedBox(height: 10),
TextButton(
onPressed: () {
Navigator.of(context).push(MaterialPageRoute(builder: (_) => LoginPage()));
},
child: Text('Already have an account? Log In'),
),
],
),
),
);
}
}
class LoginPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Login'),
backgroundColor: Colors.deepPurple,
),
body: Container(
padding: EdgeInsets.all(20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
TextField(
decoration: InputDecoration(
labelText: 'Email',
icon: Icon(Icons.email),
),
),
SizedBox(height: 10),
TextField(
decoration: InputDecoration(
labelText: 'Password',
icon: Icon(Icons.lock),
),
obscureText: true,
),
SizedBox(height: 20),
ElevatedButton(
onPressed: () {
// Handle login logic here
// If login is successful, navigate to the home screen
Navigator.of(context).push(MaterialPageRoute(builder: (_) => HomeScreen()));
},
child: Text('Log In'),
style: ElevatedButton.styleFrom(
primary: Colors.deepPurple,
padding: EdgeInsets.symmetric(horizontal: 50, vertical: 15),
),
),
],
),
),
);
}
}
class HomeScreen extends StatefulWidget {
@override
_HomeScreenState createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen> {
int _currentIndex = 0;
final List<Widget> _tabs = [
HomeTab(),
ServicesTab(),
BookingsTab(),
NotificationsTab(),
ProfileTab(),
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('EFOY'),
backgroundColor: Colors.deepPurple,
),
body: _tabs[_currentIndex],
bottomNavigationBar: BottomNavigationBar(
currentIndex: _currentIndex,
type: BottomNavigationBarType.fixed,
items: [
BottomNavigationBarItem(
icon: Icon(Icons.home),
label: 'Home',
),
BottomNavigationBarItem(
icon: Icon(Icons.local_offer),
label: 'Services',
),
BottomNavigationBarItem(
icon: Icon(Icons.calendar_today),
label: 'Bookings',
),
BottomNavigationBarItem(
icon: Icon(Icons.notifications),
label: 'Notifications',
),
BottomNavigationBarItem(
icon: Icon(Icons.person),
label: 'Profile',
),
],
onTap: (index) {
setState(() {
_currentIndex = index;
});
},
),
);
}
}
class HomeTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: HomeTabContent(),
);
}
}
class HomeTabContent extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
_buildPromotionAnnouncements(context), // Add promotions and announcements here
_buildServiceCategories(),
],
),
);
}
Widget _buildPromotionAnnouncements(BuildContext context) {
return GestureDetector(
onTap: () {
// Handle the tap on the announcement here
// For example, navigate to a new page with details about the announcement
Navigator.of(context).push(MaterialPageRoute(builder: (_) => AnnouncementDetailScreen()));
},
child: Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.purple,
borderRadius: BorderRadius.circular(12.0),
),
child: Column(
children: <Widget>[
Text(
"Check out our latest promotions and announcements!",
style: TextStyle(
color: Colors.white,
fontSize: 16.0,
),
),
SizedBox(height: 10), // Add some space between the text and your promotions/announcements
// You can add your promotions and announcements here
_buildAnnouncement("50% Off on All Beauty Services", "Limited time offer. Grab it now!"),
_buildAnnouncement("New Salon Opening", "Visit our new salon in downtown."),
// Add more promotions and announcements as needed
],
),
),
);
}
Widget _buildAnnouncement(String title, String description) {
return Container(
margin: EdgeInsets.symmetric(vertical: 8.0),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.0),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
title,
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 8.0),
Text(
description,
style: TextStyle(
fontSize: 16.0,
),
),
],
),
);
}
Widget _buildServiceCategories() {
return GridView.count(
crossAxisCount: 2, // 2 columns
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
children: <Widget>[
_buildServiceCategory("Dressing and Rental Stores", Icons.shopping_bag),
_buildServiceCategory("Beauty and Hair Salon", Icons.spa),
_buildServiceCategory("Manicure, Steam, and Sauna", Icons.face),
_buildServiceCategory("Makeup", Icons.brush), // New "Makeup" category
// Add more service categories here
],
);
}
Widget _buildServiceCategory(String title, IconData icon) {
return GestureDetector(
onTap: () {
// Handle navigation to the service listings for this category
// You can create a new page with a list of stores/salons in this category.
},
child: Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 3,
offset: Offset(0, 2),
),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
icon,
size: 48.0,
color: Colors.purple,
),
SizedBox(height: 8.0),
Text(
title,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
textAlign: TextAlign.center,
),
],
),
),
);
}
}
class ServicesTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
_buildServiceList("Dressing and Rental Stores", Icons.shopping_bag),
_buildServiceList("Beauty and Hair Salon", Icons.spa),
_buildServiceList("Manicure, Steam, and Sauna", Icons.face),
_buildServiceList("Makeup", Icons.brush), // New "Makeup" category
// Add more service categories here
],
),
);
}
Widget _buildServiceList(String title, IconData icon) {
return Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 3,
offset: Offset(0, 2),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Icon(
icon,
size: 36.0,
color: Colors.purple,
),
Text(
title,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
Icon(
Icons.arrow_forward_ios,
size: 20.0,
color: Colors.purple,
),
],
),
SizedBox(height: 16.0),
// Add a list of individual stores/salons here
_buildStore("Store 1", "Description of Store 1", Icons.store),
_buildStore("Store 2", "Description of Store 2", Icons.store),
// Add more stores/salons as needed
],
),
);
}
Widget _buildStore(String storeName, String description, IconData icon) {
return Row(
children: <Widget>[
Icon(icon, size: 24.0),
SizedBox(width: 8.0),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
storeName,
style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold),
),
Text(
description,
style: TextStyle(fontSize: 14.0),
),
],
),
],
);
}
}
class BookingsTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
_buildBookingItem("Haircut", "Beauty Salon A", "July 15, 2023", "10:30 AM"),
_buildBookingItem("Manicure", "Nail Salon B", "July 17, 2023", "3:00 PM"),
_buildBookingItem("Spa Treatment", "Relaxation Spa C", "July 18, 2023", "2:30 PM"),
// Add more booking items here
],
),
);
}
Widget _buildBookingItem(String serviceName, String salonName, String date, String time) {
return Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 3,
offset: Offset(0, 2),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
serviceName,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
Text(
"Salon: $salonName",
style: TextStyle(
fontSize: 16.0,
),
),
Text(
"Date: $date",
style: TextStyle(
fontSize: 16.0,
),
),
Text(
"Time: $time",
style: TextStyle(
fontSize: 16.0,
),
),
],
),
);
}
}
class NotificationsTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
_buildNotification("New Message", "You have a new message from a salon."),
_buildNotification("Appointment Reminder", "Your appointment at Beauty Salon A is tomorrow."),
// Add more notifications here
],
),
);
}
Widget _buildNotification(String title, String content) {
return Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 3,
offset: Offset(0, 2),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
title,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
Text(
content,
style: TextStyle(
fontSize: 16.0,
),
),
],
),
);
}
}
class ProfileTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
_buildUserProfileHeader(),
_buildUserProfileInfo(),
// Add more profile-related content here
],
),
);
}
Widget _buildUserProfileHeader() {
return Container(
padding: EdgeInsets.all(16.0),
color: Colors.purple,
child: Column(
children: <Widget>[
CircleAvatar(
radius: 60.0,
backgroundImage: AssetImage('assets/profile_image.jpg'), // Add your profile image asset
),
SizedBox(height: 10.0),
Text(
"John Doe",
style: TextStyle(
color: Colors.white,
fontSize: 24.0,
fontWeight: FontWeight.bold,
),
),
Text(
"[email protected]",
style: TextStyle(
color: Colors.white,
fontSize: 16.0,
),
),
],
),
);
}
Widget _buildUserProfileInfo() {
return Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 3,
offset: Offset(0, 2),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"Contact Information",
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
Text(
"Phone: (123) 456-7890",
style: TextStyle(
fontSize: 16.0,
),
),
Text(
"Address: 123 Main St, City",
style: TextStyle(
fontSize: 16.0,
),
),
Text(
"Website: www.example.com",
style: TextStyle(
fontSize: 16.0,
),
),
// Add more user information as needed
],
),
);
}
}
class AnnouncementDetailsScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Announcement Details'),
backgroundColor: Colors.deepPurple,
),
body: Container(
padding: EdgeInsets.all(20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"Announcement Title",
style: TextStyle(
fontSize: 24.0,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 10),
Text(
"This is the detailed content of the announcement.",
style: TextStyle(
fontSize: 18.0,
),
),
// Add more details about the announcement as needed
],
),
),
);
}
}
//ANNOUNCEMENT DETAIL SECOND PAGE OR DETAILED PAGE
class AnnouncementDetailScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Announcement Details'),
backgroundColor: Colors.deepPurple,
),
body: Container(
padding: EdgeInsets.all(20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"Announcement Title",
style: TextStyle(
fontSize: 24.0,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 10),
Text(
"This is the detailed content of the announcement.",
style: TextStyle(
fontSize: 18.0,
),
),
// Add more details about the announcement as needed
],
),
),
);
}
}
class DressingAndRentalStoreDetailScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Dressing and Rental Store Details'),
backgroundColor: Colors.deepPurple,
),
body: Container(
padding: EdgeInsets.all(20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"Dressing and Rental Store Name",
style: TextStyle(
fontSize: 24.0,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 10),
Text(
"This is the detailed content of the dressing and rental store.",
style: TextStyle(
fontSize: 18.0,
),
),
// Add more details about the dressing and rental store as needed
],
),
),
);
}
}
Third one
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: RegistrationPage(),
);
}
}
class RegistrationPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Registration'),
backgroundColor: Colors.deepPurple,
),
body: Container(
padding: EdgeInsets.all(20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
TextField(
decoration: InputDecoration(
labelText: 'Email',
icon: Icon(Icons.email),
),
),
SizedBox(height: 10),
TextField(
decoration: InputDecoration(
labelText: 'Password',
icon: Icon(Icons.lock),
),
obscureText: true,
),
SizedBox(height: 20),
ElevatedButton(
onPressed: () {
// Handle registration logic here
// If registration is successful, navigate to the home screen
Navigator.of(context).push(MaterialPageRoute(builder: (_) => HomeScreen()));
},
child: Text('Register'),
style: ElevatedButton.styleFrom(
primary: Colors.deepPurple,
padding: EdgeInsets.symmetric(horizontal: 50, vertical: 15),
),
),
SizedBox(height: 10),
TextButton(
onPressed: () {
Navigator.of(context).push(MaterialPageRoute(builder: (_) => LoginPage()));
},
child: Text('Already have an account? Log In'),
),
],
),
),
);
}
}
class LoginPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Login'),
backgroundColor: Colors.deepPurple,
),
body: Container(
padding: EdgeInsets.all(20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
TextField(
decoration: InputDecoration(
labelText: 'Email',
icon: Icon(Icons.email),
),
),
SizedBox(height: 10),
TextField(
decoration: InputDecoration(
labelText: 'Password',
icon: Icon(Icons.lock),
),
obscureText: true,
),
SizedBox(height: 20),
ElevatedButton(
onPressed: () {
// Handle login logic here
// If login is successful, navigate to the home screen
Navigator.of(context).push(MaterialPageRoute(builder: (_) => HomeScreen()));
},
child: Text('Log In'),
style: ElevatedButton.styleFrom(
primary: Colors.deepPurple,
padding: EdgeInsets.symmetric(horizontal: 50, vertical: 15),
),
),
],
),
),
);
}
}
class HomeScreen extends StatefulWidget {
@override
_HomeScreenState createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen> {
int _currentIndex = 0;
final List<Widget> _tabs = [
HomeTab(),
ServicesTab(),
BookingsTab(),
NotificationsTab(),
ProfileTab(),
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('EFOY'),
backgroundColor: Colors.deepPurple,
),
body: _tabs[_currentIndex],
bottomNavigationBar: BottomNavigationBar(
currentIndex: _currentIndex,
type: BottomNavigationBarType.fixed,
items: [
BottomNavigationBarItem(
icon: Icon(Icons.home),
label: 'Home',
),
BottomNavigationBarItem(
icon: Icon(Icons.local_offer),
label: 'Services',
),
BottomNavigationBarItem(
icon: Icon(Icons.calendar_today),
label: 'Bookings',
),
BottomNavigationBarItem(
icon: Icon(Icons.notifications),
label: 'Notifications',
),
BottomNavigationBarItem(
icon: Icon(Icons.person),
label: 'Profile',
),
],
onTap: (index) {
setState(() {
_currentIndex = index;
});
},
),
);
}
}
class HomeTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: HomeTabContent(),
);
}
}
class HomeTabContent extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
_buildPromotionAnnouncements(context), // Add promotions and announcements here
_buildServiceCategories(context),
],
),
);
}
Widget _buildPromotionAnnouncements(BuildContext context) {
return GestureDetector(
onTap: () {
// Handle the tap on the announcement here
// For example, navigate to a new page with details about the announcement
Navigator.of(context).push(MaterialPageRoute(builder: (_) => AnnouncementDetailScreen()));
},
child: Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.purple,
borderRadius: BorderRadius.circular(12.0),
),
child: Column(
children: <Widget>[
Text(
"Check out our latest promotions and announcements!",
style: TextStyle(
color: Colors.white,
fontSize: 16.0,
),
),
SizedBox(height: 10), // Add some space between the text and your promotions/announcements
// You can add your promotions and announcements here
_buildAnnouncement("50% Off on All Beauty Services", "Limited time offer. Grab it now!"),
_buildAnnouncement("New Salon Opening", "Visit our new salon in downtown."),
// Add more promotions and announcements as needed
],
),
),
);
}
Widget _buildAnnouncement(String title, String description) {
return Container(
margin: EdgeInsets.symmetric(vertical: 8.0),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.0),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
title,
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 8.0),
Text(
description,
style: TextStyle(
fontSize: 16.0,
),
),
],
),
);
}
Widget _buildServiceCategories(BuildContext context) {
return GridView.count(
crossAxisCount: 2,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
children: <Widget>[
_buildServiceCategory(
"Dressing and Rental Stores",
Icons.shopping_bag,
() {
// Navigate to the detailed page for Dressing and Rental Stores
Navigator.of(context).push(
MaterialPageRoute(builder: (_) => DressingAndRentalStoreDetailScreen()),
);
},
),
_buildServiceCategory("Beauty and Hair Salon", Icons.spa, () {
// Navigate to the detailed page for Beauty and Hair Salon
Navigator.of(context).push(
MaterialPageRoute(builder: (_) => BeautyAndHairSalonDetailScreen()),
);
}),
_buildServiceCategory(
"Manicure, Steam, and Sauna",
Icons.face,
() {
// Navigate to the detailed page for Manicure, Steam, and Sauna
Navigator.of(context).push(
MaterialPageRoute(builder: (_) => ManicureSteamSaunaDetailScreen()),
);
},
),
_buildServiceCategory(
"Makeup",
Icons.brush,
() {
// Navigate to the detailed page for Makeup
Navigator.of(context).push(
MaterialPageRoute(builder: (_) => MakeupDetailScreen()),
);
},
),
// Add more categories as needed
],
);
}
// ... (other categories)
Widget _buildServiceCategory(String title, IconData icon, VoidCallback onTap) {
return GestureDetector(
onTap: onTap, // Use the provided onTap function
child: Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 3,
offset: Offset(0, 2),
)],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
icon,
size: 48.0,
color: Colors.purple,
),
SizedBox(height: 8.0),
Text(
title,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
textAlign: TextAlign.center,
),
],
),
),
);
}
class ServicesTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
_buildServiceList("Dressing and Rental Stores", Icons.shopping_bag),
_buildServiceList("Beauty and Hair Salon", Icons.spa),
_buildServiceList("Manicure, Steam, and Sauna", Icons.face),
_buildServiceList("Makeup", Icons.brush), // New "Makeup" category
// Add more service categories here
],
),
);
}
Widget _buildServiceList(String title, IconData icon) {
return Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 3,
offset: Offset(0, 2),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Icon(
icon,
size: 36.0,
color: Colors.purple,
),
Text(
title,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
Icon(
Icons.arrow_forward_ios,
size: 20.0,
color: Colors.purple,
),
],
),
SizedBox(height: 16.0),
// Add a list of individual stores/salons here
_buildStore("Store 1", "Description of Store 1", Icons.store),
_buildStore("Store 2", "Description of Store 2", Icons.store),
// Add more stores/salons as needed
],
),
);
}
Widget _buildStore(String storeName, String description, IconData icon) {
return Row(
children: <Widget>[
Icon(icon, size: 24.0),
SizedBox(width: 8.0),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
storeName,
style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold),
),
Text(
description,
style: TextStyle(fontSize: 14.0),
),
],
),
],
);
}
}
class BookingsTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
_buildBookingItem("Haircut", "Beauty Salon A", "July 15, 2023", "10:30 AM"),
_buildBookingItem("Manicure", "Nail Salon B", "July 17, 2023", "3:00 PM"),
_buildBookingItem("Spa Treatment", "Relaxation Spa C", "July 18, 2023", "2:30 PM"),
// Add more booking items here
],
),
);
}
Widget _buildBookingItem(String serviceName, String salonName, String date, String time) {
return Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 3,
offset: Offset(0, 2),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
serviceName,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
Text(
"Salon: $salonName",
style: TextStyle(
fontSize: 16.0,
),
),
Text(
"Date: $date",
style: TextStyle(
fontSize: 16.0,
),
),
Text(
"Time: $time",
style: TextStyle(
fontSize: 16.0,
),
),
],
),
);
}
}
class NotificationsTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
_buildNotification("New Message", "You have a new message from a salon."),
_buildNotification("Appointment Reminder", "Your appointment at Beauty Salon A is tomorrow."),
// Add more notifications here
],
),
);
}
Widget _buildNotification(String title, String content) {
return Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 3,
offset: Offset(0, 2),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
title,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
Text(
content,
style: TextStyle(
fontSize: 16.0,
),
),
],
),
);
}
}
class ProfileTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
_buildUserProfileHeader(),
_buildUserProfileInfo(),
// Add more profile-related content here
],
),
);
}
Widget _buildUserProfileHeader() {
return Container(
padding: EdgeInsets.all(16.0),
color: Colors.purple,
child: Column(
children: <Widget>[
CircleAvatar(
radius: 60.0,
backgroundImage: AssetImage('assets/profile_image.jpg'), // Add your profile image asset
),
SizedBox(height: 10.0),
Text(
"John Doe",
style: TextStyle(
color: Colors.white,
fontSize: 24.0,
fontWeight: FontWeight.bold,
),
),
Text(
"[email protected]",
style: TextStyle(
color: Colors.white,
fontSize: 16.0,
),
),
],
),
);
}
Widget _buildUserProfileInfo() {
return Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 3,
offset: Offset(0, 2),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"Contact Information",
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
Text(
"Phone: (123) 456-7890",
style: TextStyle(
fontSize: 16.0,
),
),
Text(
"Address: 123 Main St, City",
style: TextStyle(
fontSize: 16.0,
),
),
Text(
"Website: www.example.com",
style: TextStyle(
fontSize: 16.0,
),
),
// Add more user information as needed
],
),
);
}
}
class AnnouncementDetailsScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Announcement Details'),
backgroundColor: Colors.deepPurple,
),
body: Container(
padding: EdgeInsets.all(20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"Announcement Title",
style: TextStyle(
fontSize: 24.0,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 10),
Text(
"This is the detailed content of the announcement.",
style: TextStyle(
fontSize: 18.0,
),
),
// Add more details about the announcement as needed
],
),
),
);
}
}
//ANNOUNCEMENT DETAIL SECOND PAGE OR DETAILED PAGE
class AnnouncementDetailScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Announcement Details'),
backgroundColor: Colors.deepPurple,
),
body: Container(
padding: EdgeInsets.all(20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"Announcement Title",
style: TextStyle(
fontSize: 24.0,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 10),
Text(
"This is the detailed content of the announcement.",
style: TextStyle(
fontSize: 18.0,
),
),
// Add more details about the announcement as needed
],
),
),
);
}
}
class DressingAndRentalStoreDetailScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Dressing and Rental Store Details'),
backgroundColor: Colors.deepPurple,
),
body: Container(
padding: EdgeInsets.all(20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"Dressing and Rental Store Name",
style: TextStyle(
fontSize: 24.0,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 10),
Text(
"This is the detailed content of the dressing and rental store.",
style: TextStyle(
fontSize: 18.0,
),
),
// Add more details about the dressing and rental store as needed
],
),
),
);
}
}
class BeautyAndHairSalonDetailScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Beauty and Hair Salon Details'),
backgroundColor: Colors.deepPurple,
),
body: Container(
padding: EdgeInsets.all(20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"Beauty and Hair Salon Name",
style: TextStyle(
fontSize: 24.0,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 10),
Text(
"This is the detailed content of the beauty and hair salon.",
style: TextStyle(
fontSize: 18.0,
),
),
// You can add more details about the beauty and hair salon here
],
),
),
);
}
}
class ManicureSteamSaunaDetailScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Manicure, Steam, and Sauna Details'),
backgroundColor: Colors.deepPurple,
),
body: Container(
padding: EdgeInsets.all(20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"Manicure, Steam, and Sauna",
style: TextStyle(
fontSize: 24.0,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 10),
Text(
"This is the detailed content of the Manicure, Steam, and Sauna category.",
style: TextStyle(
fontSize: 18.0,
),
),
// Add more details about Manicure, Steam, and Sauna as needed
],
),
),
);
}
}
class MakeupDetailScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Makeup Details'),
backgroundColor: Colors.deepPurple,
),
body: Container(
padding: EdgeInsets.all(20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"Makeup",
style: TextStyle(
fontSize: 24.0,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 10),
Text(
"This is the detailed content of the Makeup category.",
style: TextStyle(
fontSize: 18.0,
),
),
// Add more details about Makeup as needed
],
),
),
);
}
}