User Guide v_7 Update

This commit is contained in:
Kalonkarthik 2025-01-07 18:02:54 +05:30
parent aef2798e76
commit b326901d4b
10 changed files with 1080 additions and 876 deletions

View File

@ -383,16 +383,15 @@ final GoRouter router = GoRouter(
builder: (context, state) => UsingFeatures(), builder: (context, state) => UsingFeatures(),
), ),
GoRoute(path: '/faq', GoRoute(path: '/faq',
name: 'faq', name: 'faq',
builder: (context, state) => FAQPage(), builder: (context, state) => FAQPage(),
), ),
GoRoute(path: '/gettingStarted',
GoRoute(path: '/gettingStarted', name: 'gettingStarted',
name: 'gettingStarted', builder: (context, state) => GettingStarted(),
builder: (context, state) => GettingStarted(), ),
),
], ],
), ),
// GoRoute( // GoRoute(

View File

@ -1,64 +1,56 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class CustomContainer extends StatelessWidget { class CustomTextRich extends StatelessWidget {
final String text;
final EdgeInsetsGeometry padding;
final bool isBulletPoint;
final TextStyle? textStyle;
final double? fontSize;
final double? height;
final double defaultFontSize ;
final TextDecoration textDecoration ;
final Color? decorationColor;
final FontWeight fontWeight;
final Color color;
const CustomContainer({ const CustomTextRich({
super.key, super.key,
required this.text, required this.textSpans,
this.padding = const EdgeInsets.all(8.0), this.padding = const EdgeInsets.all(8.0),
this.isBulletPoint = false, this.textAlign = TextAlign.left,
this.textStyle,
this.fontSize,
this.defaultFontSize=14,
this.height,
this.textDecoration = TextDecoration.none,
this.fontWeight =FontWeight.w500,
this.decorationColor,
this.color=const Color(0xFF898C81),
}); });
final List<TextSpan> textSpans;
final EdgeInsetsGeometry padding;
final TextAlign textAlign;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Padding( return SingleChildScrollView(
padding: padding, child :Padding(
child: Row( padding: padding,
crossAxisAlignment: CrossAxisAlignment.start, child: Text.rich(
children: [ TextSpan(children: textSpans),
if (isBulletPoint) textAlign: textAlign,
Text( ),
"", ),
);
style: TextStyle(fontSize: fontSize ?? defaultFontSize,
color: color, }
fontWeight: fontWeight,
height: height,), static TextSpan createTextSpan(
), String text, {
Expanded( double? fontSize,
child: Text( Color color = const Color(0xFF898C81),
text, FontWeight fontWeight = FontWeight.w500,
style: TextStyle( double? height,
fontSize: fontSize ?? defaultFontSize, double defaultFontSize = 14,
color: color, TextDecoration textDecoration = TextDecoration.none,
fontWeight: fontWeight, Color? decorationColor,
height: height, double spacingTop = 0.0,
decoration: textDecoration, double spacingBottom = 0.0,
decorationColor: decorationColor ?? color, }) {
), String spacedText = (spacingTop > 0.0 || spacingBottom > 0.0)
), ? '${'\n' * spacingTop.toInt()}$text${'\n' * spacingBottom.toInt()}'
), : text;
], return TextSpan(
text: spacedText,
style: TextStyle(
fontSize: fontSize ?? defaultFontSize,
color: color,
fontWeight: fontWeight,
height: height,
decoration: textDecoration,
decorationColor: decorationColor ?? color,
), ),
); );
} }

View File

