diff --git a/lib/screens/contact_us_screen.dart b/lib/screens/contact_us_screen.dart index be99953f76..180da8584f 100644 --- a/lib/screens/contact_us_screen.dart +++ b/lib/screens/contact_us_screen.dart @@ -1,4 +1,9 @@ import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; +import 'package:provider/provider.dart'; + +import '../models/users.dart'; +import '../services/user_info_services.dart'; class ContactUsScreen extends StatefulWidget { @override @@ -11,45 +16,83 @@ class _ContactUsScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - title: Text('Contact Us'), - ), - body: Padding( - padding: EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Text( - 'Ask a Question', - style: TextStyle( - fontSize: 18.0, - fontWeight: FontWeight.bold, - ), - ), - SizedBox(height: 16.0), - Text(question), - SizedBox(height: 8.0), - TextFormField( - onChanged: (value) { - setState(() { - question = value; - }); - }, - decoration: InputDecoration( - labelText: 'Your Question', - border: OutlineInputBorder(), - ), - maxLines: 3, - ), - SizedBox(height: 16.0), - ElevatedButton( - child: Text('Send'), - onPressed: () { - // Send the question to your support team - // Implement your logic here - }, - ), - ], + appBar: AppBar(elevation: 0,backgroundColor: Colors.transparent, + + centerTitle: true,), + backgroundColor: Theme.of(context).colorScheme.background.withOpacity(0.8), + + body: SingleChildScrollView( + physics: AlwaysScrollableScrollPhysics(parent: BouncingScrollPhysics()), + child: Consumer( + builder: (context, userInfo, _) { + Users _user; + if (userInfo.hasData) _user = userInfo.user!; + return Stack( + alignment: Alignment.center, + children: [ + Column( + children: [ + SizedBox(height: 30,), + Text( + "Contact Us", + style: TextStyle( + color: Colors.white, + fontSize: 30.0, + fontWeight: FontWeight.bold, + ),), + SizedBox(height: 0.12 * MediaQuery.of(context).size.height), + Container( + margin: EdgeInsets.fromLTRB(15, 15, 15, 60), + padding: EdgeInsets.all(30), + decoration: BoxDecoration( + color: Theme.of(context).primaryColor, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(40), + topRight: Radius.circular(40), + ), + ), + width: double.infinity, + child: + + SizedBox(height: MediaQuery.of(context).size.height ,width: MediaQuery.of(context).size.width,child:Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Text( + 'Ask a Question', + style: TextStyle( + fontSize: 18.0, + fontWeight: FontWeight.bold, + color: Colors.white + ), + ), + SizedBox(height: 16.0), + Text(question, style: TextStyle(color: Colors.white),), + SizedBox(height: 8.0), + TextFormField( + onChanged: (value) { + setState(() { + question = value; + }); + }, + decoration: InputDecoration( + labelText: 'Your Question', + border: OutlineInputBorder(), + labelStyle: TextStyle(color: Theme.of(context).primaryColorDark) + + ), + maxLines: 3, + ), + SizedBox(height: 16.0), + ElevatedButton( + child: Text('Send'), + onPressed: () { + DateTime now = DateTime.now(); + String formattedDate = DateFormat('kk:mm:ss \n EEE d MMM').format(now); + // Send the question to your support team + // Implement your logic here + }, + ),])))])]); + }, ), ), ); diff --git a/lib/screens/faqs_screen.dart b/lib/screens/faqs_screen.dart index aef66af2df..0781ca66ea 100644 --- a/lib/screens/faqs_screen.dart +++ b/lib/screens/faqs_screen.dart @@ -1,35 +1,77 @@ import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../models/users.dart'; +import '../services/user_info_services.dart'; class FAQScreen extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - title: Text('FAQ'), - ), - body: ListView( - children: [ - FAQItem( - question: 'How to edit profile?', - answer: 'To edit your profile, go to the "Profile" screen and tap on the edit button. Make the necessary changes and save them.', - ), - FAQItem( - question: 'How to add an assignment?', - answer: 'You can directly add an assignment from the home screen. Tap on the "+" button, enter the assignment details, and save it.', - ), - FAQItem( - question: 'Can I edit or delete a reminder?', - answer: 'Yes, you can edit or delete a reminder. Tap on the reminder item to edit its details or swipe left and tap on the "Delete" button.', - ), - FAQItem( - question: 'How do I change the app settings?', - answer: 'To change the app settings, go to the "Settings" screen accessible from the app drawer menu. Here, you can customize various preferences.', - ), - FAQItem( - question: 'How to contact us?', - answer: 'If you need to contact us, go to the "Help" screen and tap on the "Contact" option. Fill in the required details and send us a message.', - ), - ], + appBar: AppBar(elevation: 0,backgroundColor: Colors.transparent, + + centerTitle: true,), + backgroundColor: Theme.of(context).colorScheme.background.withOpacity(0.8), + + body: SingleChildScrollView( + physics: AlwaysScrollableScrollPhysics(parent: BouncingScrollPhysics()), + child: Consumer( + builder: (context, userInfo, _) { + Users _user; + if (userInfo.hasData) _user = userInfo.user!; + return Stack( + alignment: Alignment.center, + children: [ + Column( + children: [ + SizedBox(height: 30,), + Text( + "FAQs Section", + style: TextStyle( + color: Colors.white, + fontSize: 30.0, + fontWeight: FontWeight.bold, + ),), + SizedBox(height: 0.12 * MediaQuery.of(context).size.height), + Container( + margin: EdgeInsets.fromLTRB(15, 15, 15, 60), + padding: EdgeInsets.all(30), + decoration: BoxDecoration( + color: Theme.of(context).primaryColor, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(40), + topRight: Radius.circular(40), + ), + ), + width: double.infinity, + child: + + SizedBox(height: MediaQuery.of(context).size.height ,width: MediaQuery.of(context).size.width,child:ListView( + children: [ + FAQItem( + question: 'How to edit profile?', + answer: 'To edit your profile, go to the "Profile" screen and tap on the edit button. Make the necessary changes and save them.', + ), + FAQItem( + question: 'How to add an assignment?', + answer: 'You can directly add an assignment from the home screen. Tap on the "+" button, enter the assignment details, and save it.', + ), + FAQItem( + question: 'Can I edit or delete a reminder?', + answer: 'Yes, you can edit or delete a reminder. Tap on the reminder item to edit its details or swipe left and tap on the "Delete" button.', + ), + FAQItem( + question: 'How do I change the app settings?', + answer: 'To change the app settings, go to the "Settings" screen accessible from the app drawer menu. Here, you can customize various preferences.', + ), + FAQItem( + question: 'How to contact us?', + answer: 'If you need to contact us, go to the "Help" screen and tap on the "Contact" option. Fill in the required details and send us a message.', + ), + ], + ),))])]); + }, + ), ), ); } @@ -44,11 +86,13 @@ class FAQItem extends StatelessWidget { @override Widget build(BuildContext context) { return ExpansionTile( - title: Text(question), + iconColor: Theme.of(context).highlightColor, + collapsedIconColor: Theme.of(context).highlightColor, + title: Text(question,style: TextStyle(color: Theme.of(context).highlightColor),), children: [ Padding( padding: const EdgeInsets.all(16.0), - child: Text(answer), + child: Text(answer, style: TextStyle(color: Theme.of(context).canvasColor),), ), ], ); diff --git a/lib/screens/help_screen.dart b/lib/screens/help_screen.dart index cd9f6b1e72..911c971df6 100644 --- a/lib/screens/help_screen.dart +++ b/lib/screens/help_screen.dart @@ -1,5 +1,9 @@ import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:settings_ui/settings_ui.dart'; +import '../models/users.dart'; +import '../services/user_info_services.dart'; import 'contact_us_screen.dart'; import 'app_info_screen.dart'; @@ -7,36 +11,74 @@ class HelpScreen extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - title: Text('Help'), - ), - body: ListView( - children: [ - ListTile( - leading: Icon(Icons.contact_mail), - title: Text('Contact Us'), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => ContactUsScreen(), + appBar: AppBar(elevation: 0,backgroundColor: Colors.transparent, + + centerTitle: true,), + backgroundColor: Theme.of(context).colorScheme.background.withOpacity(0.8), + + body: SingleChildScrollView( + physics: AlwaysScrollableScrollPhysics(parent: BouncingScrollPhysics()), + child: Consumer( + builder: (context, userInfo, _) { + Users _user; + if (userInfo.hasData) _user = userInfo.user!; + return Stack( + alignment: Alignment.center, + children: [ + Column( + children: [ + SizedBox(height: 30,), + Text( + "Help Section", + style: TextStyle( + color: Colors.white, + fontSize: 30.0, + fontWeight: FontWeight.bold, + ),), + SizedBox(height: 0.12 * MediaQuery.of(context).size.height), + Container( + margin: EdgeInsets.fromLTRB(15, 15, 15, 60), + padding: EdgeInsets.all(30), + decoration: BoxDecoration( + color: Theme.of(context).primaryColor, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(40), + topRight: Radius.circular(40), + ), + ), + width: double.infinity, + child: + + SizedBox(height: MediaQuery.of(context).size.height ,width: MediaQuery.of(context).size.width,child:ListView( + children: [ + ListTile( + leading: Icon(Icons.contact_mail, color: Colors.white,), + title: Text('Contact Us', style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ContactUsScreen(), + ), + ); + }, ), - ); - }, - ), - ListTile( - leading: Icon(Icons.info), - title: Text('App Info'), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => AppInfoScreen(), + ListTile( + leading: Icon(Icons.info, color: Colors.white,), + title: Text('App Info',style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => AppInfoScreen(), + ), + ); + }, ), - ); - }, - ), - ], + ], + ),))])]); + }, + ), ), ); }