From 4adcd2645ec2c20a02ec6121e58646786e7415b2 Mon Sep 17 00:00:00 2001 From: andoriyaprashant Date: Thu, 28 Dec 2023 09:58:46 +0530 Subject: [PATCH 1/3] FAQ Feature added --- lib/screens/faq.dart | 123 ++++++++++++++++++++++++++++++++++++++ lib/screens/settings.dart | 12 +++- 2 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 lib/screens/faq.dart diff --git a/lib/screens/faq.dart b/lib/screens/faq.dart new file mode 100644 index 0000000..3fa504d --- /dev/null +++ b/lib/screens/faq.dart @@ -0,0 +1,123 @@ +import 'package:flutter/material.dart'; + +class FAQScreen extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + appBar: AppBar( + backgroundColor: Colors.transparent, + foregroundColor: Colors.black, + elevation: 0, + leading: IconButton( + icon: Icon( + Icons.arrow_back_rounded, + color: Colors.black, + ), + onPressed: () { + Navigator.pop(context); + }, + ), + title: const Text( + "FAQs Section", + style: TextStyle( + color: Colors.black, + fontSize: 30.0, + fontWeight: FontWeight.bold, + ), + ), + ), + body: Column( + children: [ + SizedBox(height: 40), + Expanded( + child: Container( + margin: EdgeInsets.fromLTRB(15, 15, 15, 60), + padding: EdgeInsets.all(30), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(40), + topRight: Radius.circular(40), + bottomLeft: Radius.circular(40), + bottomRight: Radius.circular(40), + ), + border: Border.all( + color: Colors.red, + width: 2.0, + ), + ), + child: SingleChildScrollView( + physics: AlwaysScrollableScrollPhysics(parent: BouncingScrollPhysics()), + child: Column( + children: [ + FAQItem( + question: 'How does the STEAM Celestial Satellite Tracker work?', + answer: 'The STEAM Celestial Satellite Tracker utilizes an Arduino-controlled pointer and Liquid Galaxy rig to visualize satellite orbits. The app provides real-time information about satellite movements and offers a unique way to interact with the satellite data.', + ), + FAQItem( + question: ' What satellite information does the app provide?', + answer: 'The app offers detailed information about various satellites, including their orbits, trajectories, and other relevant data. Explore a variety of satellites and learn more about their celestial movements.' + ), + FAQItem( + question: ' Is the app compatible with all Android devices?', + answer: 'The app is compatible with Android devices up to Android 11. Please note that the Arduino-controlled pointer functionality is specifically designed for Android devices.', + ), + FAQItem( + question: 'What Bluetooth module is compatible with the STEAM Celestial Satellite Tracker?', + answer: 'The HC-05 Bluetooth module is used for communication between the app and the Arduino-controlled pointer. Ensure your Bluetooth module is HC-05 for seamless connectivity.', + ), + FAQItem( + question: 'Can I use any Arduino board for the pointer setup?', + answer: 'The current implementation uses an Arduino UNO board. While other boards may work, it is recommended to stick with Arduino UNO for compatibility.', + ), + FAQItem( + question: 'How do I connect the app to Liquid Galaxy for satellite visualization?', + answer: 'Open the app and navigate to the Settings page by clicking on the gear icon. Choose the "LG Connection" option and enter the Liquid Galaxy host name, password, IP address, SSH connection port, and the number of screens. Click "Connect" to establish a connection.', + ), + FAQItem( + question: 'How can I contribute to the development of the app?', + answer: 'We welcome contributions! Feel free to report issues, bugs, or submit feature requests through our issue tracker. If you are interested in contributing code, you can submit a pull request.' + ), + ], + ), + ), + ), + ), + ], + ), + ); + } +} + +class FAQItem extends StatefulWidget { + final String question; + final String answer; + FAQItem({required this.question, required this.answer}); + + @override + _FAQItemState createState() => _FAQItemState(); +} + +class _FAQItemState extends State { + bool isExpanded = false; + + @override + Widget build(BuildContext context) { + return ExpansionTile( + title: Text(widget.question), + trailing: Icon(isExpanded ? Icons.arrow_drop_up : Icons.arrow_drop_down), + onExpansionChanged: (bool expanded) { + setState(() { + isExpanded = expanded; + }); + }, + children: [ + Padding( + padding: const EdgeInsets.all(16.0), + child: Text(widget.answer), + ), + ], + ); + } +} \ No newline at end of file diff --git a/lib/screens/settings.dart b/lib/screens/settings.dart index 0210d52..91a5661 100644 --- a/lib/screens/settings.dart +++ b/lib/screens/settings.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:get_it/get_it.dart'; +import 'package:steam_celestial_satellite_tracker_in_real_time/screens/faq.dart'; import 'package:steam_celestial_satellite_tracker_in_real_time/screens/help.dart'; import 'package:steam_celestial_satellite_tracker_in_real_time/screens/lg_settings.dart'; import 'package:steam_celestial_satellite_tracker_in_real_time/services/local_storage_service.dart'; @@ -125,9 +126,18 @@ class _SettingsState extends State { Navigator.push(context, MaterialPageRoute(builder: (context) => const Help())); }, - title: _buildTitle('Help'), + title: _buildTitle('Help'), trailing: const Icon(Icons.arrow_forward), leading: _buildIcon(Icons.help_center_outlined), + ), + ListTile( + onTap: (){ + Navigator.push(context, + MaterialPageRoute(builder: (context) => FAQScreen())); + }, + title: _buildTitle('FAQ'), + trailing: const Icon(Icons.arrow_forward), + leading: _buildIcon(Icons.contact_mail), ), _divider(), const SizedBox(height: 10,), From 298dab5a286d459dba2e65e5c97ee9e2ab327bb5 Mon Sep 17 00:00:00 2001 From: andoriyaprashant Date: Thu, 11 Jan 2024 22:49:25 +0530 Subject: [PATCH 2/3] Ui updated --- lib/screens/faq.dart | 92 ++++++++++++++++----------------------- lib/screens/settings.dart | 1 + 2 files changed, 38 insertions(+), 55 deletions(-) diff --git a/lib/screens/faq.dart b/lib/screens/faq.dart index 3fa504d..dc17630 100644 --- a/lib/screens/faq.dart +++ b/lib/screens/faq.dart @@ -1,18 +1,19 @@ import 'package:flutter/material.dart'; +import 'package:steam_celestial_satellite_tracker_in_real_time/utils/colors.dart'; class FAQScreen extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: Colors.white, + backgroundColor: ThemeColors.backgroundCardColor, appBar: AppBar( backgroundColor: Colors.transparent, - foregroundColor: Colors.black, + foregroundColor: ThemeColors.textPrimary, elevation: 0, leading: IconButton( icon: Icon( Icons.arrow_back_rounded, - color: Colors.black, + color: ThemeColors.textPrimary, ), onPressed: () { Navigator.pop(context); @@ -27,31 +28,11 @@ class FAQScreen extends StatelessWidget { ), ), ), - body: Column( - children: [ - SizedBox(height: 40), - Expanded( - child: Container( - margin: EdgeInsets.fromLTRB(15, 15, 15, 60), - padding: EdgeInsets.all(30), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(40), - topRight: Radius.circular(40), - bottomLeft: Radius.circular(40), - bottomRight: Radius.circular(40), - ), - border: Border.all( - color: Colors.red, - width: 2.0, - ), - ), - child: SingleChildScrollView( - physics: AlwaysScrollableScrollPhysics(parent: BouncingScrollPhysics()), - child: Column( - children: [ - FAQItem( + body: Container( + padding: EdgeInsets.all(16), + child: ListView( + children: [ + FAQItem( question: 'How does the STEAM Celestial Satellite Tracker work?', answer: 'The STEAM Celestial Satellite Tracker utilizes an Arduino-controlled pointer and Liquid Galaxy rig to visualize satellite orbits. The app provides real-time information about satellite movements and offers a unique way to interact with the satellite data.', ), @@ -79,45 +60,46 @@ class FAQScreen extends StatelessWidget { question: 'How can I contribute to the development of the app?', answer: 'We welcome contributions! Feel free to report issues, bugs, or submit feature requests through our issue tracker. If you are interested in contributing code, you can submit a pull request.' ), - ], - ), - ), - ), - ), - ], + ], + ), ), ); } } -class FAQItem extends StatefulWidget { +class FAQItem extends StatelessWidget { final String question; final String answer; - FAQItem({required this.question, required this.answer}); - - @override - _FAQItemState createState() => _FAQItemState(); -} -class _FAQItemState extends State { - bool isExpanded = false; + FAQItem({required this.question, required this.answer}); @override Widget build(BuildContext context) { - return ExpansionTile( - title: Text(widget.question), - trailing: Icon(isExpanded ? Icons.arrow_drop_up : Icons.arrow_drop_down), - onExpansionChanged: (bool expanded) { - setState(() { - isExpanded = expanded; - }); - }, - children: [ - Padding( - padding: const EdgeInsets.all(16.0), - child: Text(widget.answer), + return Card( + elevation: 2, + margin: EdgeInsets.symmetric(vertical: 8), + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8.0), + side: BorderSide( + color: Colors.red, + width: 0.5, ), - ], + ), + child: ExpansionTile( + title: Text( + question, + style: TextStyle( + fontWeight: FontWeight.bold, + ), + ), + children: [ + Padding( + padding: const EdgeInsets.all(16.0), + child: Text(answer), + ), + ], + ), ); } } \ No newline at end of file diff --git a/lib/screens/settings.dart b/lib/screens/settings.dart index 91a5661..20b0f30 100644 --- a/lib/screens/settings.dart +++ b/lib/screens/settings.dart @@ -130,6 +130,7 @@ class _SettingsState extends State { trailing: const Icon(Icons.arrow_forward), leading: _buildIcon(Icons.help_center_outlined), ), + _divider(), ListTile( onTap: (){ Navigator.push(context, From 9c49038b8ddf8f1813a2acd58992cd2b4326d4f7 Mon Sep 17 00:00:00 2001 From: andoriyaprashant Date: Thu, 11 Jan 2024 23:10:35 +0530 Subject: [PATCH 3/3] Ui updated (red border) --- lib/screens/faq.dart | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/screens/faq.dart b/lib/screens/faq.dart index dc17630..78a94f9 100644 --- a/lib/screens/faq.dart +++ b/lib/screens/faq.dart @@ -78,14 +78,7 @@ class FAQItem extends StatelessWidget { return Card( elevation: 2, margin: EdgeInsets.symmetric(vertical: 8), - color: Colors.white, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8.0), - side: BorderSide( - color: Colors.red, - width: 0.5, - ), - ), + color: Colors.white, child: ExpansionTile( title: Text( question,