@ -1,6 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../custom_drawer_routes.dart'; import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart';
class FAQPage extends StatefulWidget { class FAQPage extends StatefulWidget {
const FAQPage({super.key}); const FAQPage({super.key});
@ -13,38 +13,63 @@ class _FAQPageState extends State<FAQPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseScaffold( return BaseScaffold(
title: Text('FAQs'), title: Text('FAQs',
body: Scrollbar( style: TextStyle(
thumbVisibility: true, color:Color(0xFF7296BE),
thickness: 6, fontWeight: FontWeight.w500,
radius: Radius.circular(10), ),),
interactive: true, showBackIcon: true,
child:SingleChildScrollView( body: SafeArea(child:Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
Container(
padding: const EdgeInsets.all(16.0),
width: MediaQuery.of(context).size.width,
child: Text.rich(
TextSpan(
text: 'Here are some common questions about the ',
style: TextStyle(
fontSize: 19,
fontWeight: FontWeight.w600,
color: Colors.grey,
),
children: [ children: [
Container( TextSpan(
padding: const EdgeInsets.all(16.0), text:' Federal Competitiveness and Statistics Centre (FCSC),',
width: MediaQuery.of(context).size.width, style: TextStyle(
child: Text( fontSize: 19,
'HERE ARE SOME COMMON QUESTIONS ABOUT THE FEDERAL COMPETITIVENESS AND STATISTICS CENTRE (FCSC) MOBILE APPLICATION:', fontWeight: FontWeight.w600,
style: TextStyle( color: Colors.black87,
color: Color(0xFF265E84), // Text color ),
fontSize: 18, ),
fontWeight: FontWeight.w600 TextSpan(
), text: 'mobile application:',
style: TextStyle(
fontSize: 19,
fontWeight: FontWeight.w600,
color: Colors.grey,
), ),
), ),
Container(
padding: const EdgeInsets.all(0.0),
color: Colors.grey,
child: QuestionAnswerScrollView()
)
], ],
), ),
), ),
), ),
Expanded(child: Scrollbar(
thumbVisibility: true,
thickness: 8,
radius: Radius.circular(10),
interactive: true,
child:SingleChildScrollView(
child:Container(
padding: const EdgeInsets.all(0.0),
color: Colors.grey[50],
child: QuestionAnswerScrollView(),
),
),
),),
],
),
),
); );
} }
@ -52,24 +77,194 @@ class _FAQPageState extends State<FAQPage> {
} }
class QuestionAnswerScrollView extends StatelessWidget { class QuestionAnswerScrollView extends StatelessWidget {
final List<Map<String, String>> questionsAndAnswers = [ const QuestionAnswerScrollView({super.key});
{'question': '1. What is the purpose of this app?', 'answer': 'The app provides official UAE statistics across categories like Economy, Environment, and Social. It allows users to explore datasets, view trends, and access detailed metrics to make informed decisions.'},
{'question': '2. How do I bookmark a metric?',
'answer': 'When viewing a metric, tap on the Bookmark icon. Your bookmarks are accessible from the My Bookmarks section in the navigation bar.'},
{'question': '3.Can I view the app in another language?', 'answer': 'Yes, the app supports both English and Arabic. You can toggle the language using the switch in the top-right corner of the app.'},
{'question': '4.What happens if I forget my password?','answer':'Tap on the Forgot Password? link on the login page. Follow the steps to reset your password via your registered email address.'},
{'question':'5. Can I edit my profile details?','answer': 'Yes, you can edit specific fields such as Date of Birth and User Image. However, certain fields like Username and Email are non-editable for security reasons.'},
{'question':'6.How often is the data updated?','answer':'The app updates its datasets regularly to ensure users have access to the latest statistics. Notifications are sent whenever significant updates are made.'},
{'question':'7.Do I need to create an account to use the app?',
'answer':"Yes, the app is strictly for registered and approved users. To access the data:You need to sign up using the Register Now option on the login screen .Your registration must be approved by the admin.Once approved, you can log in to access the app's features and datasets.Guest access is not available for this application."},
{'question':'8.How can I navigate through the app?','answer':'Use the main categories on the homepage (e.g., Economy, Environment) to access subcategories and detailed KPIs.Drill down into specific metrics or graphical views by tapping on a KPI.Access additional features like Bookmarks or Profile through the navigation bar.'},
{'question':'9.What types of data are available?','answer':'The app offers data on:Economy: GDP, growth rates, and economic trends.Environment: Electricity production, water consumption, and more.Social: Labor force distribution, participation rates, and demographic data.'},
{'question':'10.What types of graphs and charts are available?','answer':'The app provides a variety of visualizations, including:Line charts for trends.Bar and column charts for comparisons.Stacked charts for multi-layered data views.'},
];
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final List<Map<String, dynamic>> questionsAndAnswers = [
{'question':'What is the purpose of this app?', 'answer': 'The app provides official UAE statistics across categories like Economy, Environment, and Social. It allows users to explore datasets, view trends, and access detailed metrics to make informed decisions.'},
{'question':'Do I need to create an account to use the app?', 'answer':RichText(
text: TextSpan(
children: [
TextSpan(
text: 'Yes, the app is strictly for registered and approved users. To access the data:\n\n',
style: TextStyle(fontWeight: FontWeight.normal, color: Colors.grey),
),
TextSpan(
text: ' 1. You need to sign up using the Register Now option on the login screen.\n',
style: TextStyle(color: Colors.grey),
),
TextSpan(
text: ' 2. Your registration must be approved by the admin.\n',
style: TextStyle(color: Colors.grey),
),
TextSpan(
text: " 3. Once approved, you can log in to access the app's features and datasets.\n\nGuest access is not available for this application.\n ",
style: TextStyle(color: Colors.grey),
),
],
),
),},
{'question':'How can I navigate through the app?','answer':'• Use the main categories on the homepage (e.g., Economy, Environment) to access subcategories and detailed KPIs.\n• Drill down into specific metrics or graphical views by tapping on a KPI.\n• Access additional features like Bookmarks or Profile through the navigation bar.\n'},
{'question':'What types of data are available?', 'answer':RichText(
text: TextSpan(
children: [
TextSpan(
text: 'The app offers data on:\n\n',
style: TextStyle(color: Colors.grey),
),
TextSpan(
text: ' • Economy',
style: TextStyle(color: Colors.black87,fontWeight: FontWeight.w500),
),
TextSpan(
text: ' GDP, growth rates, and economic trends\n',
style: TextStyle(color: Colors.grey),
),
TextSpan(
text: ' • Environment:',
style: TextStyle(color: Colors.black87,fontWeight: FontWeight.w500),
),
TextSpan(
text: ' Electricity production, water consumption, and more.\n',
style: TextStyle(color: Colors.grey),
),
TextSpan(
text: ' • Social:',
style: TextStyle(color: Colors.black87,fontWeight: FontWeight.w500),
),
TextSpan(
text: ' Labor force distribution, participation rates, and demographic data.\n',
style: TextStyle(color: Colors.grey),
),
],
),
),},
{'question':'How do I bookmark a metric?', 'answer': RichText(
text: TextSpan(
children: [
TextSpan(
text: 'When viewing a metric, tap on the',
style: TextStyle(color: Colors.grey),
),
TextSpan(
text: ' Bookmark ',
style: TextStyle(color: Colors.black87,fontWeight: FontWeight.w500),
),
TextSpan(
text: 'icon. Your bookmarks are accessible from the',
style: TextStyle(color: Colors.grey),
),
TextSpan(
text: 'My Bookmarks',
style: TextStyle(color: Colors.black87,fontWeight: FontWeight.w500),
),
TextSpan(
text: 'section in the navigation bar.\n',
style: TextStyle(color: Colors.grey),
),
],
),
),},
{'question':'Can I view the app in another language?', 'answer': RichText(
text: TextSpan(
children: [
TextSpan(
text: 'Yes, the app supports both ',
style: TextStyle(color: Colors.grey),
),
TextSpan(
text: 'English ',
style: TextStyle(color: Colors.black87,fontWeight: FontWeight.w500),
),
TextSpan(
text: 'and',
style: TextStyle(color: Colors.grey),
),
TextSpan(
text: ' Arabic ',
style: TextStyle(color: Colors.black87,fontWeight: FontWeight.w500),
),
TextSpan(
text: '. You can toggle the language using the switch in the top-right corner of the app.\n',
style: TextStyle(color: Colors.grey),
),
],
),
),},
{'question':'What happens if I forget my password?','answer':'Tap on the Forgot Password? link on the login page. Follow the steps to reset your password via your registered email address.\n'},
{'question':'Can I edit my profile details?','answer': 'Yes, you can edit specific fields such as Date of Birth and User Image. However, certain fields like Username and Email are non-editable for security reasons.\n'},
{'question':'How often is the data updated?','answer':'The app updates its datasets regularly to ensure users have access to the latest statistics. Notifications are sent whenever significant updates are made.\n'},
{'question':'What types of graphs and charts are available?','answer':'The app provides a variety of visualizations, including:\n • Line charts for trends.\n • Bar and column charts for comparisons.\n • Stacked charts for multi-layered data views.\n'},
{'question':'Can I share the data or charts?','answer':RichText(
text: TextSpan(
children: [
TextSpan(
text: 'Yes, you can share data or charts directly from the app by tapping the ',
style: TextStyle(color: Colors.grey),
),
TextSpan(
text: 'Share ',
style: TextStyle(color: Colors.black87,fontWeight: FontWeight.w500),
),
TextSpan(
text: 'button available on most pages.\n',
style: TextStyle(color: Colors.grey),
),
],
),
),},
{'question':'What should I do if I encounter an issue?','answer':RichText(
text: TextSpan(
children: [
TextSpan(
text: 'For technical support or feedback, navigate to the ',
style: TextStyle(color: Colors.grey),
),
TextSpan(
text: 'Help ',
style: TextStyle(color: Colors.black87,fontWeight: FontWeight.w500),
),
TextSpan(
text: 'section in the app and contact the support team.\n',
style: TextStyle(color: Colors.grey),
),
],
),
),},
{'question':'How do I log out of the app?','answer':RichText(
text: TextSpan(
children: [
TextSpan(
text: 'Go to the ',
style: TextStyle(color: Colors.grey),
),
TextSpan(
text: 'Profile ',
style: TextStyle(color: Colors.black87,fontWeight: FontWeight.w500),
),
TextSpan(
text: 'section and tap the ',
style: TextStyle(color: Colors.grey),
),
TextSpan(
text: 'Logout ',
style: TextStyle(color: Colors.black87,fontWeight: FontWeight.w500),
),
TextSpan(
text: 'option in the top-right corner.\n',
style: TextStyle(color: Colors.grey), ),
],
),
),},
];
return SingleChildScrollView( return SingleChildScrollView(
child: Column( child: Column(
children: questionsAndAnswers.map((qa) => QuestionAnswerCard(qa: qa)).toList(), children: questionsAndAnswers.map((qa) => QuestionAnswerCard(qa: qa)).toList(),
@ -78,9 +273,10 @@ class QuestionAnswerScrollView extends StatelessWidget {
} }
} }
class QuestionAnswerCard extends StatefulWidget { class QuestionAnswerCard extends StatefulWidget { // Use dynamic to accommodate RichText
final Map<String, String> qa;
QuestionAnswerCard({required this.qa}); const QuestionAnswerCard({super.key, required this.qa});
final Map<String, dynamic> qa;
@override @override
_QuestionAnswerCardState createState() => _QuestionAnswerCardState(); _QuestionAnswerCardState createState() => _QuestionAnswerCardState();
@ -92,18 +288,18 @@ class _QuestionAnswerCardState extends State<QuestionAnswerCard> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Card( return Card(
color: Colors.white, color: Colors.grey[50],
elevation: 1, elevation: 1,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.zero, // No rounding, it's a rectangle borderRadius: BorderRadius.zero, // No rounding, it's a rectangle
), ),
margin: EdgeInsets.symmetric(vertical: 0,), margin: EdgeInsets.symmetric(vertical: 0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
ListTile( ListTile(
dense: true, dense: true,
textColor:Color(0xFF414042), textColor: Color(0xFF414042),
title: Text( title: Text(
widget.qa['question']!, widget.qa['question']!,
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 15), style: TextStyle(fontWeight: FontWeight.w600, fontSize: 15),
@ -118,8 +314,10 @@ class _QuestionAnswerCardState extends State<QuestionAnswerCard> {
if (isExpanded) if (isExpanded)
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Text( child: widget.qa['answer'] is RichText
widget.qa["answer"]!, ? widget.qa['answer']
: Text(
widget.qa['answer'] ?? '',
style: TextStyle(color: Colors.grey), style: TextStyle(color: Colors.grey),
), ),
), ),

View File

@ -1,3 +1,4 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -5,152 +6,174 @@ import 'package:uae_stat/presentation/routes/drawer_routes/Drawer%20Items/user_g
import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart'; import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart';
import 'package:uae_stat/infrastructure/services/img_asset_paths/banner_asset_path.dart'; import 'package:uae_stat/infrastructure/services/img_asset_paths/banner_asset_path.dart';
import 'package:url_launcher/url_launcher.dart';
class GettingStarted extends StatelessWidget { class GettingStarted extends StatelessWidget {
GettingStarted({super.key});
final String url = 'https://fcsc.gov.ae/en-us/Pages/home.aspx';
final fcscBanner = Image.asset( final fcscBanner = Image.asset(
BannerAssetPath.fcsc, BannerAssetPath.fcsc,
height: 56, height: 56,
alignment:Alignment.center, alignment:Alignment.center,
); );
final List<Map<String, dynamic>> contentList = [
{
'text': 'This app provides a centralized platform to access key statistical data and insights about the UAE, empoweringusers with accurate and up-to-date information on various sectors.',
'fontSize': 16.0,
'color': Color(0xFF898C81),
'fontWeight': FontWeight.normal,
'isBulletPoint': false,
},
{
'text': 'How to Get Started',
'fontSize': 18.0,
'color': Color(0xFF414042),
'fontWeight': FontWeight.w600,
'isBulletPoint': false,
},
{
'text': '1.Download the app from the App Store or Google Play Store.',
'fontSize': 14.0,
'color': Color(0xFF898C81),
'fontWeight': FontWeight.normal,
'isBulletPoint': false,
},
{
'text': '2.Log in to unlock advanced features or continue as a guest.',
'fontSize': 14.0,
'color': Color(0xFF898C81),
'fontWeight': FontWeight.normal,
'isBulletPoint': false,
},
{
'text': '3.Navigate through categories, explore metrics, and bookmark essential information.',
'fontSize': 14.0,
'color': Color(0xFF898C81),
'fontWeight': FontWeight.normal,
'isBulletPoint': false,
},
{
'text': 'Stay Updated',
'fontSize': 18.0,
'color': Color(0xFF414042),
'fontWeight': FontWeight.bold,
'isBulletPoint': false,
},
{
'text': 'The app regularly updates datasets and features to reflect the latest information. Notifications will alert you about new data or improvements.',
'fontSize': 14.0,
'color': Color(0xFF898C81),
'fontWeight': FontWeight.normal,
'isBulletPoint': false,
},
];
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseScaffold(title: Text ('Getting Started'), List<TextSpan> textSpans = [
body: Scrollbar(
thumbVisibility: true,
thickness: 6,
radius: Radius.circular(10),
interactive: true,
child:SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: const EdgeInsets.all(16.0),
width: MediaQuery.of(context).size.width,
child: Text(
'WELCOME TO THE FEDERAL COMPETITIVENESS AND STATISTICS CENTRE (FCSC) MOBILE APPLICATION.',
style: TextStyle(
color: Color(0xFF265E84), // Text color
fontSize: 18,
fontWeight: FontWeight.w600
),
),
),
Container(
padding: const EdgeInsets.all(16.0),
color: Color(0xFFD9D9D9),
child:ListView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemCount: contentList.length,
itemBuilder: (context, index) {
final item = contentList[index];
return CustomContainer(
text: item['text'],
fontSize: item['fontSize']?? 20,
color: item['color'],
fontWeight: item['fontWeight'],
height:item['height'],
isBulletPoint: item['isBulletPoint'] ?? false,
textDecoration: item['textDecoration'] ?? TextDecoration.none,
decorationColor: item['decorationColor'],
);
},
),
),
Container(
padding: const EdgeInsets.all(16.0),
width: MediaQuery.of(context).size.width,
color: Color(0xFFD9D9D9),
child: Text.rich(
TextSpan(
children: [
TextSpan(
text: 'For more information please visit ',
style: TextStyle(
fontSize: 16.0,
color: Color(0xFF265E84),
fontWeight: FontWeight.normal,
),
),
TextSpan( CustomTextRich.createTextSpan('How to Get Started\n', fontSize: 17,
text: 'www.fcsc.gov.ae', color: Colors.black87,
style: TextStyle( fontWeight: FontWeight.bold,
fontSize: 16.0, ),
color: Color(0xFF568898), CustomTextRich.createTextSpan('1.Download the app from the App Store or Google Play Store.',
fontWeight: FontWeight.normal, fontSize: 13, color:Color(0xFF898C81),
decoration: TextDecoration.underline, fontWeight: FontWeight.normal ,
decorationColor:Color(0xFF568898), spacingTop: 1.9,
), ),
), CustomTextRich.createTextSpan(
], '2.Log in to unlock advanced features or continue as a guest.\n',
fontSize: 13, color:Color(0xFF898C81),
fontWeight: FontWeight.normal ,
spacingTop: 1.9,),
CustomTextRich.createTextSpan(
'3.Navigate through categories, explore metrics, and bookmark essential information.\n',
fontSize: 13, color:Color(0xFF898C81),
fontWeight: FontWeight.normal ,
),
CustomTextRich.createTextSpan('\nStay Updated', fontSize: 15,
color: Colors.black87,
fontWeight: FontWeight.w600,
height: 2,
),
CustomTextRich.createTextSpan(
'\nThe app regularly updates datasets and features to reflect the latest information. Notifications will alert you about new data or improvements.',
fontSize: 13, color:Color(0xFF898C81),
fontWeight: FontWeight.normal ,
),
CustomTextRich.createTextSpan(
'Support decision-making and research with reliable, up-to-date data.\n \n ',
fontSize: 14.0,
color: Color(0xFF898C81),
fontWeight: FontWeight.normal,
),
];
return BaseScaffold( title: Text('About the App',
style: TextStyle(
color:Color(0xFF265E84),
fontWeight: FontWeight.w500,
),
),
showBackIcon: true,
body:SafeArea(child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: const EdgeInsets.all(16.0),
width: MediaQuery.of(context).size.width,
child: Text.rich(
TextSpan(
text: 'The',
style: TextStyle(
fontSize: 19,
fontWeight: FontWeight.w600,
color: Colors.grey,
),
children: [
TextSpan(
text:' Federal Competitiveness and Statistics Centre (FCSC),',
style: TextStyle(
fontSize: 19,
fontWeight: FontWeight.w600,
color: Colors.black87,
), ),
),
), ),
Container( TextSpan(
color: Color(0xFFD9D9D9), text:' in your App is designed to provide registered and approved users with access to accurate and comprehensive statistics about the UAE. The app serves as a centralized platform for exploring key datasets, trends, and insights across various sectors.',
padding: const EdgeInsets.all(16.0), style: TextStyle(
width: MediaQuery.of(context).size.width, fontSize: 19,
child: Center( child: fcscBanner,), fontWeight: FontWeight.w600,
color: Colors.grey,
),
), ),
], ],
), ),
), ),
), ),
Expanded(child: Scrollbar(
thumbVisibility: true,
thickness: 6,
radius: Radius.circular(10),
interactive: true,
child: SingleChildScrollView(
child: Column(
children: [
Container(
color: Colors.grey[50], // Set the background color here
// child: SingleChildScrollView(
child: CustomTextRich(
textSpans: textSpans,
padding: const EdgeInsets.all(16.0),
textAlign: TextAlign.start,
),
),
Container(
color: Colors.grey[50],
padding: EdgeInsets.only(bottom: 26.0),
child:Text.rich(
TextSpan(
text: 'For more information please visit ',
style: TextStyle(
fontSize: 16.0,
color: Color(0xFF265E84),
fontWeight: FontWeight.normal,),
children: [
TextSpan(
text: 'www.fcsc.gov.ae',
style: TextStyle(
fontSize: 16.0,
color: Color(0xFF568898),
fontWeight: FontWeight.normal,
decoration: TextDecoration.underline,
decorationColor:Color(0xFF568898),
),
recognizer: TapGestureRecognizer()
..onTap = () async {
final Uri uri = Uri.parse(url);
if (await launchUrl(uri)) {
await launchUrl(uri, mode: LaunchMode.externalApplication);
} else {
throw 'Could not launch $url';
}
},
),
],
),
),
),
Container(
color: Colors.grey[50],
padding: EdgeInsets.only(bottom: 26.0),
width: MediaQuery.of(context).size.width,
child: Center(
child: fcscBanner,
),
),
],
),
),
),),
],
), ),
); );
} }
} }

