-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from mannate14/Events-page
events page done
- Loading branch information
Showing
8 changed files
with
414 additions
and
19 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
], | ||
), | ||
], | ||
), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
), | ||
], | ||
), | ||
), | ||
) | ||
); | ||
} | ||
} |
Oops, something went wrong.