diff --git a/assets/images/event_image.png b/assets/images/event_image.png new file mode 100644 index 0000000..994a782 Binary files /dev/null and b/assets/images/event_image.png differ diff --git a/assets/images/event_image1.png b/assets/images/event_image1.png new file mode 100644 index 0000000..a8c0a94 Binary files /dev/null and b/assets/images/event_image1.png differ diff --git a/lib/main.dart b/lib/main.dart index 0a112e3..91f50d9 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -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'; @@ -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, ), ); diff --git a/lib/pages/Events-page/Event_registration.dart b/lib/pages/Events-page/Event_registration.dart new file mode 100644 index 0000000..d395642 --- /dev/null +++ b/lib/pages/Events-page/Event_registration.dart @@ -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 createState() => _EventsRegistrationState(); +} + + +class _EventsRegistrationState extends State { + @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 + ], + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/Events-page/Events-page.dart b/lib/pages/Events-page/Events-page.dart new file mode 100644 index 0000000..ba3edda --- /dev/null +++ b/lib/pages/Events-page/Events-page.dart @@ -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 createState() => _EventsPageState(); +} + class _EventsPageState extends State { + + 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 + ), + ], + ), + ), + ) + ); + } + } \ No newline at end of file diff --git a/lib/pages/Events-page/Widgets/HorizontalScrollableStack.dart b/lib/pages/Events-page/Widgets/HorizontalScrollableStack.dart new file mode 100644 index 0000000..726c63c --- /dev/null +++ b/lib/pages/Events-page/Widgets/HorizontalScrollableStack.dart @@ -0,0 +1,163 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class HorizontalScrollableStack extends StatefulWidget { + @override + _HorizontalScrollableStackState createState() => + _HorizontalScrollableStackState(); +} + +class _HorizontalScrollableStackState extends State { + final ScrollController _scrollController = ScrollController(); + + void _scrollLeft() { + if (_scrollController.hasClients) { + _scrollController.animateTo( + _scrollController.offset - 100, + duration: Duration(milliseconds: 300), + curve: Curves.easeInOut, + ); + } + } + + void _scrollRight() { + if (_scrollController.hasClients) { + _scrollController.animateTo( + _scrollController.offset + 100, + duration: Duration(milliseconds: 300), + curve: Curves.easeInOut, + ); + } + } + + @override + Widget build(BuildContext context) { + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + IconButton( + icon: Icon(Icons.arrow_left), + onPressed: _scrollLeft, + ), + SizedBox( + height: 400, + width: 270, // Ensure this matches the width of one card plus margin + child: ListView.builder( + scrollDirection: Axis.horizontal, + controller: _scrollController, + physics: NeverScrollableScrollPhysics(), // Disable user scrolling + itemCount: 10, + itemBuilder: (context, index) { + return Container( + width: 250, // This is the width of one card + height: 289, + margin: EdgeInsets.symmetric(horizontal: 10.0), // Margin on both sides + color: Colors.white, + child: Padding( + padding: EdgeInsets.all(8.0), // Padding for the whole content + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Image section + Center( + child: Image.asset( + 'assets/images/event_image1.png', // Replace with your image path + fit: BoxFit.contain, + height: 240, // Set a fixed height for the image + ), + ), + SizedBox(height: 8), // Space between image and description + + // Heading of the description + Text( + 'Name', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + color: Colors.black, // Ensure the text is black + ), + ), + // Description text + Text( + '4th December 2022, New Gallery, NIT Silchar', + style: TextStyle( + fontSize: 7, + color: Colors.black, // Ensure the text is black + ), + ), + SizedBox(height: 8), + // Row with two rounded rectangle columns aligned to the start + Row( + mainAxisAlignment: MainAxisAlignment.start, // Align columns to the start + children: [ + // First Column + Container( + padding: EdgeInsets.symmetric(vertical: 8.0, horizontal: 12.0), // Padding to center the text + decoration: BoxDecoration( + color: Color.fromRGBO(0, 81, 177, 1), // Background color of the text + borderRadius: BorderRadius.circular(12.0), // Rounded rectangle shape + ), + child: Center( + child: Text( + 'Orientation', + style: TextStyle( + fontSize: 7, + color: Colors.white, // Text color + ), + ), + ), + ), + SizedBox(width: 8), // Space between the two columns + + // Second Column + Container( + padding: EdgeInsets.symmetric(vertical: 8.0, horizontal: 12.0), // Padding to center the text + decoration: BoxDecoration( + color: Color.fromRGBO(0, 81, 177, 1), // Background color of the text + borderRadius: BorderRadius.circular(12.0), // Rounded rectangle shape + ), + child: Center( + child: Text( + 'Engenius', + style: TextStyle( + fontSize: 7, + color: Colors.white, // Text color + ), + ), + ), + ), + ], + ), + SizedBox(height: 8), // Space between row and next description + + // Third description text + Text( + 'An interactive and fun event organized exclusively for the 1st year batch to give them a taste of how entrepreneurship works.', + style: TextStyle( + fontSize: 7, + color: Colors.black, // Ensure the text is black + ), + ), + ], + ), + ), + ); + + + + }, + ), + ), + IconButton( + icon: Icon(Icons.arrow_right), + onPressed: _scrollRight, + ), + ], + ), + ], + ); + } +} diff --git a/lib/utils/widgets/custom_background/custom_background.dart b/lib/utils/widgets/custom_background/custom_background.dart index 3d0d1c2..b93811c 100644 --- a/lib/utils/widgets/custom_background/custom_background.dart +++ b/lib/utils/widgets/custom_background/custom_background.dart @@ -61,4 +61,4 @@ class CustomBackground extends StatelessWidget { ], ); } -} +} \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index aded48d..d8ce6c8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -335,26 +335,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -391,10 +391,10 @@ packages: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.12.0" mime: dependency: transitive description: @@ -548,10 +548,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" timing: dependency: transitive description: @@ -580,10 +580,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -617,5 +617,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <4.0.0" - flutter: ">=3.7.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54"