View File

@ -43,14 +43,10 @@ class _UserGuideState extends State<UserGuide> {
// Each pair defines a row of (Color, Text) pairs // Each pair defines a row of (Color, Text) pairs
[ [
{'routePath':'gettingStarted','color': Color(0xFF90B0D5), 'text': 'Getting Started', 'icon': 'START', 'index': '1'}, {'routePath':'gettingStarted','color': Color(0xFF90B0D5), 'text': 'Getting Started', 'icon': 'START', 'index': '1'},
{'routePath':'features','color': Color(0xFF497B8C), 'text': 'Account & Profile', 'icon': Icons.person_outline_rounded, 'index': '2'}, {'routePath':'features','color': Color(0xFFAA8E83), 'text': 'Using Features', 'icon': Icons.stars_outlined, 'index': '2'},
], ],
[ [
{'routePath':'features','color': Color(0xFFAA8E83), 'text': 'Using Features', 'icon': Icons.stars_outlined, 'index': '3'}, {'routePath':'faq','color': Color(0xFF7296BE), 'text': 'FAQs', 'icon': Icons.question_answer_sharp, 'index': '3'},
{'routePath':'features','color': Color(0xFF265E84), 'text': 'Contact', 'icon': Icons.local_phone_outlined, 'index': '4'},
],
[
{'routePath':'faq','color': Color(0xFF7296BE), 'text': 'FAQs', 'icon': Icons.question_answer_sharp, 'index': '5'},
// {'routePath':'features','color': Color(0xFF7DAFBC), 'text': 'Advanced Settings', 'icon': Icons.settings_outlined, 'index': '6'}, // {'routePath':'features','color': Color(0xFF7DAFBC), 'text': 'Advanced Settings', 'icon': Icons.settings_outlined, 'index': '6'},
], ],
]), ]),

