From 3817291af497c9ec3dfa669b19d5c1d84f8c5a87 Mon Sep 17 00:00:00 2001 From: marizvi <202051121@iiitvadodara.ac.in> Date: Sun, 31 Oct 2021 01:11:18 +0530 Subject: [PATCH 1/5] Light theme added --- google-services.json | 16 ++++ lib/styles.dart | 43 +++++---- lib/theme_setup.dart | 12 +++ lib/ui/EventCard.dart | 16 ++-- lib/ui/MenuWidget.dart | 141 ++++++++++++++++++------------ lib/ui/app_feedback.dart | 22 +++-- lib/ui/app_feedback_page.dart | 2 +- lib/ui/dialog_widget.dart | 2 +- lib/ui/event_details.dart | 2 +- lib/ui/event_list.dart | 134 ++++++++++++++-------------- lib/ui/event_list_page.dart | 2 +- lib/ui/homePage(temporary).dart | 2 +- lib/ui/login_screen.dart | 2 +- lib/ui/past_event_details.dart | 3 +- lib/ui/past_event_list.dart | 5 +- lib/ui/past_event_page.dart | 2 +- lib/ui/slider_widget.dart | 4 +- lib/ui/slider_widget_present.dart | 4 +- pubspec.lock | 113 +----------------------- 19 files changed, 250 insertions(+), 277 deletions(-) create mode 100644 lib/theme_setup.dart diff --git a/google-services.json b/google-services.json index 2e100eb..a5d1c74 100644 --- a/google-services.json +++ b/google-services.json @@ -54,6 +54,22 @@ "certificate_hash": "801fff0f078b43c4b50647cb4daf1bcb2f4edee0" } }, + { + "client_id": "1012587669993-df7cql2c589llepq0u26157vvjj4hqb0.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "com.iiitvadodara.club_calendar", + "certificate_hash": "b3ab6e09695210226fb8670a84c534cf7a501f83" + } + }, + { + "client_id": "1012587669993-lu5f65fj1j1p9r1u6t53s3nppvphnqbe.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "com.iiitvadodara.club_calendar", + "certificate_hash": "acc84fdee92b84c4652762ebe2728fa3ad3b4f64" + } + }, { "client_id": "1012587669993-oq5hjb3n70oc0aiqjcf85cr6rndre6pb.apps.googleusercontent.com", "client_type": 1, diff --git a/lib/styles.dart b/lib/styles.dart index a2ff4fd..ac0f442 100644 --- a/lib/styles.dart +++ b/lib/styles.dart @@ -5,14 +5,24 @@ import 'package:flutter/rendering.dart'; class Styles { static double elevation = 10.0; - static const Color backgroundColor = Color(0xff313131); + static Color backgroundColor = Color(0xff313131); + static Color cardColor = Colors.black12; + static Color subCardColor = Colors.black38; static const Color buttonColor = Color(0xffF48076); - static const Color fontColor = Color.fromRGBO(229, 229, 229, 1); + static Color textColor = Color.fromRGBO(229, 229, 229, 1); + static Color fontColor = Color.fromRGBO(229, 229, 229, 1); static const Color descriptionColor = Color.fromRGBO(204, 203, 203, 1); static const Color detailsColor = Color.fromRGBO(187, 187, 187, 1); static const String googleImage = "assets/icons/google_bg.png"; static const String logoImage = "assets/icons/CC-Logo(1).png"; - + Styles(colour, textcolor, cardcolor, subcard) { + backgroundColor = colour; + textColor = textcolor; + fontColor = textcolor; + cardColor = cardcolor; + subCardColor = subcard; + } + Styles.namedConstructor() {} Widget getIcon(IconData iconData, {colour = buttonColor, defaultSize = 40.0, @@ -37,19 +47,19 @@ class Styles { } TextStyle customStyle( - {color = fontColor, size = 18.0, fontWeight = FontWeight.w400}) { + {size: 18.0, color = "", fontWeight = FontWeight.w500}) { return GoogleFonts.montserrat( - fontSize: size, color: color, fontWeight: fontWeight); + fontSize: 18.0, color: fontColor, fontWeight: FontWeight.w400); } - TextStyle titleStyle({color = fontColor}) { + TextStyle titleStyle({color = ""}) { return GoogleFonts.montserrat( - fontSize: 28, color: color, fontWeight: FontWeight.w500); + fontSize: 28, color: fontColor, fontWeight: FontWeight.w500); } - TextStyle headingStyle({color = fontColor, fontWeight = FontWeight.w500}) { + TextStyle headingStyle({color = "", fontWeight = FontWeight.w500}) { return GoogleFonts.montserrat( - fontSize: 20, color: color, fontWeight: fontWeight); + fontSize: 20, color: fontColor, fontWeight: fontWeight); } TextStyle descriptionStyle({color = descriptionColor}) { @@ -57,20 +67,17 @@ class Styles { fontSize: 18, color: color, fontWeight: FontWeight.w400); } - TextStyle cardHeadingStyle({color = fontColor, fontWeight= FontWeight.w400}){ + TextStyle cardHeadingStyle({color = "", fontWeight = FontWeight.w400}) { return GoogleFonts.montserrat( - fontSize: 25, color: color, fontWeight: fontWeight); + fontSize: 25, color: fontColor, fontWeight: fontWeight); } - TextStyle cardDurationStyle({color = buttonColor, fontWeight= FontWeight.w400}){ + TextStyle cardDurationStyle( + {color = buttonColor, fontWeight = FontWeight.w400}) { return GoogleFonts.montserrat( fontSize: 16, color: color, fontWeight: fontWeight); } - - - - List shadowToContainer() { return [ BoxShadow( @@ -145,8 +152,8 @@ class Styles { info[index]['info'].toString(), softWrap: false, style: (info[index]['iconData'] != null) - ? styles.headingStyle(fontWeight: FontWeight.normal) - : styles.customStyle(size: 20.0,color: Styles.detailsColor), + ? styles.headingStyle(fontWeight: FontWeight.normal,color:Colors.red) + : styles.customStyle(size: 20.0, color: Colors.red), ), subtitle: (index == 0 && info[index]['iconData'] != null) ? Text( diff --git a/lib/theme_setup.dart b/lib/theme_setup.dart new file mode 100644 index 0000000..162ee8d --- /dev/null +++ b/lib/theme_setup.dart @@ -0,0 +1,12 @@ +import 'package:flutter/material.dart'; + +class MyThemes { + static final darkTheme = ThemeData( + scaffoldBackgroundColor: Colors.grey.shade900, + colorScheme: ColorScheme.dark(), + ); + static final lightTheme = ThemeData( + scaffoldBackgroundColor: Colors.white, + colorScheme: ColorScheme.light(), + ); +} diff --git a/lib/ui/EventCard.dart b/lib/ui/EventCard.dart index b92c2b6..8370016 100644 --- a/lib/ui/EventCard.dart +++ b/lib/ui/EventCard.dart @@ -1,4 +1,5 @@ import 'package:club_calendar/styles.dart'; +import 'package:club_calendar/ui/MenuWidget.dart'; import 'package:flutter/material.dart'; class EventCard extends StatefulWidget { @@ -17,8 +18,9 @@ class EventCard extends StatefulWidget { class _EventCardState extends State { @override Widget build(BuildContext context) { - - final styles=Styles(); + final styles=Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black); +if(lit==true) + final styles=Styles(Colors.white,Colors.black,Colors.white60,Colors.white); //For date part @@ -34,16 +36,14 @@ class _EventCardState extends State { ), child: Card( - - color: Colors.black12, + color: Styles.subCardColor, child: Column( children: [ Padding( padding: const EdgeInsets.fromLTRB(8, 0, 8, 0), child: Text(widget.date, style: styles.cardHeadingStyle( - - color: Styles.buttonColor, + color: Styles.backgroundColor, fontWeight: FontWeight.w300, @@ -60,7 +60,7 @@ class _EventCardState extends State { ) ), - ) + ), ], ), ) @@ -99,7 +99,7 @@ class _EventCardState extends State { return Padding( padding: const EdgeInsets.all(15), child: Card( - color: Colors.black12, + color: Styles.cardColor, elevation: 5.0, child: Container( width: double.infinity, diff --git a/lib/ui/MenuWidget.dart b/lib/ui/MenuWidget.dart index bb885f3..da2fa1b 100644 --- a/lib/ui/MenuWidget.dart +++ b/lib/ui/MenuWidget.dart @@ -7,9 +7,10 @@ import '../styles.dart'; import '../util/google_sign_in.dart'; import 'package:sliding_switch/sliding_switch.dart'; import 'package:auto_size_text/auto_size_text.dart'; - +import 'event_list.dart'; import 'app_feedback_page.dart'; import 'event_details.dart'; +import 'event_list.dart'; import 'event_list_page.dart'; //Drawer Code @@ -20,6 +21,8 @@ class MenuWidget extends StatefulWidget { _MenuWidgetState createState() => _MenuWidgetState(); } +bool lit = false; + class _MenuWidgetState extends State { @override Widget build(BuildContext context) { @@ -29,22 +32,48 @@ class _MenuWidgetState extends State { bool isPressedPastEvent = false; bool isPressedFeedBack = false; - var styles = Styles(); + var styles = Styles(Colors.grey.shade800, Colors.white,Colors.black12,Colors.white12); + if (lit == true) { + var styles = Styles(Colors.white, Colors.black,Colors.white60,Colors.white60); + } + double deviceHeight = MediaQuery.of(context).size.height, deviceWidth = MediaQuery.of(context).size.width; //********************************************************************************************** - return Drawer( child: SingleChildScrollView( - child: Container( - width: deviceWidth, - color: Styles.backgroundColor, - child: Container( + child: Container( + width: deviceWidth, + color: Styles.backgroundColor, + child: Column( + children: [ + SizedBox( + height: 40, + ), + Column( + children:[ + Text("Dark-Light", + style: TextStyle(color: Styles.fontColor), + ), + Switch( + value: lit, + onChanged: (val) { + setState(() { + lit = val; + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => EventListPage()), + ); + }); + }), + ]), + Container( height: deviceHeight, child: ListView(children: [ + //Image - Padding( padding: const EdgeInsets.all(25), child: Container( @@ -58,35 +87,39 @@ class _MenuWidgetState extends State { ), //********************************************************************************************** + SizedBox( + width:10, + height: 40, + ), //Slider - Padding( - padding: const EdgeInsets.only( - top: 20, bottom: 50, left: 10, right: 10), - child: SizedBox( - height: deviceHeight * 0.06399636, - width: deviceWidth * 0.8, - child: SlidingSwitch( - value: false, - width: deviceWidth * 0.731, //check adaptability - onChanged: (bool value) { - print(value); - }, - height: 55, - animationDuration: const Duration(milliseconds: 400), - onTap: () {}, - onDoubleTap: () {}, - onSwipe: () {}, - textOff: "Dark", - textOn: "Light", - colorOn: Colors.white, - colorOff: const Color(0xff6682c0), - background: Colors.black38, - buttonColor: Colors.black, - inactiveColor: const Color(0xff636f7b), - ), - ), - ), + // Padding( + // padding: const EdgeInsets.only( + // top: 20, bottom: 50, left: 10, right: 10), + // child: SizedBox( + // height: deviceHeight * 0.06399636, + // width: deviceWidth * 0.8, + // child: SlidingSwitch( + // value: false, + // width: deviceWidth * 0.731, //check adaptability + // onChanged: (bool value) { + // print(value); + // }, + // height: 55, + // animationDuration: const Duration(milliseconds: 400), + // onTap: () {}, + // onDoubleTap: () {}, + // onSwipe: () {}, + // textOff: "Dark", + // textOn: "Light", + // colorOn: Colors.white, + // colorOff: const Color(0xff6682c0), + // background: Colors.black38, + // buttonColor: Colors.black, + // inactiveColor: const Color(0xff636f7b), + // ), + // ), + // ), //********************************************************************************************** @@ -120,15 +153,12 @@ class _MenuWidgetState extends State { //TODO onPressed: () { - - Navigator.push( - context, MaterialPageRoute(builder: (context) => EventListPage()), + context, + MaterialPageRoute( + builder: (context) => EventListPage()), ); - - - setState(() { isPressedEvent = true; }); @@ -146,7 +176,7 @@ class _MenuWidgetState extends State { child: AutoSizeText( "Events", style: TextStyle( - color: Styles.fontColor, + color: Styles.textColor, fontSize: 20, fontWeight: FontWeight.w400), textAlign: TextAlign.center, @@ -193,13 +223,12 @@ class _MenuWidgetState extends State { //TODO onPressed: () { - - Navigator.push( - context, MaterialPageRoute(builder: (context) => PastEventListPage()), + context, + MaterialPageRoute( + builder: (context) => PastEventListPage()), ); - setState(() { isPressedPastEvent = true; }); @@ -214,13 +243,12 @@ class _MenuWidgetState extends State { ), Flexible( child: Center( - child: AutoSizeText( + child: AutoSizeText( "Past Events", style: TextStyle( - color: Styles.fontColor, + color: Styles.textColor, fontWeight: FontWeight.w400, - fontSize: 20 - ), + fontSize: 20), textAlign: TextAlign.center, ), ), @@ -285,10 +313,9 @@ class _MenuWidgetState extends State { child: AutoSizeText( "Send feedback", style: TextStyle( - color: Styles.fontColor, + color: Styles.textColor, fontWeight: FontWeight.w400, - fontSize: 20 - ), + fontSize: 20), textAlign: TextAlign.center, ), ), @@ -312,7 +339,7 @@ class _MenuWidgetState extends State { child: Align( alignment: Alignment.bottomLeft, child: FloatingActionButton( - backgroundColor: Colors.grey[800], + backgroundColor: Styles.subCardColor, onPressed: () { var googleSignMe = GoogleSignMeIn(); googleSignMe.logout(); @@ -322,7 +349,9 @@ class _MenuWidgetState extends State { ), ), ]), - )), - )); + ), + ], + ), + ))); } } diff --git a/lib/ui/app_feedback.dart b/lib/ui/app_feedback.dart index 99ab71e..7166522 100644 --- a/lib/ui/app_feedback.dart +++ b/lib/ui/app_feedback.dart @@ -1,6 +1,7 @@ import 'package:club_calendar/styles.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'MenuWidget.dart'; import 'package:flutter_neumorphic/flutter_neumorphic.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart'; @@ -15,11 +16,18 @@ class AppFeedback extends StatelessWidget { double deviceHeight = MediaQuery.of(context).size.height, deviceWidth = MediaQuery.of(context).size.width; - Styles styles = new Styles(); + Styles styles = new Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.white); + if (lit == true) { + var styles = Styles(Colors.white, Colors.black,Colors.black12,Colors.black12); + } //*************************************************************************************** return SingleChildScrollView( - child: Column( + child: + Container( + color: Styles.backgroundColor, + child: + Column( children: [ @@ -51,7 +59,6 @@ class AppFeedback extends StatelessWidget { padding: const EdgeInsets.only(top:10,), child: Column( children:[ - //Overall experience Padding( padding: const EdgeInsets.all(8.0), @@ -79,7 +86,7 @@ class AppFeedback extends StatelessWidget { Icons.star, color: Colors.amber, ), - unratedColor: Colors.white, + unratedColor: Styles.subCardColor, onRatingUpdate: (rating) { print("Overall Experience : ${rating}"); }, @@ -121,7 +128,7 @@ class AppFeedback extends StatelessWidget { Icons.star, color: Colors.amber, ), - unratedColor: Colors.white, + unratedColor: Styles.subCardColor, onRatingUpdate: (rating) { print("Event Details ${rating}"); }, @@ -171,7 +178,7 @@ class AppFeedback extends StatelessWidget { Icons.star, color: Colors.amber, ), - unratedColor: Colors.white, + unratedColor: Styles.subCardColor, onRatingUpdate: (rating) { print("Event announcements ${rating}"); }, @@ -186,6 +193,7 @@ class AppFeedback extends StatelessWidget { ), ) ] + ), ), @@ -301,7 +309,7 @@ class AppFeedback extends StatelessWidget { ], ), - ] + ]) ), ); diff --git a/lib/ui/app_feedback_page.dart b/lib/ui/app_feedback_page.dart index f5b6e53..987eecc 100644 --- a/lib/ui/app_feedback_page.dart +++ b/lib/ui/app_feedback_page.dart @@ -19,7 +19,7 @@ class _AppFeedBackPageState extends State { @override Widget build(BuildContext context) { - Styles styles = new Styles(); + Styles styles = new Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black38); return Scaffold( backgroundColor: Styles.backgroundColor, diff --git a/lib/ui/dialog_widget.dart b/lib/ui/dialog_widget.dart index 052cd98..030842a 100644 --- a/lib/ui/dialog_widget.dart +++ b/lib/ui/dialog_widget.dart @@ -12,7 +12,7 @@ class DialogScreen extends StatefulWidget { class _DialogScreenState extends State { @override - Styles styles = new Styles(); + Styles styles = new Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black38); Widget build(BuildContext context) { double deviceHeight = MediaQuery.of(context).size.height; diff --git a/lib/ui/event_details.dart b/lib/ui/event_details.dart index 513b40a..6a0aeed 100644 --- a/lib/ui/event_details.dart +++ b/lib/ui/event_details.dart @@ -6,7 +6,7 @@ import 'package:sliding_sheet/sliding_sheet.dart'; import '../styles.dart'; class EventDetailsPage extends StatelessWidget { static const String routeName = '\EventDetailsScreen'; - final styles = Styles(); + final styles = Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black38); final List> _iconsInfo = [ { 'iconData': Icons.calendar_today, diff --git a/lib/ui/event_list.dart b/lib/ui/event_list.dart index 6a7f1aa..e9a03cc 100644 --- a/lib/ui/event_list.dart +++ b/lib/ui/event_list.dart @@ -2,6 +2,7 @@ import 'package:club_calendar/styles.dart'; import 'package:flutter/material.dart'; import 'EventCard.dart'; import 'event_details.dart'; +import 'MenuWidget.dart'; class EventList extends StatefulWidget { const EventList({Key key}) : super(key: key); @@ -11,137 +12,139 @@ class EventList extends StatefulWidget { } class _EventListState extends State { - final styles=Styles(); @override Widget build(BuildContext context) { - return SingleChildScrollView( + // final styles = Styles.namedConstructor(); + final styles = Styles(Colors.grey.shade800, Colors.white,Colors.black12,Colors.black38); + if (lit == true) { + var styles = Styles(Colors.white, Colors.black,Colors.white60,Colors.white24); + } + return SingleChildScrollView( child: Container( color: Styles.backgroundColor, child: Padding( - padding: EdgeInsets.only(top: 10,bottom: 60), - + padding: EdgeInsets.only(top: 10, bottom: 60), child: Column( children: [ Container( - - child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - //For Month Container( - padding: EdgeInsets.only(left: 20,right:20,top: 10,bottom: 10), - - + padding: EdgeInsets.only( + left: 20, right: 20, top: 10, bottom: 10), decoration: BoxDecoration( - borderRadius: new BorderRadius.only(topRight: Radius.circular(100), bottomRight: Radius.circular(100)), + borderRadius: new BorderRadius.only( + topRight: Radius.circular(100), + bottomRight: Radius.circular(100)), color: Styles.buttonColor, - - - ), - child: Text("Month", - style: styles.headingStyle(), - - ), + child: Text( + "Month", + style: styles.headingStyle(), + ), ), Padding( - padding: EdgeInsets.only(left: 20,right:20,top: 10,bottom: 20), + padding: EdgeInsets.only( + left: 20, right: 20, top: 10, bottom: 20), child: Container( - child: Text("n Events", - style: styles.headingStyle(),), + child: Text( + "n Events", + style: styles.headingStyle(), + ), ), ), - - - ], - - ), - - GestureDetector( - onTap: (){ - Navigator.of(context).pushNamed(EventDetailsPage.routeName); + onTap: () { + Navigator.of(context) + .pushNamed(EventDetailsPage.routeName); print("Event Clicked!"); }, //TODO, - child: EventCard(date: '7',day: 'MON',name:'Event1',duration: 'x days')), + child: EventCard( + date: '7', + day: 'MON', + name: 'Event1', + duration: 'x days')), GestureDetector( - onTap: (){ - Navigator.of(context).pushNamed(EventDetailsPage.routeName); + onTap: () { + Navigator.of(context) + .pushNamed(EventDetailsPage.routeName); print("Event Clicked!"); }, //TODO, - child: EventCard(date: '7',day: 'MON',name:'Event1',duration: 'x days')), + child: EventCard( + date: '7', + day: 'MON', + name: 'Event1', + duration: 'x days')), ], - ), ), Container( - - child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - //For Month Container( - padding: EdgeInsets.only(left: 20,right:20,top: 10,bottom: 10), - - + padding: EdgeInsets.only( + left: 20, right: 20, top: 10, bottom: 10), decoration: BoxDecoration( - borderRadius: new BorderRadius.only(topRight: Radius.circular(100), bottomRight: Radius.circular(100)), + borderRadius: new BorderRadius.only( + topRight: Radius.circular(100), + bottomRight: Radius.circular(100)), color: Styles.buttonColor, - - - ), - child: Text("Month", + child: Text( + "Month", style: styles.headingStyle(), - ), ), Padding( - padding: EdgeInsets.only(left: 20,right:20,top: 10,bottom: 20), + padding: EdgeInsets.only( + left: 20, right: 20, top: 10, bottom: 20), child: Container( - child: Text("n Events", - style: styles.headingStyle(),), + child: Text( + "n Events", + style: styles.headingStyle(), + ), ), ), - - - ], - - ), - - GestureDetector( - onTap: (){ - Navigator.of(context).pushNamed(EventDetailsPage.routeName); + onTap: () { + Navigator.of(context) + .pushNamed(EventDetailsPage.routeName); print("Event Clicked!"); }, //TODO, - child: EventCard(date: '7',day: 'MON',name:'Event1',duration: 'x days')), + child: EventCard( + date: '7', + day: 'MON', + name: 'Event1', + duration: 'x days')), GestureDetector( - onTap: (){ - Navigator.of(context).pushNamed(EventDetailsPage.routeName); + onTap: () { + Navigator.of(context) + .pushNamed(EventDetailsPage.routeName); print("Event Clicked!"); }, //TODO, - child: EventCard(date: '7',day: 'MON',name:'Event1',duration: 'x days')), + child: EventCard( + date: '7', + day: 'MON', + name: 'Event1', + duration: 'x days')), ], - ), ), - ], ), ), @@ -149,4 +152,3 @@ class _EventListState extends State { ); } } - diff --git a/lib/ui/event_list_page.dart b/lib/ui/event_list_page.dart index bd3101b..d87d0f8 100644 --- a/lib/ui/event_list_page.dart +++ b/lib/ui/event_list_page.dart @@ -12,7 +12,7 @@ class EventListPage extends StatefulWidget { } class _EventListPageState extends State { - Styles styles =new Styles(); + Styles styles =new Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black38); @override Widget build(BuildContext context) { diff --git a/lib/ui/homePage(temporary).dart b/lib/ui/homePage(temporary).dart index c4f0fa3..4ecc665 100644 --- a/lib/ui/homePage(temporary).dart +++ b/lib/ui/homePage(temporary).dart @@ -50,7 +50,7 @@ class _MyHomePageState extends State { @override Widget build(BuildContext context) { - Styles styles = new Styles(); + Styles styles = new Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black38); return Scaffold( diff --git a/lib/ui/login_screen.dart b/lib/ui/login_screen.dart index d475646..7cdbfef 100644 --- a/lib/ui/login_screen.dart +++ b/lib/ui/login_screen.dart @@ -12,7 +12,7 @@ class LoginScreen extends StatefulWidget { class _LoginScreenState extends State { bool isPressed = false; - var styles = Styles(); + var styles = Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black38); @override Widget build(BuildContext context) { double deviceHeight = MediaQuery.of(context).size.height, diff --git a/lib/ui/past_event_details.dart b/lib/ui/past_event_details.dart index 1cf88aa..631ea27 100644 --- a/lib/ui/past_event_details.dart +++ b/lib/ui/past_event_details.dart @@ -8,7 +8,8 @@ import 'dialog_widget.dart'; import 'slider_widget.dart'; class PastEventDetailsPage extends StatelessWidget { - final styles = Styles(); + final styles = Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black38); + final List> _iconsInfo = [ { 'iconData': Icons.calendar_today, diff --git a/lib/ui/past_event_list.dart b/lib/ui/past_event_list.dart index 6ed3570..98468ce 100644 --- a/lib/ui/past_event_list.dart +++ b/lib/ui/past_event_list.dart @@ -1,6 +1,7 @@ import 'package:club_calendar/styles.dart'; import 'package:club_calendar/ui/past_event_details.dart'; import 'package:flutter/material.dart'; +import 'package:club_calendar/ui/MenuWidget.dart'; import 'EventCard.dart'; import 'event_details.dart'; import 'event_list.dart'; @@ -14,8 +15,10 @@ class PastEventList extends StatefulWidget { class _PastEventListState extends State { @override - Styles styles = new Styles(); Widget build(BuildContext context) { + Styles styles = new Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black38); + if(lit==true) + final styles=Styles(Colors.white,Colors.black,Colors.white60,Colors.white12); return SingleChildScrollView( child: Container( diff --git a/lib/ui/past_event_page.dart b/lib/ui/past_event_page.dart index 14dd2ae..e178111 100644 --- a/lib/ui/past_event_page.dart +++ b/lib/ui/past_event_page.dart @@ -12,7 +12,7 @@ class PastEventListPage extends StatefulWidget { } class _PastEventListPageState extends State { - Styles styles =new Styles(); + Styles styles =new Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black38); @override Widget build(BuildContext context) { diff --git a/lib/ui/slider_widget.dart b/lib/ui/slider_widget.dart index afe71c6..c229708 100644 --- a/lib/ui/slider_widget.dart +++ b/lib/ui/slider_widget.dart @@ -8,7 +8,7 @@ import 'dialog_widget.dart'; Widget slider(BuildContext context) { double deviceHeight = MediaQuery.of(context).size.height, deviceWidth = MediaQuery.of(context).size.width; - Styles styles= new Styles(); + Styles styles= new Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black38); return SlidingSheet( color: Styles.backgroundColor, @@ -20,7 +20,7 @@ Widget slider(BuildContext context) { positioning: SnapPositioning.pixelOffset, ), builder: (context, state) { - var styles = Styles(); + var styles = Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black38); List> _info = [ // {'image': 'assets/icons/speaker.png', 'info': '7 Sep'}, {'image': 'assets/icons/checklists2.png', 'info': 'None'}, diff --git a/lib/ui/slider_widget_present.dart b/lib/ui/slider_widget_present.dart index 1e34e75..be2b949 100644 --- a/lib/ui/slider_widget_present.dart +++ b/lib/ui/slider_widget_present.dart @@ -8,7 +8,7 @@ import 'dialog_widget.dart'; Widget sliderPresent(BuildContext context) { double deviceHeight = MediaQuery.of(context).size.height, deviceWidth = MediaQuery.of(context).size.width; - Styles styles= new Styles(); + Styles styles= new Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black38); return SlidingSheet( color: Styles.backgroundColor, @@ -20,7 +20,7 @@ Widget sliderPresent(BuildContext context) { positioning: SnapPositioning.pixelOffset, ), builder: (context, state) { - var styles = Styles(); + var styles = Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black38); List> _info = [ // {'image': 'assets/icons/speaker.png', 'info': '7 Sep'}, {'image': 'assets/icons/checklists2.png', 'info': 'None'}, diff --git a/pubspec.lock b/pubspec.lock index 845bc7b..97905ff 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,20 +1,6 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - url: "https://pub.dartlang.org" - source: hosted - version: "14.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - url: "https://pub.dartlang.org" - source: hosted - version: "0.41.2" archive: dependency: transitive description: @@ -35,7 +21,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.6.1" auto_size_text: dependency: "direct main" description: @@ -50,27 +36,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" - build: - dependency: transitive - description: - name: build - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.2" - built_collection: - dependency: transitive - description: - name: built_collection - url: "https://pub.dartlang.org" - source: hosted - version: "5.1.1" - built_value: - dependency: transitive - description: - name: built_value - url: "https://pub.dartlang.org" - source: hosted - version: "8.1.2" characters: dependency: transitive description: @@ -85,13 +50,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.0" - cli_util: - dependency: transitive - description: - name: cli_util - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.4" clock: dependency: transitive description: @@ -99,13 +57,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.0" - code_builder: - dependency: transitive - description: - name: code_builder - url: "https://pub.dartlang.org" - source: hosted - version: "3.7.0" collection: dependency: transitive description: @@ -134,13 +85,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.1.3" - dart_style: - dependency: transitive - description: - name: dart_style - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.12" fake_async: dependency: transitive description: @@ -225,13 +169,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "7.0.3" - fixnum: - dependency: transitive - description: - name: fixnum - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" flutter: dependency: "direct main" description: flutter @@ -275,13 +212,6 @@ packages: description: flutter source: sdk version: "0.0.0" - glob: - dependency: transitive - description: - name: glob - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" google_fonts: dependency: "direct main" description: @@ -352,13 +282,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.1.1" - logging: - dependency: transitive - description: - name: logging - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" matcher: dependency: transitive description: @@ -379,7 +302,7 @@ packages: name: mockito url: "https://pub.dartlang.org" source: hosted - version: "4.1.4" + version: "4.1.1+1" neumorphic: dependency: "direct main" description: @@ -387,13 +310,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.4.0" - package_config: - dependency: transitive - description: - name: package_config - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.3" path: dependency: transitive description: @@ -471,13 +387,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.2.3" - pub_semver: - dependency: transitive - description: - name: pub_semver - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" quiver: dependency: transitive description: @@ -511,20 +420,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.1" - source_gen: - dependency: transitive - description: - name: source_gen - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.10+3" source_span: dependency: transitive description: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" stack_trace: dependency: transitive description: @@ -559,7 +461,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.3.0" typed_data: dependency: transitive description: @@ -574,13 +476,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" - watcher: - dependency: transitive - description: - name: watcher - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" win32: dependency: transitive description: From d26b43d35a2e7db3e531a37e62e531a9c14893b4 Mon Sep 17 00:00:00 2001 From: marizvi <202051121@iiitvadodara.ac.in> Date: Sun, 31 Oct 2021 01:26:07 +0530 Subject: [PATCH 2/5] sync --- lib/main.dart | 6 +- lib/ui/event_feedback.dart | 0 lib/ui/{ => pages}/app_feedback_page.dart | 6 +- lib/ui/{ => pages}/event_list_page.dart | 6 +- lib/ui/{ => pages}/homePage(temporary).dart | 8 +- lib/ui/{ => pages}/login_screen.dart | 4 +- lib/ui/{ => pages}/past_event_page.dart | 10 +- lib/ui/{ => utils}/MenuWidget.dart | 15 +- lib/ui/{ => utils}/app_feedback.dart | 0 lib/ui/{ => utils}/dialog_widget.dart | 0 lib/ui/{ => utils}/event_creation.dart | 0 lib/ui/{ => utils}/event_details.dart | 4 +- lib/ui/{ => utils}/event_list.dart | 2 +- lib/ui/{ => utils}/past_event_details.dart | 4 +- lib/ui/{ => utils}/past_event_list.dart | 5 +- lib/ui/{ => widgets}/EventCard.dart | 0 lib/ui/widgets/MenuWidget.dart | 328 ++++++++++++++++++ lib/ui/widgets/page_scaffold_widget.dart | 53 +++ lib/ui/{ => widgets}/slider_widget.dart | 4 +- .../{ => widgets}/slider_widget_present.dart | 4 +- 20 files changed, 424 insertions(+), 35 deletions(-) delete mode 100644 lib/ui/event_feedback.dart rename lib/ui/{ => pages}/app_feedback_page.dart (92%) rename lib/ui/{ => pages}/event_list_page.dart (91%) rename lib/ui/{ => pages}/homePage(temporary).dart (91%) rename lib/ui/{ => pages}/login_screen.dart (98%) rename lib/ui/{ => pages}/past_event_page.dart (82%) rename lib/ui/{ => utils}/MenuWidget.dart (96%) rename lib/ui/{ => utils}/app_feedback.dart (100%) rename lib/ui/{ => utils}/dialog_widget.dart (100%) rename lib/ui/{ => utils}/event_creation.dart (100%) rename lib/ui/{ => utils}/event_details.dart (97%) rename lib/ui/{ => utils}/event_list.dart (99%) rename lib/ui/{ => utils}/past_event_details.dart (97%) rename lib/ui/{ => utils}/past_event_list.dart (97%) rename lib/ui/{ => widgets}/EventCard.dart (100%) create mode 100644 lib/ui/widgets/MenuWidget.dart create mode 100644 lib/ui/widgets/page_scaffold_widget.dart rename lib/ui/{ => widgets}/slider_widget.dart (99%) rename lib/ui/{ => widgets}/slider_widget_present.dart (98%) diff --git a/lib/main.dart b/lib/main.dart index 05876b1..2658c87 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -5,9 +5,9 @@ import 'package:flutter_neumorphic/flutter_neumorphic.dart'; import './util/cloud_messaging_handler.dart'; import './util/crashlytics_handler.dart'; -import './ui/login_screen.dart'; -import './ui/homePage(temporary).dart'; -import 'ui/event_details.dart'; +import 'ui/pages/login_screen.dart'; +import 'ui/pages/homePage(temporary).dart'; +import 'ui/utils/event_details.dart'; void main() { WidgetsFlutterBinding.ensureInitialized(); diff --git a/lib/ui/event_feedback.dart b/lib/ui/event_feedback.dart deleted file mode 100644 index e69de29..0000000 diff --git a/lib/ui/app_feedback_page.dart b/lib/ui/pages/app_feedback_page.dart similarity index 92% rename from lib/ui/app_feedback_page.dart rename to lib/ui/pages/app_feedback_page.dart index 987eecc..9bca0d0 100644 --- a/lib/ui/app_feedback_page.dart +++ b/lib/ui/pages/app_feedback_page.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import '../styles.dart'; -import 'MenuWidget.dart'; -import 'app_feedback.dart'; +import '../../styles.dart'; +import '../widgets/MenuWidget.dart'; +import '../utils/app_feedback.dart'; class AppFeedBackPage extends StatefulWidget { const AppFeedBackPage({Key key}) : super(key: key); diff --git a/lib/ui/event_list_page.dart b/lib/ui/pages/event_list_page.dart similarity index 91% rename from lib/ui/event_list_page.dart rename to lib/ui/pages/event_list_page.dart index d87d0f8..2315afe 100644 --- a/lib/ui/event_list_page.dart +++ b/lib/ui/pages/event_list_page.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import '../styles.dart'; -import 'MenuWidget.dart'; -import 'event_list.dart'; +import '../../styles.dart'; +import '../widgets/MenuWidget.dart'; +import '../utils/event_list.dart'; class EventListPage extends StatefulWidget { const EventListPage({Key key}) : super(key: key); diff --git a/lib/ui/homePage(temporary).dart b/lib/ui/pages/homePage(temporary).dart similarity index 91% rename from lib/ui/homePage(temporary).dart rename to lib/ui/pages/homePage(temporary).dart index 4ecc665..4b8b89d 100644 --- a/lib/ui/homePage(temporary).dart +++ b/lib/ui/pages/homePage(temporary).dart @@ -1,11 +1,11 @@ //this is temporary homepage till the th erequired homepage is made. //this is made for the checking whether the login page is siigning correctly import 'package:club_calendar/styles.dart'; -import 'package:club_calendar/ui/event_list.dart'; -import 'package:club_calendar/ui/past_event_list.dart'; +import 'package:club_calendar/ui/utils/event_list.dart'; +import 'package:club_calendar/ui/utils/past_event_list.dart'; import 'package:flutter/material.dart'; -import 'MenuWidget.dart'; -import 'app_feedback.dart'; +import '../widgets/MenuWidget.dart'; +import '../utils/app_feedback.dart'; import 'event_list_page.dart'; diff --git a/lib/ui/login_screen.dart b/lib/ui/pages/login_screen.dart similarity index 98% rename from lib/ui/login_screen.dart rename to lib/ui/pages/login_screen.dart index 7cdbfef..1b052da 100644 --- a/lib/ui/login_screen.dart +++ b/lib/ui/pages/login_screen.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_neumorphic/flutter_neumorphic.dart' as neu; -import '../styles.dart'; -import '../util/google_sign_in.dart'; +import '../../styles.dart'; +import '../../util/google_sign_in.dart'; class LoginScreen extends StatefulWidget { static const routeName = "/loginScreen"; diff --git a/lib/ui/past_event_page.dart b/lib/ui/pages/past_event_page.dart similarity index 82% rename from lib/ui/past_event_page.dart rename to lib/ui/pages/past_event_page.dart index e178111..b01fd1a 100644 --- a/lib/ui/past_event_page.dart +++ b/lib/ui/pages/past_event_page.dart @@ -1,7 +1,9 @@ -import 'package:club_calendar/ui/past_event_list.dart'; +import 'package:club_calendar/ui/utils/past_event_list.dart'; +import 'package:club_calendar/ui/widgets/page_scaffold_widget.dart'; import 'package:flutter/material.dart'; -import '../styles.dart'; -import 'MenuWidget.dart'; +import '../../styles.dart'; +import '../widgets/MenuWidget.dart'; + class PastEventListPage extends StatefulWidget { @@ -45,7 +47,7 @@ class _PastEventListPageState extends State { ), drawer: MenuWidget(), - body: PastEventList() + body:PastEventList() ); diff --git a/lib/ui/MenuWidget.dart b/lib/ui/utils/MenuWidget.dart similarity index 96% rename from lib/ui/MenuWidget.dart rename to lib/ui/utils/MenuWidget.dart index da2fa1b..409a49b 100644 --- a/lib/ui/MenuWidget.dart +++ b/lib/ui/utils/MenuWidget.dart @@ -1,17 +1,24 @@ -import 'package:club_calendar/ui/homePage(temporary).dart'; -import 'package:club_calendar/ui/past_event_page.dart'; +import 'package:club_calendar/ui/pages/homePage(temporary).dart'; +import 'package:club_calendar/ui/pages/past_event_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_neumorphic/flutter_neumorphic.dart' as neu; import 'package:flutter_neumorphic/flutter_neumorphic.dart'; -import '../styles.dart'; -import '../util/google_sign_in.dart'; +import '../../styles.dart'; +import '../../util/google_sign_in.dart'; import 'package:sliding_switch/sliding_switch.dart'; import 'package:auto_size_text/auto_size_text.dart'; +<<<<<<< HEAD:lib/ui/MenuWidget.dart import 'event_list.dart'; import 'app_feedback_page.dart'; import 'event_details.dart'; import 'event_list.dart'; import 'event_list_page.dart'; +======= + +import '../pages/app_feedback_page.dart'; +import 'event_details.dart'; +import '../pages/event_list_page.dart'; +>>>>>>> 61cd5ac99555326df304af417ef7719d406325a8:lib/ui/utils/MenuWidget.dart //Drawer Code class MenuWidget extends StatefulWidget { diff --git a/lib/ui/app_feedback.dart b/lib/ui/utils/app_feedback.dart similarity index 100% rename from lib/ui/app_feedback.dart rename to lib/ui/utils/app_feedback.dart diff --git a/lib/ui/dialog_widget.dart b/lib/ui/utils/dialog_widget.dart similarity index 100% rename from lib/ui/dialog_widget.dart rename to lib/ui/utils/dialog_widget.dart diff --git a/lib/ui/event_creation.dart b/lib/ui/utils/event_creation.dart similarity index 100% rename from lib/ui/event_creation.dart rename to lib/ui/utils/event_creation.dart diff --git a/lib/ui/event_details.dart b/lib/ui/utils/event_details.dart similarity index 97% rename from lib/ui/event_details.dart rename to lib/ui/utils/event_details.dart index 6a0aeed..5df66fb 100644 --- a/lib/ui/event_details.dart +++ b/lib/ui/utils/event_details.dart @@ -1,9 +1,9 @@ -import 'package:club_calendar/ui/slider_widget_present.dart'; +import 'package:club_calendar/ui/widgets/slider_widget_present.dart'; import 'package:flutter/material.dart'; import 'package:flutter_neumorphic/flutter_neumorphic.dart' as neu; import 'package:sliding_sheet/sliding_sheet.dart'; -import '../styles.dart'; +import '../../styles.dart'; class EventDetailsPage extends StatelessWidget { static const String routeName = '\EventDetailsScreen'; final styles = Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black38); diff --git a/lib/ui/event_list.dart b/lib/ui/utils/event_list.dart similarity index 99% rename from lib/ui/event_list.dart rename to lib/ui/utils/event_list.dart index e9a03cc..5215d1f 100644 --- a/lib/ui/event_list.dart +++ b/lib/ui/utils/event_list.dart @@ -1,6 +1,6 @@ import 'package:club_calendar/styles.dart'; import 'package:flutter/material.dart'; -import 'EventCard.dart'; +import '../widgets/EventCard.dart'; import 'event_details.dart'; import 'MenuWidget.dart'; diff --git a/lib/ui/past_event_details.dart b/lib/ui/utils/past_event_details.dart similarity index 97% rename from lib/ui/past_event_details.dart rename to lib/ui/utils/past_event_details.dart index 631ea27..fff7d4b 100644 --- a/lib/ui/past_event_details.dart +++ b/lib/ui/utils/past_event_details.dart @@ -3,9 +3,9 @@ import 'package:flutter/material.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart'; import 'package:sliding_sheet/sliding_sheet.dart'; -import '../styles.dart'; +import '../../styles.dart'; import 'dialog_widget.dart'; -import 'slider_widget.dart'; +import '../widgets/slider_widget.dart'; class PastEventDetailsPage extends StatelessWidget { final styles = Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black38); diff --git a/lib/ui/past_event_list.dart b/lib/ui/utils/past_event_list.dart similarity index 97% rename from lib/ui/past_event_list.dart rename to lib/ui/utils/past_event_list.dart index 98468ce..2cc9769 100644 --- a/lib/ui/past_event_list.dart +++ b/lib/ui/utils/past_event_list.dart @@ -1,9 +1,8 @@ import 'package:club_calendar/styles.dart'; -import 'package:club_calendar/ui/past_event_details.dart'; +import 'package:club_calendar/ui/utils/past_event_details.dart'; import 'package:flutter/material.dart'; import 'package:club_calendar/ui/MenuWidget.dart'; -import 'EventCard.dart'; -import 'event_details.dart'; +import '../widgets/EventCard.dart'; import 'event_list.dart'; class PastEventList extends StatefulWidget { diff --git a/lib/ui/EventCard.dart b/lib/ui/widgets/EventCard.dart similarity index 100% rename from lib/ui/EventCard.dart rename to lib/ui/widgets/EventCard.dart diff --git a/lib/ui/widgets/MenuWidget.dart b/lib/ui/widgets/MenuWidget.dart new file mode 100644 index 0000000..975b89f --- /dev/null +++ b/lib/ui/widgets/MenuWidget.dart @@ -0,0 +1,328 @@ +import 'package:club_calendar/ui/pages/homePage(temporary).dart'; +import 'package:club_calendar/ui/pages/past_event_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_neumorphic/flutter_neumorphic.dart' as neu; +import 'package:flutter_neumorphic/flutter_neumorphic.dart'; +import '../../styles.dart'; +import '../../util/google_sign_in.dart'; +import 'package:sliding_switch/sliding_switch.dart'; +import 'package:auto_size_text/auto_size_text.dart'; + +import '../pages/app_feedback_page.dart'; +import '../utils/event_details.dart'; +import '../pages/event_list_page.dart'; + +//Drawer Code +bool lit = false; + +class MenuWidget extends StatefulWidget { + const MenuWidget({Key key}) : super(key: key); + + @override + _MenuWidgetState createState() => _MenuWidgetState(); +} + +class _MenuWidgetState extends State { + @override + Widget build(BuildContext context) { + //bool variable to keep in touch of events when button pressed + + bool isPressedEvent = false; + bool isPressedPastEvent = false; + bool isPressedFeedBack = false; + + final styles = Styles( + Colors.grey.shade800, Colors.white, Colors.black12, Colors.black); + if (lit == true) + final styles = + Styles(Colors.white, Colors.black, Colors.white60, Colors.white); + double deviceHeight = MediaQuery.of(context).size.height, + deviceWidth = MediaQuery.of(context).size.width; + + //********************************************************************************************** + + return Drawer( + child: SingleChildScrollView( + child: Container( + width: deviceWidth, + color: Styles.backgroundColor, + child: Container( + height: deviceHeight, + child: ListView(children: [ + //Image + + Padding( + padding: const EdgeInsets.all(25), + child: Container( + width: deviceWidth * 0.2, + height: deviceHeight * 0.2, + child: Image.asset( + "assets/icons/CC-Logo(1).png", + scale: 1.3, + ), + ), + ), + + //********************************************************************************************** + + //Slider + Padding( + padding: const EdgeInsets.only( + top: 20, bottom: 50, left: 10, right: 10), + child: SizedBox( + height: deviceHeight * 0.06399636, + width: deviceWidth * 0.8, + child: SlidingSwitch( + value: false, + width: deviceWidth * 0.731, //check adaptability + onChanged: (bool value) { + print(value); + }, + height: 55, + animationDuration: const Duration(milliseconds: 400), + onTap: () {}, + onDoubleTap: () {}, + onSwipe: () {}, + textOff: "Dark", + textOn: "Light", + colorOn: Colors.white, + colorOff: const Color(0xff6682c0), + background: Colors.black38, + buttonColor: Colors.black, + inactiveColor: const Color(0xff636f7b), + ), + ), + ), + + //********************************************************************************************** + + //Event + Padding( + //Check adaptability + padding: const EdgeInsets.only( + top: 10, bottom: 10, left: 10, right: 10), + child: Container( + alignment: Alignment.bottomCenter, + height: deviceHeight * 0.07399636, + width: deviceWidth * 0.79, + child: neu.NeumorphicButton( + style: neu.NeumorphicStyle( + shadowLightColorEmboss: Styles.backgroundColor, + shadowLightColor: Styles.backgroundColor, + boxShape: neu.NeumorphicBoxShape.roundRect( + BorderRadius.circular( + MediaQuery.of(context).size.height * 0.0387820513), + ), + color: !isPressedEvent + ? Styles.backgroundColor + : Colors.black12, + + shape: neu.NeumorphicShape.flat, + + depth: isPressedEvent + ? -4.9687 + : 4.9687, //MediaQuery.of(context).size.height*0.023, + ), + + //TODO + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => EventListPage()), + ); + + setState(() { + isPressedEvent = true; + }); + }, + child: Container( + height: deviceHeight * 0.06599636, + width: deviceWidth * 0.76, + child: Row( + children: [ + Container( + padding: EdgeInsets.only(left: deviceWidth * 0.011), + ), + Flexible( + child: Center( + child: AutoSizeText( + "Events", + style: TextStyle( + color: Styles.fontColor, + fontSize: 20, + fontWeight: FontWeight.w400), + textAlign: TextAlign.center, + ), + ), + ), + ], + ), + ), + ), + ), + ), + + //********************************************************************************************** + + //Past Events + Padding( + //Check adaptability + padding: const EdgeInsets.only( + top: 10, bottom: 10, left: 10, right: 10), + child: Container( + alignment: Alignment.bottomCenter, + height: deviceHeight * 0.07399636, + width: deviceWidth * 0.79, + child: neu.NeumorphicButton( + style: neu.NeumorphicStyle( + shadowLightColorEmboss: Styles.backgroundColor, + shadowLightColor: Styles.backgroundColor, + boxShape: neu.NeumorphicBoxShape.roundRect( + BorderRadius.circular( + MediaQuery.of(context).size.height * 0.0387820513), + ), + color: !isPressedPastEvent + ? Styles.backgroundColor + : Colors.black12, + intensity: 1, + shape: neu.NeumorphicShape.flat, + + depth: isPressedPastEvent + ? -4.9687 + : 4.9687, //MediaQuery.of(context).size.height*0.023, + oppositeShadowLightSource: false, + ), + + //TODO + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => PastEventListPage()), + ); + + setState(() { + isPressedPastEvent = true; + }); + }, + child: Container( + height: deviceHeight * 0.06599636, + width: deviceWidth * 0.76, + child: Row( + children: [ + Container( + padding: EdgeInsets.only(left: deviceWidth * 0.011), + ), + Flexible( + child: Center( + child: AutoSizeText( + "Past Events", + style: TextStyle( + color: Styles.fontColor, + fontWeight: FontWeight.w400, + fontSize: 20), + textAlign: TextAlign.center, + ), + ), + ), + ], + ), + ), + ), + ), + ), + + //********************************************************************************************** + + //Send Feedback + Padding( + padding: const EdgeInsets.only( + top: 10, bottom: 10, left: 10, right: 10), + child: Container( + alignment: Alignment.bottomCenter, + height: deviceHeight * 0.07399636, + width: deviceWidth * 0.79, + child: neu.NeumorphicButton( + style: neu.NeumorphicStyle( + shadowLightColorEmboss: Styles.backgroundColor, + shadowLightColor: Styles.backgroundColor, + boxShape: neu.NeumorphicBoxShape.roundRect( + BorderRadius.circular( + MediaQuery.of(context).size.height * 0.0387820513), + ), + color: !isPressedFeedBack + ? Styles.backgroundColor + : Colors.black12, + intensity: 1, + shape: neu.NeumorphicShape.flat, + + depth: isPressedFeedBack + ? -4.9687 + : 4.9687, //MediaQuery.of(context).size.height*0.023, + oppositeShadowLightSource: false, + ), + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => AppFeedBackPage()), + ); + + setState(() { + isPressedFeedBack = true; + }); + }, + child: Container( + height: deviceHeight * 0.06599636, + width: deviceWidth * 0.76, + child: Row( + children: [ + Container( + padding: EdgeInsets.only(left: deviceWidth * 0.011), + ), + Flexible( + child: Center( + child: AutoSizeText( + "Send feedback", + style: TextStyle( + color: Styles.fontColor, + fontWeight: FontWeight.w400, + fontSize: 20), + textAlign: TextAlign.center, + ), + ), + ), + ], + ), + ), + ), + ), + ), + + //********************************************************************************************** + + SizedBox( + height: deviceHeight * 0.07, + ), + + //Signout Button + Padding( + padding: const EdgeInsets.all(20), + child: Align( + alignment: Alignment.bottomLeft, + child: FloatingActionButton( + backgroundColor: Colors.grey[800], + onPressed: () { + var googleSignMe = GoogleSignMeIn(); + googleSignMe.logout(); + }, + child: Icon(Icons.logout), + ), + ), + ), + ]), + )), + )); + } +} diff --git a/lib/ui/widgets/page_scaffold_widget.dart b/lib/ui/widgets/page_scaffold_widget.dart new file mode 100644 index 0000000..48a3545 --- /dev/null +++ b/lib/ui/widgets/page_scaffold_widget.dart @@ -0,0 +1,53 @@ +import 'package:club_calendar/styles.dart'; +import 'package:flutter/material.dart'; +import 'MenuWidget.dart'; + +class PageScaffold extends StatefulWidget { + final Widget body; + + PageScaffold({this.body}); + + + @override + _PageScaffoldState createState() => _PageScaffoldState(); +} + +class _PageScaffoldState extends State { + @override + Widget build(BuildContext context) { + final styles=Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black); +if(lit==true) + final styles=Styles(Colors.white,Colors.black,Colors.white60,Colors.white); + return Scaffold( + appBar:AppBar( + + backgroundColor: Styles.backgroundColor, + elevation: 0.0, + + automaticallyImplyLeading: false, + title: Row( + children: [ + Builder( + + builder: (context) => IconButton( + icon: Icon(Icons.menu), + + onPressed: (){ + Scaffold.of(context).openDrawer(); + } + + ), + ), + Text("CLUB CALENDAR", + style: styles.headingStyle(),) + + + ], + ), + + ), + drawer: MenuWidget(), + body: widget.body + ); + } +} diff --git a/lib/ui/slider_widget.dart b/lib/ui/widgets/slider_widget.dart similarity index 99% rename from lib/ui/slider_widget.dart rename to lib/ui/widgets/slider_widget.dart index c229708..1a59ba5 100644 --- a/lib/ui/slider_widget.dart +++ b/lib/ui/widgets/slider_widget.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart'; import 'package:sliding_sheet/sliding_sheet.dart'; import 'package:flutter_neumorphic/flutter_neumorphic.dart' as neu; -import '../styles.dart'; -import 'dialog_widget.dart'; +import '../../styles.dart'; +import '../utils/dialog_widget.dart'; Widget slider(BuildContext context) { double deviceHeight = MediaQuery.of(context).size.height, diff --git a/lib/ui/slider_widget_present.dart b/lib/ui/widgets/slider_widget_present.dart similarity index 98% rename from lib/ui/slider_widget_present.dart rename to lib/ui/widgets/slider_widget_present.dart index be2b949..8a3ddd1 100644 --- a/lib/ui/slider_widget_present.dart +++ b/lib/ui/widgets/slider_widget_present.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart'; import 'package:sliding_sheet/sliding_sheet.dart'; import 'package:flutter_neumorphic/flutter_neumorphic.dart' as neu; -import '../styles.dart'; -import 'dialog_widget.dart'; +import '../../styles.dart'; +import '../utils/dialog_widget.dart'; Widget sliderPresent(BuildContext context) { double deviceHeight = MediaQuery.of(context).size.height, From 9e9535f16609a6981e181bfb7843f42012360f95 Mon Sep 17 00:00:00 2001 From: marizvi <202051121@iiitvadodara.ac.in> Date: Sun, 31 Oct 2021 01:37:20 +0530 Subject: [PATCH 3/5] check --- lib/ui/utils/MenuWidget.dart | 13 ++++--------- lib/ui/utils/past_event_list.dart | 2 +- lib/ui/widgets/EventCard.dart | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/ui/utils/MenuWidget.dart b/lib/ui/utils/MenuWidget.dart index 409a49b..f9e8c08 100644 --- a/lib/ui/utils/MenuWidget.dart +++ b/lib/ui/utils/MenuWidget.dart @@ -7,18 +7,13 @@ import '../../styles.dart'; import '../../util/google_sign_in.dart'; import 'package:sliding_switch/sliding_switch.dart'; import 'package:auto_size_text/auto_size_text.dart'; -<<<<<<< HEAD:lib/ui/MenuWidget.dart +import '../pages/event_list_page.dart'; +import '../pages/app_feedback_page.dart'; import 'event_list.dart'; -import 'app_feedback_page.dart'; +import 'app_feedback.dart'; import 'event_details.dart'; import 'event_list.dart'; -import 'event_list_page.dart'; -======= - -import '../pages/app_feedback_page.dart'; -import 'event_details.dart'; -import '../pages/event_list_page.dart'; ->>>>>>> 61cd5ac99555326df304af417ef7719d406325a8:lib/ui/utils/MenuWidget.dart +import 'event_list.dart'; //Drawer Code class MenuWidget extends StatefulWidget { diff --git a/lib/ui/utils/past_event_list.dart b/lib/ui/utils/past_event_list.dart index 2cc9769..61af9a2 100644 --- a/lib/ui/utils/past_event_list.dart +++ b/lib/ui/utils/past_event_list.dart @@ -1,7 +1,7 @@ import 'package:club_calendar/styles.dart'; import 'package:club_calendar/ui/utils/past_event_details.dart'; import 'package:flutter/material.dart'; -import 'package:club_calendar/ui/MenuWidget.dart'; +import 'MenuWidget.dart'; import '../widgets/EventCard.dart'; import 'event_list.dart'; diff --git a/lib/ui/widgets/EventCard.dart b/lib/ui/widgets/EventCard.dart index 8370016..4ad8e6e 100644 --- a/lib/ui/widgets/EventCard.dart +++ b/lib/ui/widgets/EventCard.dart @@ -1,6 +1,6 @@ import 'package:club_calendar/styles.dart'; -import 'package:club_calendar/ui/MenuWidget.dart'; import 'package:flutter/material.dart'; +import 'MenuWidget.dart'; class EventCard extends StatefulWidget { From 67c6ec56debc278d255a592d856e7a727a2b3fef Mon Sep 17 00:00:00 2001 From: marizvi <202051121@iiitvadodara.ac.in> Date: Sun, 31 Oct 2021 01:45:38 +0530 Subject: [PATCH 4/5] ligh theme added --- lib/ui/utils/MenuWidget.dart | 2 +- lib/ui/utils/app_feedback.dart | 2 +- lib/ui/utils/event_list.dart | 2 +- lib/ui/utils/past_event_list.dart | 2 +- lib/ui/widgets/MenuWidget.dart | 127 +++++++++++++++++++----------- 5 files changed, 83 insertions(+), 52 deletions(-) diff --git a/lib/ui/utils/MenuWidget.dart b/lib/ui/utils/MenuWidget.dart index f9e8c08..68d9b52 100644 --- a/lib/ui/utils/MenuWidget.dart +++ b/lib/ui/utils/MenuWidget.dart @@ -51,7 +51,7 @@ class _MenuWidgetState extends State { child: Column( children: [ SizedBox( - height: 40, + height: 80, ), Column( children:[ diff --git a/lib/ui/utils/app_feedback.dart b/lib/ui/utils/app_feedback.dart index 7166522..05c2d48 100644 --- a/lib/ui/utils/app_feedback.dart +++ b/lib/ui/utils/app_feedback.dart @@ -1,7 +1,7 @@ import 'package:club_calendar/styles.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'MenuWidget.dart'; +import '../widgets/MenuWidget.dart'; import 'package:flutter_neumorphic/flutter_neumorphic.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart'; diff --git a/lib/ui/utils/event_list.dart b/lib/ui/utils/event_list.dart index 5215d1f..e22198d 100644 --- a/lib/ui/utils/event_list.dart +++ b/lib/ui/utils/event_list.dart @@ -2,7 +2,7 @@ import 'package:club_calendar/styles.dart'; import 'package:flutter/material.dart'; import '../widgets/EventCard.dart'; import 'event_details.dart'; -import 'MenuWidget.dart'; +import '../widgets/MenuWidget.dart'; class EventList extends StatefulWidget { const EventList({Key key}) : super(key: key); diff --git a/lib/ui/utils/past_event_list.dart b/lib/ui/utils/past_event_list.dart index 61af9a2..c839734 100644 --- a/lib/ui/utils/past_event_list.dart +++ b/lib/ui/utils/past_event_list.dart @@ -1,7 +1,7 @@ import 'package:club_calendar/styles.dart'; import 'package:club_calendar/ui/utils/past_event_details.dart'; import 'package:flutter/material.dart'; -import 'MenuWidget.dart'; +import '../widgets/MenuWidget.dart'; import '../widgets/EventCard.dart'; import 'event_list.dart'; diff --git a/lib/ui/widgets/MenuWidget.dart b/lib/ui/widgets/MenuWidget.dart index 975b89f..a5c7a43 100644 --- a/lib/ui/widgets/MenuWidget.dart +++ b/lib/ui/widgets/MenuWidget.dart @@ -7,14 +7,15 @@ import '../../styles.dart'; import '../../util/google_sign_in.dart'; import 'package:sliding_switch/sliding_switch.dart'; import 'package:auto_size_text/auto_size_text.dart'; - +import '../pages/event_list_page.dart'; import '../pages/app_feedback_page.dart'; +import '../utils/event_list.dart'; +import '../utils/app_feedback.dart'; import '../utils/event_details.dart'; -import '../pages/event_list_page.dart'; +import '../utils/event_list.dart'; +import '../utils/event_list.dart'; //Drawer Code -bool lit = false; - class MenuWidget extends StatefulWidget { const MenuWidget({Key key}) : super(key: key); @@ -22,6 +23,8 @@ class MenuWidget extends StatefulWidget { _MenuWidgetState createState() => _MenuWidgetState(); } +bool lit = false; + class _MenuWidgetState extends State { @override Widget build(BuildContext context) { @@ -31,26 +34,48 @@ class _MenuWidgetState extends State { bool isPressedPastEvent = false; bool isPressedFeedBack = false; - final styles = Styles( - Colors.grey.shade800, Colors.white, Colors.black12, Colors.black); - if (lit == true) - final styles = - Styles(Colors.white, Colors.black, Colors.white60, Colors.white); + var styles = Styles(Colors.grey.shade800, Colors.white,Colors.black12,Colors.white12); + if (lit == true) { + var styles = Styles(Colors.white, Colors.black,Colors.white60,Colors.white60); + } + double deviceHeight = MediaQuery.of(context).size.height, deviceWidth = MediaQuery.of(context).size.width; //********************************************************************************************** - return Drawer( child: SingleChildScrollView( - child: Container( - width: deviceWidth, - color: Styles.backgroundColor, - child: Container( + child: Container( + width: deviceWidth, + color: Styles.backgroundColor, + child: Column( + children: [ + SizedBox( + height: 40, + ), + Column( + children:[ + Text("Dark-Light", + style: TextStyle(color: Styles.fontColor), + ), + Switch( + value: lit, + onChanged: (val) { + setState(() { + lit = val; + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => EventListPage()), + ); + }); + }), + ]), + Container( height: deviceHeight, child: ListView(children: [ + //Image - Padding( padding: const EdgeInsets.all(25), child: Container( @@ -64,35 +89,39 @@ class _MenuWidgetState extends State { ), //********************************************************************************************** + SizedBox( + width:10, + height: 40, + ), //Slider - Padding( - padding: const EdgeInsets.only( - top: 20, bottom: 50, left: 10, right: 10), - child: SizedBox( - height: deviceHeight * 0.06399636, - width: deviceWidth * 0.8, - child: SlidingSwitch( - value: false, - width: deviceWidth * 0.731, //check adaptability - onChanged: (bool value) { - print(value); - }, - height: 55, - animationDuration: const Duration(milliseconds: 400), - onTap: () {}, - onDoubleTap: () {}, - onSwipe: () {}, - textOff: "Dark", - textOn: "Light", - colorOn: Colors.white, - colorOff: const Color(0xff6682c0), - background: Colors.black38, - buttonColor: Colors.black, - inactiveColor: const Color(0xff636f7b), - ), - ), - ), + // Padding( + // padding: const EdgeInsets.only( + // top: 20, bottom: 50, left: 10, right: 10), + // child: SizedBox( + // height: deviceHeight * 0.06399636, + // width: deviceWidth * 0.8, + // child: SlidingSwitch( + // value: false, + // width: deviceWidth * 0.731, //check adaptability + // onChanged: (bool value) { + // print(value); + // }, + // height: 55, + // animationDuration: const Duration(milliseconds: 400), + // onTap: () {}, + // onDoubleTap: () {}, + // onSwipe: () {}, + // textOff: "Dark", + // textOn: "Light", + // colorOn: Colors.white, + // colorOff: const Color(0xff6682c0), + // background: Colors.black38, + // buttonColor: Colors.black, + // inactiveColor: const Color(0xff636f7b), + // ), + // ), + // ), //********************************************************************************************** @@ -149,7 +178,7 @@ class _MenuWidgetState extends State { child: AutoSizeText( "Events", style: TextStyle( - color: Styles.fontColor, + color: Styles.textColor, fontSize: 20, fontWeight: FontWeight.w400), textAlign: TextAlign.center, @@ -219,7 +248,7 @@ class _MenuWidgetState extends State { child: AutoSizeText( "Past Events", style: TextStyle( - color: Styles.fontColor, + color: Styles.textColor, fontWeight: FontWeight.w400, fontSize: 20), textAlign: TextAlign.center, @@ -286,7 +315,7 @@ class _MenuWidgetState extends State { child: AutoSizeText( "Send feedback", style: TextStyle( - color: Styles.fontColor, + color: Styles.textColor, fontWeight: FontWeight.w400, fontSize: 20), textAlign: TextAlign.center, @@ -312,7 +341,7 @@ class _MenuWidgetState extends State { child: Align( alignment: Alignment.bottomLeft, child: FloatingActionButton( - backgroundColor: Colors.grey[800], + backgroundColor: Styles.subCardColor, onPressed: () { var googleSignMe = GoogleSignMeIn(); googleSignMe.logout(); @@ -322,7 +351,9 @@ class _MenuWidgetState extends State { ), ), ]), - )), - )); + ), + ], + ), + ))); } } From 7709c724ed3b7d8c4449c5b1c9045df845b37dd4 Mon Sep 17 00:00:00 2001 From: marizvi <202051121@iiitvadodara.ac.in> Date: Sun, 31 Oct 2021 01:49:20 +0530 Subject: [PATCH 5/5] ligh theme added --- lib/ui/utils/past_event_list.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ui/utils/past_event_list.dart b/lib/ui/utils/past_event_list.dart index c839734..dbc6a2a 100644 --- a/lib/ui/utils/past_event_list.dart +++ b/lib/ui/utils/past_event_list.dart @@ -16,6 +16,7 @@ class _PastEventListState extends State { @override Widget build(BuildContext context) { Styles styles = new Styles(Colors.grey.shade800,Colors.white,Colors.black12,Colors.black38); + if(lit==true) final styles=Styles(Colors.white,Colors.black,Colors.white60,Colors.white12); return SingleChildScrollView(