From 6dfa7ce9ade922742cc822474dd85f1389de8ef9 Mon Sep 17 00:00:00 2001 From: Diptanghsu-DC <115690935+Diptanghsu-DC@users.noreply.github.com> Date: Sun, 21 Apr 2024 01:32:59 +0530 Subject: [PATCH 1/4] changed the min sdk version to 21 --- android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index ccbe8f2..04fa620 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -52,7 +52,7 @@ android { applicationId "com.efficacyuserv2.app" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion flutter.minSdkVersion + minSdkVersion 21 targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName From fab3152c21f720a6e10c9947ab8df28b65ee238d Mon Sep 17 00:00:00 2001 From: Diptanghsu-DC <115690935+Diptanghsu-DC@users.noreply.github.com> Date: Sun, 21 Apr 2024 01:33:14 +0530 Subject: [PATCH 2/4] added explore page --- lib/main.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/main.dart b/lib/main.dart index 75bb441..0b06e51 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -30,6 +30,7 @@ class EfficacyUser extends StatelessWidget { routes: { //issue here Homepage.routeName: (context) => const Homepage(), + ExplorePage.routeName: (context) => const ExplorePage(), LoginPage.routeName: (context) => const LoginPage(), SplashScreen.routeName: (context) => const SplashScreen(), ProfilePage.routeName: (context) => const ProfilePage(), From e0172c0efb8cefbd09b81c29ec754c5536bffce0 Mon Sep 17 00:00:00 2001 From: Diptanghsu-DC <115690935+Diptanghsu-DC@users.noreply.github.com> Date: Sun, 21 Apr 2024 01:33:53 +0530 Subject: [PATCH 3/4] ui changes to event showcase page --- .../events_showcase_page.dart | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/pages/homepage/widgets/events_showcase_page/events_showcase_page.dart b/lib/pages/homepage/widgets/events_showcase_page/events_showcase_page.dart index b2b08a8..048a54b 100644 --- a/lib/pages/homepage/widgets/events_showcase_page/events_showcase_page.dart +++ b/lib/pages/homepage/widgets/events_showcase_page/events_showcase_page.dart @@ -101,17 +101,17 @@ class _EventsShowcasePageState extends State { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding( - padding: const EdgeInsets.only(left: 25.0), - child: Text( - "${currentEventStatus?.name} Events", - style: TextStyle( - fontSize: MediaQuery.of(context).size.width * 0.06, - color: const Color.fromARGB(253, 82, 81, 81), - fontWeight: FontWeight.w500, - ), - ), - ), + // Padding( + // padding: const EdgeInsets.only(left: 25.0), + // child: Text( + // "${currentEventStatus?.name} Events", + // style: TextStyle( + // fontSize: MediaQuery.of(context).size.width * 0.06, + // color: const Color.fromARGB(253, 82, 81, 81), + // fontWeight: FontWeight.w500, + // ), + // ), + // ), Expanded( child: RefreshIndicator( onRefresh: _refreshEvents, From 5658c805654020c3b9e0f806bde7bea96c721e76 Mon Sep 17 00:00:00 2001 From: Diptanghsu-DC <115690935+Diptanghsu-DC@users.noreply.github.com> Date: Sun, 21 Apr 2024 01:34:24 +0530 Subject: [PATCH 4/4] created explore page --- lib/pages/explore/explore_page.dart | 77 +++++++++++++++++++ lib/pages/explore/widgets/event_card.dart | 92 +++++++++++++++++++++++ lib/pages/pages.dart | 1 + 3 files changed, 170 insertions(+) create mode 100644 lib/pages/explore/explore_page.dart create mode 100644 lib/pages/explore/widgets/event_card.dart diff --git a/lib/pages/explore/explore_page.dart b/lib/pages/explore/explore_page.dart new file mode 100644 index 0000000..a879e38 --- /dev/null +++ b/lib/pages/explore/explore_page.dart @@ -0,0 +1,77 @@ +import 'package:efficacy_user/config/config.dart'; +import 'package:efficacy_user/pages/homepage/widgets/events_showcase_page/events_showcase_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class ExplorePage extends StatefulWidget { + const ExplorePage({super.key}); + + static const String routeName = "/explorePage"; + + @override + State createState() => _ExplorePageState(); +} + +class _ExplorePageState extends State { + @override + Widget build(context) { + final width = MediaQuery.of(context).size.width; + final height = MediaQuery.of(context).size.height; + return DefaultTabController( + length: 3, + child: Scaffold( + appBar: AppBar( + title: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10.0, + // vertical: 15.0, + ), + child: Text( + "Explore", + style: TextStyle( + fontSize: width * 0.07, + fontWeight: FontWeight.bold, + color: Color.fromARGB(255, 79, 78, 78), + ), + ), + ), + actions: [ + const Icon(CupertinoIcons.bell), + Padding( + padding: EdgeInsets.only(right: 28.0), + child: Icon( + Icons.code, + size: width * 0.1, + ), + ), + ].separate(30), + bottom: const TabBar( + indicatorWeight: 1, + indicatorColor: accent, + tabs: [ + Tab(text: "Upcoming"), + Tab(text: "Ongoing"), + Tab(text: "Completed"), + ], + ), + ), + body: TabBarView( + children: [ + EventsShowcasePage( + showSubscribedOnly: false, + currentEventFilterTypeIndex: ValueNotifier(0), + ), + EventsShowcasePage( + showSubscribedOnly: false, + currentEventFilterTypeIndex: ValueNotifier(1), + ), + EventsShowcasePage( + showSubscribedOnly: false, + currentEventFilterTypeIndex: ValueNotifier(2), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/explore/widgets/event_card.dart b/lib/pages/explore/widgets/event_card.dart new file mode 100644 index 0000000..35d594f --- /dev/null +++ b/lib/pages/explore/widgets/event_card.dart @@ -0,0 +1,92 @@ +// import 'package:efficacy_user/config/config.dart'; +// import 'package:flutter/material.dart'; + +// class EventCard extends StatefulWidget { +// const EventCard({super.key}); + +// @override +// State createState() => _EventCardState(); +// } + +// class _EventCardState extends State { +// @override +// Widget build(context){ +// return Card( +// child: Column( +// children: [ +// const Gap(10), +// ClipRRect( +// borderRadius: BorderRadius.circular(20), +// child: event.posterURL.isEmpty +// ? Image.asset( +// Assets.mediaImgPath, +// fit: BoxFit.cover, +// ) +// : CustomNetworkImage( +// url: event.posterURL, +// errorWidget: (BuildContext context, _, __) { +// return Image.asset( +// Assets.mediaImgPath, +// fit: BoxFit.cover, +// ); +// }, +// ), +// ), +// Padding( +// padding: const EdgeInsets.only( +// top: 8.0, +// left: 28.0, +// ), +// child: Align( +// alignment: Alignment.centerLeft, +// child: Text( +// event.title, +// style: const TextStyle( +// color: Color.fromARGB(253, 82, 81, 81), +// fontSize: 25, +// fontWeight: FontWeight.w600, +// ), +// ), +// ), +// ), +// Padding( +// padding: const EdgeInsets.only( +// left: 28.0, +// bottom: 25.0, +// ), +// child: Column( +// children: [ +// StreamBuilder( +// stream: ClubController.get(id: event.clubID), +// builder: (BuildContext context, AsyncSnapshot snapshot) { +// List club = []; +// if (snapshot.hasData) { +// club = snapshot.data ?? []; +// } +// if (club.isNotEmpty) { +// String clubName = +// "${club.first.name[0].toUpperCase()}${club.first.name.substring(1)}"; +// return EventDataField( +// text: clubName, +// icon: Icons.group, +// ); +// } +// return const SizedBox.shrink(); +// }), +// EventDataField( +// text: +// "${_dateFormatter.format(event.startDate)} - ${_dateFormatter.format(event.endDate)}", +// icon: CupertinoIcons.calendar, +// ), +// EventDataField( +// text: Formatter.timeOnly(event.startDate), +// icon: CupertinoIcons.clock, +// ), +// ].separate(15), +// ), +// ) +// ].separate(5), +// ), +// ); +// } +// } \ No newline at end of file diff --git a/lib/pages/pages.dart b/lib/pages/pages.dart index 9f668ec..4e010d9 100644 --- a/lib/pages/pages.dart +++ b/lib/pages/pages.dart @@ -8,3 +8,4 @@ export 'signup/signup_page.dart'; export 'login/login_page.dart'; export 'developers_page/developers_page.dart'; export 'forgot_password/forgot_password.dart'; +export 'explore/explore_page.dart';