View File

@ -5,16 +5,18 @@ class BaseScaffold extends StatelessWidget {
final Widget body; final Widget body;
final Widget title; final Widget title;
final List<Widget>? actions; final List<Widget>? actions;
final bool showBackIcon;
final VoidCallback? onBackIconPressed;
const BaseScaffold({ const BaseScaffold({
Key? key, Key? key,
required this.body, required this.body,
required this.title, required this.title,
this.actions, this.actions,
this.showBackIcon=false,
this.onBackIconPressed,
}) : super(key: key); }) : super(key: key);
// final Widget body;
//
// const BaseScaffold({required this.body});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -23,9 +25,29 @@ class BaseScaffold extends StatelessWidget {
double myheight = MediaQuery.of(context).size.height; double myheight = MediaQuery.of(context).size.height;
double mywidth = MediaQuery.of(context).size.width; double mywidth = MediaQuery.of(context).size.width;
return Scaffold( return Scaffold(
appBar: AppBar(title: title, actions: [ appBar: AppBar(title: title,
leading:showBackIcon
? IconButton(
padding: EdgeInsets.zero,
icon: const Icon(Icons.arrow_back_ios_new_sharp),
onPressed: onBackIconPressed ??
() {
Navigator.of(context).pop(); // Default back button behavior
},
) : null,
actions: [
IconButton(onPressed: () {}, icon: Icon(Icons.toggle_off_outlined)), IconButton(onPressed: () {}, icon: Icon(Icons.toggle_off_outlined)),
]), if (showBackIcon)
Builder(
builder: (context) => IconButton(
padding: EdgeInsets.zero,
icon: const Icon(Icons.menu),
onPressed: () {
Scaffold.of(context).openDrawer(); // Opens the drawer
},
),
),
],),
drawer: Drawer( drawer: Drawer(
child: ListView( child: ListView(
children: [ children: [

View File

@ -10,6 +10,7 @@ import flutter_secure_storage_macos
import path_provider_foundation import path_provider_foundation
import share_plus import share_plus
import shared_preferences_foundation import shared_preferences_foundation
import url_launcher_macos
import video_player_avfoundation import video_player_avfoundation
import webview_flutter_wkwebview import webview_flutter_wkwebview
@ -19,6 +20,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin")) FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))
FLTWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "FLTWebViewFlutterPlugin")) FLTWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "FLTWebViewFlutterPlugin"))
} }

View File

@ -5,23 +5,23 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: _fe_analyzer_shared name: _fe_analyzer_shared
sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab" sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "76.0.0" version: "72.0.0"
_macros: _macros:
dependency: transitive dependency: transitive
description: dart description: dart
source: sdk source: sdk
version: "0.3.3" version: "0.3.2"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
name: analyzer name: analyzer
sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e" sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.11.0" version: "6.7.0"
analyzer_plugin: analyzer_plugin:
dependency: transitive dependency: transitive
description: description:
@ -186,10 +186,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.19.0" version: "1.18.0"
convert: convert:
dependency: transitive dependency: transitive
description: description:
@ -266,10 +266,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: custom_lint_visitor name: custom_lint_visitor
sha256: bfe9b7a09c4775a587b58d10ebb871d4fe618237639b1e84d5ec62d7dfef25f9 sha256: "8aeb3b6ae2bb765e7716b93d1d10e8356d04e0ff6d7592de6ee04e0dd7d6587d"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.0+6.11.0" version: "1.0.0+6.7.0"
dart_style: dart_style:
dependency: transitive dependency: transitive
description: description:
@ -773,18 +773,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker name: leak_tracker
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "10.0.7" version: "10.0.5"
leak_tracker_flutter_testing: leak_tracker_flutter_testing:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker_flutter_testing name: leak_tracker_flutter_testing
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.8" version: "3.0.5"
leak_tracker_testing: leak_tracker_testing:
dependency: transitive dependency: transitive
description: description:
@ -813,10 +813,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: macros name: macros
sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656" sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.1.3-main.0" version: "0.1.2-main.4"
mailer: mailer:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1172,7 +1172,7 @@ packages:
dependency: transitive dependency: transitive
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.99"
smart_api_client: smart_api_client:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1216,10 +1216,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.12.0" version: "1.11.1"
state_notifier: state_notifier:
dependency: transitive dependency: transitive
description: description:
@ -1248,10 +1248,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: string_scanner name: string_scanner
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.0" version: "1.2.0"
syncfusion_flutter_charts: syncfusion_flutter_charts:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1280,10 +1280,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.3" version: "0.7.2"
the_validator: the_validator:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1316,6 +1316,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.2.2" version: "2.2.2"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603"
url: "https://pub.dev"
source: hosted
version: "6.3.1"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193"
url: "https://pub.dev"
source: hosted
version: "6.3.14"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626"
url: "https://pub.dev"
source: hosted
version: "6.3.2"
url_launcher_linux: url_launcher_linux:
dependency: transitive dependency: transitive
description: description:
@ -1324,6 +1348,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.2.1" version: "3.2.1"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2"
url: "https://pub.dev"
source: hosted
version: "3.2.2"
url_launcher_platform_interface: url_launcher_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -1408,10 +1440,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: vm_service name: vm_service
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "14.3.0" version: "14.2.5"
watcher: watcher:
dependency: transitive dependency: transitive
description: description:

View File

@ -22,6 +22,7 @@ dependencies:
cupertino_icons: ^1.0.6 cupertino_icons: ^1.0.6
fl_chart: ^0.69.0 fl_chart: ^0.69.0
marquee: ^2.2.3 marquee: ^2.2.3
url_launcher: ^6.3.1
# dynamic_layouts: # dynamic_layouts:
# git: # git:
# url: https://github.com/flutter/packages.git # url: https://github.com/flutter/packages.git