Skip to content

Commit

Permalink
Merge pull request #15 from mannate14/Events-page
Browse files Browse the repository at this point in the history
events page done
  • Loading branch information
Ecell23 authored Oct 13, 2024
2 parents d01fb68 + 03ebeb6 commit a82eb52
Show file tree
Hide file tree
Showing 8 changed files with 414 additions and 19 deletions.
Binary file added assets/images/event_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/event_image1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import 'package:ecell_app/configs/configs.dart';
import 'package:ecell_app/pages/Events-page/Event_registration.dart';
import 'package:ecell_app/pages/Events-page/Events-page.dart';
import 'package:ecell_app/pages/collabs_page/collabs_page.dart';
import 'package:ecell_app/pages/home_page/utils/icon_provider.dart';
import 'package:ecell_app/pages/login_page/login_page.dart';
Expand Down Expand Up @@ -26,18 +28,17 @@ class ECellApp extends StatelessWidget {
title: "E-Cell App",
theme: darkTheme,git add
debugShowCheckedModeBanner: false,
home: const HomePage(),
home: const Eventspage(),
routes: {
LoginPage.routeName: (context) => const LoginPage(),
SignUpPage.routeName: (context) => const SignUpPage(),
Eventspage.routeName: (context) => const Eventspage(),
HomePage.routeName: (context) => const HomePage(),
SplashScreen.routeName: (context) => const SplashScreen(),
CollabPage.routeName: (context) => const CollabPage(),
EventRegistrationpage.routeName: (context) => const EventRegistrationpage(),
ProfilePage.routeName: (context) => const ProfilePage(),
ResourcePage.routeName: (context) => const ResourcePage(),
TeamsPage.routeName: (context) => const TeamsPage(),
},
initialRoute: SplashScreen.routeName,
// initialRoute: CollabPage.routeName,
),
);
Expand Down
155 changes: 155 additions & 0 deletions lib/pages/Events-page/Event_registration.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
import 'package:ecell_app/utils/widgets/custom_app_bar/custom_app_bar.dart';
import 'package:ecell_app/utils/widgets/custom_background/custom_background.dart';
import 'package:flutter/material.dart';

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

//route
static const String routeName = '/EventRegistrationRoute';

@override
State<EventRegistrationpage> createState() => _EventsRegistrationState();
}


class _EventsRegistrationState extends State<EventRegistrationpage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(),
body: CustomBackground(
bodyWidget: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(16.0), // Adds padding to the whole content
child: Column(
children: [
SizedBox(height: 16), // Space below the app bar

// Image section with rounded corners and white border
Center(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.0), // Rounded corners
border: Border.all(
color: Colors.white, // White border color
width: 4.0, // Border width
),
),
child: ClipRRect(
borderRadius: BorderRadius.circular(16.0), // Same radius as the outer container for consistency
child: Image.asset(
'assets/images/event_image1.png', // Replace with your image path
fit: BoxFit.contain,
height: 250, // Fixed height for the image
),
),
),
),

SizedBox(height: 16), // Space between image and description

// Description text box
Container(
padding: EdgeInsets.all(12.0), // Padding inside the description box
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.0), // Rounded corners
),
child: Text(
'Individual Registration',
style: TextStyle(
fontSize: 20,
color: Colors.white, // White text color
),
textAlign: TextAlign.center, // Center align the text
),
),

SizedBox(height: 24), // Space between description and form

// Registration Form with 4 TextFields
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// First Name TextField
TextField(
style: TextStyle(color: Colors.white), // Blue text color when typing
decoration: InputDecoration(
labelText: 'Name ',
labelStyle: TextStyle(color: Colors.grey), // Label color
border: OutlineInputBorder(),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color.fromRGBO(14, 54, 105, 1)), // Blue border when focused
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.white), // White border when not focused
),
),
cursorColor: Color.fromRGBO(14, 54, 105, 1), // Blue cursor when typing
),
SizedBox(height: 16), // Space between text fields

// Last Name TextField
TextField(
style: TextStyle(color: Colors.white), // Blue text color when typing
decoration: InputDecoration(
labelText: 'Scholar ID ',
labelStyle: TextStyle(color: Colors.grey), // Label color
border: OutlineInputBorder(),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color.fromRGBO(14, 54, 105, 1)), // Blue border when focused
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.white), // White border when not focused
),
),
cursorColor: Color.fromRGBO(14, 54, 105, 1), // Blue cursor when typing
),
SizedBox(height: 16), // Space between text fields

// Email TextField
TextField(
style: TextStyle(color: Colors.white), // Blue text color when typing
decoration: InputDecoration(
labelText: 'Branch ',
labelStyle: TextStyle(color: Colors.grey), // Label color
border: OutlineInputBorder(),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color.fromRGBO(14, 54, 105, 1)), // Blue border when focused
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.white), // White border when not focused
),
),
cursorColor: Color.fromRGBO(14, 54, 105, 1), // Blue cursor when typing
),
SizedBox(height: 16), // Space between text fields

// Phone Number TextField
TextField(
style: TextStyle(color: Colors.white), // Blue text color when typing
decoration: InputDecoration(
labelText: 'Email ID ',
labelStyle: TextStyle(color: Colors.grey), // Label color
border: OutlineInputBorder(),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color.fromRGBO(14, 54, 105, 1)), // Blue border when focused
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.white), // White border when not focused
),
),
cursorColor: Color.fromRGBO(14, 54, 105, 1), // Blue cursor when typing
),

SizedBox(height: 24), // Space at the bottom for buttons or further content
],
),
],
),
),
),
),
);
}
}
76 changes: 76 additions & 0 deletions lib/pages/Events-page/Events-page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import 'package:ecell_app/pages/Events-page/Event_registration.dart';
import 'package:ecell_app/pages/Events-page/Widgets/HorizontalScrollableStack.dart';
import 'package:ecell_app/utils/widgets/custom_app_bar/custom_app_bar.dart';
import 'package:ecell_app/utils/widgets/custom_background/custom_background.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';


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

//route
static const String routeName = '/EventspageRoute';

@override
State<Eventspage> createState() => _EventsPageState();
}
class _EventsPageState extends State<Eventspage> {

void _navigateToEventDetail(BuildContext context) {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => EventRegistrationpage()),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(),
body: CustomBackground(
bodyWidget: SingleChildScrollView(
child: Column(
children: [
SizedBox(height: 50), // Shifts the content down
GestureDetector(
onTap: () => _navigateToEventDetail(context), // Navigate to new page on tap
child: Center(
child: Text(
'Events', // Your heading text
style: TextStyle(
fontSize: 24, // Adjust the font size
fontWeight: FontWeight.bold, // Make it bold
color: Colors.white, // Change the color if needed
),
),
),
),
SizedBox(height: 20),
Center(
child: HorizontalScrollableStack(), // Replace with your widget
),
SizedBox(height: 20),
GestureDetector(
onTap: () => _navigateToEventDetail(context), // Navigate to new page on tap
child: Center(
child: Text(
'Events', // Your heading text
style: TextStyle(
fontSize: 24, // Adjust the font size
fontWeight: FontWeight.bold, // Make it bold
color: Colors.white, // Change the color if needed
),
),
),
),
SizedBox(height: 20),
Center(
child: HorizontalScrollableStack(), // Replace with your widget
),
],
),
),
)
);
}
}
Loading

0 comments on commit a82eb52

Please sign in to comment.