diff --git a/assets/icons/drawer/logout.png b/assets/icons/drawer/logout.png new file mode 100644 index 00000000..a0b94ff7 Binary files /dev/null and b/assets/icons/drawer/logout.png differ diff --git a/lib/config/my_router.dart b/lib/config/my_router.dart index 188460de..062e04af 100644 --- a/lib/config/my_router.dart +++ b/lib/config/my_router.dart @@ -294,7 +294,8 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; -import 'package:uae_stat/presentation/routes/drawer_routes/Drawer%20Items/user_guide/faq_page.dart'; +import 'package:uae_stat/presentation/Screens/auth_verification/registration.dart'; +import 'package:uae_stat/presentation/routes/drawer_routes/Drawer%20Items/user_guide/getting_started.dart'; import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart'; import '../domain/use_cases/preferences_use_case.dart'; @@ -305,10 +306,11 @@ import '../presentation/Screens/auth_verification/otp_verification.dart'; import '../presentation/Screens/profilepage.dart'; import '../presentation/routes/auth_routes/login_route.dart'; import '../presentation/routes/bottom_bar_routes/tab_routes/home_route.dart'; +import '../presentation/routes/drawer_routes/Drawer Items/edit_profile.dart'; import '../presentation/routes/drawer_routes/Drawer Items/feedback.dart'; -import 'package:uae_stat/presentation/routes/drawer_routes/Drawer%20Items/user_guide/features.dart'; -import 'package:uae_stat/presentation/routes/drawer_routes/Drawer%20Items/user_guide/getting_started.dart'; -import 'package:uae_stat/presentation/routes/drawer_routes/Drawer%20Items/user_guide/user_guide.dart'; +import '../presentation/routes/drawer_routes/Drawer Items/user_guide/faq_page.dart'; +import '../presentation/routes/drawer_routes/Drawer Items/user_guide/features.dart'; +import '../presentation/routes/drawer_routes/Drawer Items/user_guide/user_guide.dart'; import '../presentation/routes/drawer_routes/Drawer Items/manage_users.dart'; final GoRouter router = GoRouter( @@ -316,12 +318,16 @@ final GoRouter router = GoRouter( GoRoute( path: '/', //builder: (context, state) => LoginRoute(), - builder: (context, state) => MyHomePage(), + builder: (context, state) => LoginRoute(), ), GoRoute( path: '/myhomepage', builder: (context, state) => MyHomePage(), ), + GoRoute( + path: '/register', + builder: (context, state) => RegisterScreen(), + ), GoRoute( path: '/mailverification', builder: (context, state) => EmailVerificationScreen( @@ -333,10 +339,11 @@ final GoRouter router = GoRouter( ), ), GoRoute( - path: '/changepassword', - builder: (context, state) => Changepassword( - userId: '', - ), + path: '/changepassword/:userId', + builder: (context, state) { + final userId = state.pathParameters['userId']!; + return Changepassword(userId: userId); + }, ), GoRoute( path: '/createNewPw/:userId/:email', @@ -359,28 +366,33 @@ final GoRouter router = GoRouter( path: '/feedback', builder: (context, state) => FeedbackForm(), ), + //Sub route GoRoute( - path: '/profile', - builder: (context, state) => ProfileScreen( - userId: '', - ), + path: '/profile/:userId', + builder: (context, state) { + final userId = state.pathParameters['userId']!; + return ProfileScreen(userId: userId); + }, ), GoRoute( path: '/user-guide', builder: (context, state) => UserGuide(), routes: [ GoRoute(path: '/features', - name: 'features', - builder: (context, state) => UsingFeatures(), - ), - GoRoute(path: '/gettingStarted', - name: 'gettingStarted', - builder: (context, state) => GettingStarted(), - ), - GoRoute(path: '/faq', - name: 'faq', - builder: (context, state) => FAQPage(), + name: 'features', + builder: (context, state) => UsingFeatures(), ), + +GoRoute(path: '/faq', +name: 'faq', +builder: (context, state) => FAQPage(), +), + + +GoRoute(path: '/gettingStarted', +name: 'gettingStarted', +builder: (context, state) => GettingStarted(), +), ], ), // GoRoute( @@ -391,10 +403,13 @@ final GoRouter router = GoRouter( // return ManageUserRouter(title: title); // }, // ), + GoRoute( + path: '/editProfile', + builder: (context, state) => EditProfile(), + ), GoRoute( path: '/manageuser', builder: (context, state) => ManageUserRouter(), ), ], ); - diff --git a/lib/presentation/Screens/auth_verification/registration.dart b/lib/presentation/Screens/auth_verification/registration.dart index d83f2db4..8b69722d 100644 --- a/lib/presentation/Screens/auth_verification/registration.dart +++ b/lib/presentation/Screens/auth_verification/registration.dart @@ -6,7 +6,6 @@ import 'package:pocketbase/pocketbase.dart'; import 'package:uae_stat/domain/use_cases/language.dart'; import 'package:uae_stat/presentation/Screens/profilepage.dart'; -import '../../../infrastructure/services/pocketbase_service.dart'; import '../../routes/auth_routes/login_route.dart'; class RegisterScreen extends StatefulWidget { @@ -136,77 +135,27 @@ class _RegisterScreenState extends State { return null; } - // String? _validatePassword(String? value) { - // // Define the regular expression for allowed characters - // final regex = RegExp( - // r'^[A-Za-z0-9~!@#$%^&*()_+=[\]{}|;:,.<>?/-àèìòùáéíóúÀÈÌÒÙÁÉÍÓÚ]*$'); - // - // if (value == null || value.isEmpty) { - // return 'Required'; - // } else if (value.length < 8) { - // return 'Password must be at least 8characters'; - // } - // - // // Check the length constraint - // if (value.length < 8 || value.length > 40) { - // return 'Password must be between 8 and 64 characters'; - // } - // - // // Check the regular expression - // if (!regex.hasMatch(value)) { - // return 'Password contains invalid characters'; - // } - // - // _password = value; // Store the password for confirm password validation - // return null; - // } - String? _validatePassword(String? value) { // Define the regular expression for allowed characters final regex = RegExp( r'^[A-Za-z0-9~!@#$%^&*()_+=[\]{}|;:,.<>?/-àèìòùáéíóúÀÈÌÒÙÁÉÍÓÚ]*$'); - // Define regular expressions for password complexity requirements - final hasUppercase = RegExp(r'[A-Z]'); - final hasLowercase = RegExp(r'[a-z]'); - final hasDigit = RegExp(r'\d'); - final hasSpecialCharacter = RegExp(r'[~!@#$%^&*()_+=[\]{}|;:,.<>?/-]'); - if (value == null || value.isEmpty) { return 'Required'; + } else if (value.length < 8) { + return 'Password must be at least 8characters'; } // Check the length constraint - if (value.length < 8 || value.length > 64) { + if (value.length < 8 || value.length > 40) { return 'Password must be between 8 and 64 characters'; } - // Check the regular expression for allowed characters + // Check the regular expression if (!regex.hasMatch(value)) { return 'Password contains invalid characters'; } - // Track missing constraints - List missingConstraints = []; - - if (!hasUppercase.hasMatch(value)) { - missingConstraints.add('uppercase letter'); - } - if (!hasLowercase.hasMatch(value)) { - missingConstraints.add('lowercase letter'); - } - if (!hasDigit.hasMatch(value)) { - missingConstraints.add('numeric digit'); - } - if (!hasSpecialCharacter.hasMatch(value)) { - missingConstraints.add('special character'); - } - - // If there are missing constraints, return a consolidated message - if (missingConstraints.isNotEmpty) { - return 'At least one ${missingConstraints.join(', ')}'; - } - _password = value; // Store the password for confirm password validation return null; } @@ -233,12 +182,46 @@ class _RegisterScreenState extends State { if (_formKey.currentState?.validate() ?? false) { if (isChecked) { try { - final existingUsers = await pb.collection('users').getList( - filter: 'email="${_emailController.text}"', - ); + final adminAuth = await pb.admins + .authWithPassword('pb@venbainfotech.com', 'pb@venbainfotech.com'); - if (existingUsers.items.isNotEmpty) { - // Email already exists + final adminToken = adminAuth.token; + print('adminToken- ${adminToken}'); + // Create user in PocketBase + final response = await pb.collection('users').create(body: { + 'username': _usernameController.text, + 'email': _emailController.text, + 'password': _passwordController.text, + 'passwordConfirm': _passwordController.text, + 'status': 'Pending', + }, headers: { + 'Authorization': adminToken + }); + if (response.id != null) { + userID = response.id; + // Request email verification + // PocketBaseService.users.requestVerification(_emailController.text); + // Show success message instead of navigating away + setState(() { + userID = response.id; + registrationSuccess = true; + registrationFailed = false; // Show success message on success + }); + + // Navigate to ProfileScreen after successful registration + // Navigator.pushReplacement( + // context, + // MaterialPageRoute( + // builder: (context) => ProfileScreen(userId: response.id)), + // ); + } else { + throw Exception('User registration failed: missing user ID'); + } + } catch (e) { + // Check if the error is due to an invalid or already used email + if (e + .toString() + .contains('The email is invalid or already in use.')) { showDialog( context: context, builder: (context) { @@ -255,42 +238,13 @@ class _RegisterScreenState extends State { ); }, ); - return; // Stop registration process - } - final adminAuth = await pb.admins - .authWithPassword('pb@venbainfotech.com', 'pb@venbainfotech.com'); - - final adminToken = adminAuth.token; - print('adminToken- ${adminToken}'); - // Create user in PocketBase - final response = await pb.collection('users').create(body: { - 'username': _usernameController.text, - 'email': _emailController.text, - 'password': _passwordController.text, - 'passwordConfirm': _passwordController.text, - 'status': 'Pending', - 'role': 'user', - }, headers: { - 'Authorization': adminToken - }); - if (response.id != null) { - userID = response.id; - // Request email verification - // PocketBaseService.users.requestVerification(_emailController.text); - // Show success message instead of navigating away - setState(() { - userID = response.id; - registrationSuccess = true; - registrationFailed = false; // Show success message on success - }); } else { - throw Exception('User registration failed: missing user ID'); + // Handle other types of errors + setState(() { + registrationFailed = true; + registrationSuccess = false; + }); } - } catch (e) { - setState(() { - registrationFailed = true; - registrationSuccess = false; - }); } } else { setState(() { @@ -344,7 +298,7 @@ class _RegisterScreenState extends State { buildIconContainer(Icons.report, Color(0xFF7DAFBC)), SizedBox(height: 20), Text( - "Your registration is pending for verification", + "Your registration is pending for Admin Approval.", textAlign: TextAlign.center, style: TextStyle( fontSize: 16, @@ -353,7 +307,7 @@ class _RegisterScreenState extends State { ), SizedBox(height: 10), Text( - "Kindly verify your mail to proceed further.", + "Access will be granted once your account is approved.", textAlign: TextAlign.center, style: TextStyle( fontSize: 14, @@ -362,8 +316,14 @@ class _RegisterScreenState extends State { ), SizedBox(height: 10), ElevatedButton( - onPressed: () { - context.go('/'); + onPressed: () => { + Navigator.pushReplacement( + context, + MaterialPageRoute(builder: (context) => LoginRoute() + + //ProfileScreen(userId: userID) + ), + ), }, child: Text( 'Go to Login', @@ -452,7 +412,7 @@ class _RegisterScreenState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - SizedBox(height: screenheight / 6), + SizedBox(height: screenheight / 15), Text( 'Register', style: TextStyle( @@ -518,8 +478,8 @@ class _RegisterScreenState extends State { suffixIcon: IconButton( icon: Icon( _obscurePassword - ? Icons.visibility_off - : Icons.visibility, + ? Icons.visibility + : Icons.visibility_off, color: Colors.blue, ), onPressed: () { @@ -550,8 +510,8 @@ class _RegisterScreenState extends State { suffixIcon: IconButton( icon: Icon( _obscureConfirmPassword - ? Icons.visibility_off - : Icons.visibility, + ? Icons.visibility + : Icons.visibility_off, color: Colors.blue, ), onPressed: () { @@ -662,7 +622,7 @@ class _RegisterScreenState extends State { width: screenwidth / 1.3, child: ElevatedButton( onPressed: () { - // Add your login logic here + context.go('/'); }, style: ElevatedButton.styleFrom( backgroundColor: Color( @@ -671,44 +631,41 @@ class _RegisterScreenState extends State { borderRadius: BorderRadius.circular(10), ), ), - // child: Row( - // mainAxisSize: MainAxisSize.min, - // children: [ - // Text( - // "Login", - // style: TextStyle( - // fontSize: 16, color: Colors.white - // ), - // - // - // ), - // SizedBox(width: 8), - // Icon(Icons.arrow_forward, - // color: Colors.white), - // ], - // ), - - child: GestureDetector( - onTap: () { - // Navigate to LoginRoute - context.go('/'); - }, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - "Login", - style: TextStyle( - fontSize: 16, - color: Colors.white, - ), - ), - SizedBox(width: 8), - Icon(Icons.arrow_forward, - color: Colors.white), - ], - ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + "Login", + style: TextStyle( + fontSize: 16, color: Colors.white), + ), + SizedBox(width: 8), + Icon(Icons.arrow_forward, + color: Colors.white), + ], ), + + // child: GestureDetector( + // onTap: () { + // // Navigate to LoginRoute + // context.go('/'); + // }, + // child: Row( + // mainAxisSize: MainAxisSize.min, + // children: [ + // Text( + // "Login", + // style: TextStyle( + // fontSize: 16, + // color: Colors.white, + // ), + // ), + // SizedBox(width: 8), + // Icon(Icons.arrow_forward, + // color: Colors.white), + // ], + // ), + // ), ), ), SizedBox( diff --git a/lib/presentation/Screens/demo_home.dart b/lib/presentation/Screens/demo_home.dart index 402bc535..225f1b1b 100644 --- a/lib/presentation/Screens/demo_home.dart +++ b/lib/presentation/Screens/demo_home.dart @@ -1,29 +1,262 @@ +import 'dart:convert'; import 'package:flutter/material.dart'; -import 'dart:async'; +import 'package:go_router/go_router.dart'; +import 'package:intl/intl.dart'; +import 'package:syncfusion_flutter_charts/charts.dart'; // Import Syncfusion charts package +import 'package:http/http.dart' as http; -import 'package:uae_stat/domain/use_cases/language.dart'; - -import '../components/my_drawer.dart'; - -class DemoHome extends StatefulWidget { - @override - State createState() => _DemoHomeState(); +void main() { + runApp(MyApp()); } -class _DemoHomeState extends State { +class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - return Scaffold( - drawer: const MyDrawer(), - appBar: AppBar( - backgroundColor: const Color(0xFFf8f9ff), - title: Text(context.translate('Home', 'نموذج الملاحظات')), - ), - body: Padding( - padding: const EdgeInsets.all(16.0), - child: Center( - child: Text('Home Page'), - )), + return MaterialApp( + home: ChartPage(), ); } } + +class ChartPage extends StatefulWidget { + @override + ChartPageState createState() => ChartPageState(); +} + +class ChartPageState extends State { + List chartsData = []; + bool isLoading = true; + + @override + void initState() { + super.initState(); + fetchChartData(); + } + + Future fetchChartData() async { + const baseUrl = + 'https://pb.venbait.in/api/custom/apicall'; // Replace with your server URL + final url = Uri.parse('$baseUrl?dataset=hotels'); + + try { + final response = await http.get(url); + if (response.statusCode == 200) { + setState(() { + chartsData = jsonDecode(response.body); + isLoading = false; + }); + } else { + throw Exception('Failed to load data'); + } + } catch (error) { + setState(() { + isLoading = false; + }); + print('Error fetching data: $error'); + } + } + + List parseLineChartData(List response) { + return response.map((entry) { + // Attempt to fetch the TIMEPERIOD + final rawTimePeriod = + entry['ObsKey']?['Year'] ?? entry['ObsKey']?['TIME_PERIOD']; + final formattedTimePeriod = rawTimePeriod != null + ? rawTimePeriod.toString() // Use as-is if valid + : 'Unknown'; // Fallback value if null + + // Parse the value or fallback to 0.0 + final value = + double.tryParse(entry['ObsValue']?['Value']?.toString() ?? '0.0') ?? + 0.0; + + return ChartData( + timePeriod: formattedTimePeriod, + value: value, + ); + }).toList(); + } + + List parseBarChartData(List response) { + return response + .asMap() + .entries + .map((entry) => ChartData( + timePeriod: entry.value['ObsKey']['TIME_PERIOD'] ?? + 'Unknown', // Fallback to 'Unknown' if null + value: double.tryParse( + entry.value['ObsValue']['Value'].toString()) ?? + 0.0, // Handle null/invalid value + )) + .toList(); + } + + Widget buildChart(dynamic chartData) { + print('chartData $chartData'); + switch (chartData['chart_type']) { + case 'line': + return SfCartesianChart( + primaryXAxis: CategoryAxis( + title: AxisTitle(text: 'Year'), + labelRotation: 45, // Rotate labels if they overlap + ), + title: ChartTitle(text: 'Hotel Estabhlishments'), + legend: Legend(isVisible: true), + tooltipBehavior: TooltipBehavior( + enable: true, + builder: (dynamic data, dynamic point, dynamic series, + int pointIndex, int seriesIndex) { + return Container( + padding: const EdgeInsets.all(8), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(5), + ), + child: Text( + '${data.timePeriod}: ${formatNumber(data.value)}', + style: const TextStyle(color: Colors.black), + ), + ); + }, + ), + series: >[ + LineSeries( + dataSource: parseLineChartData(chartData['response']), + xValueMapper: (ChartData data, _) => data.timePeriod, + yValueMapper: (ChartData data, _) => data.value, + name: chartData['dataset'], + color: Colors.red, + dataLabelSettings: DataLabelSettings( + isVisible: true, + builder: (dynamic data, dynamic point, dynamic series, + int pointIndex, int seriesIndex) { + return Text( + formatNumber(data.value), + style: const TextStyle(fontSize: 12, color: Colors.black), + ); + }, + ), + ), + ], + ); + case 'bar': + return SfCartesianChart( + primaryXAxis: CategoryAxis(), + title: ChartTitle(text: 'Hotel Occupancy Rate'), + tooltipBehavior: TooltipBehavior( + enable: true, + builder: (dynamic data, dynamic point, dynamic series, + int pointIndex, int seriesIndex) { + return Container( + padding: const EdgeInsets.all(8), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(5), + ), + child: Text( + '${data.timePeriod}: ${formatNumber(data.value)}', + style: const TextStyle(color: Colors.black), + ), + ); + }, + ), + series: >[ + BarSeries( + dataSource: parseBarChartData(chartData['response']), + xValueMapper: (ChartData data, _) => data.timePeriod, + yValueMapper: (ChartData data, _) => data.value, + name: chartData['dataset'], + color: Colors.red, + dataLabelSettings: DataLabelSettings( + isVisible: true, + builder: (dynamic data, dynamic point, dynamic series, + int pointIndex, int seriesIndex) { + return Text( + formatNumber(data.value), + style: const TextStyle(fontSize: 12, color: Colors.black), + ); + }, + ), + // isTrackVisible: true, + // trackColor: Colors.red + ), + ], + ); + default: + return Center(child: Text('Unknown chart type')); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: const Color(0xFF7DAFBC), + appBar: AppBar( + backgroundColor: Color(0xFF7DAFBC), + elevation: 0, + leading: IconButton( + icon: Icon(Icons.arrow_back_ios_new, color: Colors.white), + onPressed: () { + context.go('/myhomepage'); + }, + ), + title: Text( + 'Charts', + style: TextStyle(color: Colors.white), + ), + ), + body: isLoading + ? Center(child: CircularProgressIndicator()) + : ListView.builder( + itemCount: chartsData.length, + itemBuilder: (context, index) { + return Card( + margin: EdgeInsets.all(10), + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Text( + // 'Chart: ${chartsData[index]['chart_type']}', + // style: TextStyle( + // fontSize: 18, fontWeight: FontWeight.bold), + // ), + // SizedBox(height: 10), + Container( + height: 300, + child: buildChart(chartsData[index]), + ), + ], + ), + ), + ); + }, + ), + ); + } +} + +class ChartData { + final String timePeriod; + final double value; + final String formattedValue; + + ChartData({required this.timePeriod, required this.value}) + : formattedValue = formatNumber(value); +} + +String formatNumber(double value) { + if (value >= 1e12) { + return '${(value / 1e12).toStringAsFixed(2)} T'; // Trillions + } else if (value >= 1e9) { + return '${(value / 1e9).toStringAsFixed(2)} B'; // Billions + } else if (value >= 1e6) { + return '${(value / 1e6).toStringAsFixed(2)} M'; // Millions + } else if (value >= 1e5) { + return '${(value / 1e5).toStringAsFixed(2)} L'; // Lakhs + } else if (value >= 1e3) { + return '${(value / 1e3).toStringAsFixed(2)} K'; // Thousands + } + return value.toStringAsFixed(2); // Default to two decimal places +} diff --git a/lib/presentation/Screens/profilepage.dart b/lib/presentation/Screens/profilepage.dart index 9c94e6ee..e003a18f 100644 --- a/lib/presentation/Screens/profilepage.dart +++ b/lib/presentation/Screens/profilepage.dart @@ -156,17 +156,39 @@ class _ProfileScreenState extends State { } } + // void _pickImage() async { + // final XFile? pickedFile = + // await _picker.pickImage(source: ImageSource.gallery); + // if (pickedFile != null) { + // setState(() { + // _profileImage = File(pickedFile.path); + // }); + // } + // } + + // Function to open the date picker + void _pickImage() async { final XFile? pickedFile = await _picker.pickImage(source: ImageSource.gallery); if (pickedFile != null) { - setState(() { - _profileImage = File(pickedFile.path); - }); + final String fileExtension = + pickedFile.path.split('.').last.toLowerCase(); + if (fileExtension == 'jpg' || + fileExtension == 'jpeg' || + fileExtension == 'png' || + fileExtension == "heic") { + setState(() { + _profileImage = File(pickedFile.path); + }); + } else { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar(content: Text('Please select a JPG, JPEG, or PNG file.')), + ); + } } } - // Function to open the date picker Future _pickDate() async { final DateTime today = DateTime.now(); final DateTime initialDate = _selectedDate ?? @@ -273,11 +295,12 @@ class _ProfileScreenState extends State { _resetFormFields(); ScaffoldMessenger.of(context).showSnackBar( SnackBar(content: Text("Profile updated successfully!"))); - if (role == 'admin') { - context.go('/manageuser'); - } else { - context.go('/myhomepage'); - } + // if (role == 'admin') { + // context.go('/manageuser'); + // } else { + // context.go('/myhomepage'); + // } + context.go('/myhomepage'); } catch (error) { ScaffoldMessenger.of(context).showSnackBar( SnackBar(content: Text("Failed to update profile: $error"))); @@ -370,8 +393,10 @@ class _ProfileScreenState extends State { children: [ Text( "User Name", - style: - TextStyle(fontSize: 16, fontWeight: FontWeight.w500), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Colors.grey), ), ], ), @@ -380,7 +405,7 @@ class _ProfileScreenState extends State { controller: _usernameController, focusNode: _focusNodes[0], decoration: InputDecoration( - hintText: _showHints[0] ? 'Mohammad Hassan' : null, + hintText: _showHints[0] ? 'Enter the User Name' : null, hintStyle: TextStyle(color: Colors.grey), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), @@ -393,9 +418,11 @@ class _ProfileScreenState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Text( - "E-mail", - style: - TextStyle(fontSize: 16, fontWeight: FontWeight.w500), + "Email ID", + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Colors.grey), ), ], ), @@ -418,7 +445,7 @@ class _ProfileScreenState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Text( - "Full Name", + "Full Name*", style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500), ), @@ -444,7 +471,7 @@ class _ProfileScreenState extends State { controller: _fullNameController, focusNode: _focusNodes[2], decoration: InputDecoration( - hintText: _showHints[2] ? 'Enter the Full Name' : null, + hintText: _showHints[2] ? 'Enter the name' : null, hintStyle: TextStyle(color: Colors.grey), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), @@ -473,9 +500,9 @@ class _ProfileScreenState extends State { border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), ), - hintText: - _showHints[3] ? 'Select your Date of Birth' : null, - //hintText: 'Select your Date of Birth', + hintText: _showHints[3] ? 'DD/MM/YYYY' : null, + //_showHints[3] ? 'Select your Date of Birth' : null, + hintStyle: TextStyle(color: Colors.grey), suffixIcon: const Icon(Icons.arrow_drop_down_sharp), ), readOnly: true, diff --git a/lib/presentation/routes/auth_routes/login_route.dart b/lib/presentation/routes/auth_routes/login_route.dart index da9c40ba..eea8f860 100644 --- a/lib/presentation/routes/auth_routes/login_route.dart +++ b/lib/presentation/routes/auth_routes/login_route.dart @@ -540,13 +540,13 @@ class _LoginRouteState extends State { ), color: Color(0xFF898C81), fontSize: 18, fontWeight: FontWeight.bold),), - Text("UAE's key official statistics",style: TextStyle( - fontFamily: context.translate( - 'Roboto', - 'NotoKufi', - ), - color: Color(0xFF898C81), - fontSize: 16, fontWeight: FontWeight.bold),), + Text("UAE's key official statistics",style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), + color: Color(0xFF898C81), + fontSize: 16, fontWeight: FontWeight.bold),), SizedBox(height: 10), // Display this if registration is pending approval @@ -559,8 +559,8 @@ class _LoginRouteState extends State { prefixIcon: Image.asset("assets/icons/misc/person.png",scale: 2,color: Colors.lightBlueAccent,), border: OutlineInputBorder(borderRadius: BorderRadius.circular(15)), focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide(color: Colors.blue.shade900,) + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide(color: Colors.blue.shade900,) ), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(10), // Keep rounded corners @@ -583,7 +583,7 @@ class _LoginRouteState extends State { // obscureText: _obscurePassword, decoration: InputDecoration( hintText: "Password", - // hintText: _showHints[2] ? 'Enter your password' : null, + // hintText: _showHints[2] ? 'Enter your password' : null, prefixIcon: Image.asset("assets/icons/misc/lock.png",scale: 2,color: Colors.lightBlueAccent,), suffixIcon: IconButton( icon: Icon( @@ -600,8 +600,8 @@ class _LoginRouteState extends State { ), border: OutlineInputBorder(borderRadius: BorderRadius.circular(15)), focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide(color: Colors.blue.shade900,), + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide(color: Colors.blue.shade900,), ), enabledBorder: OutlineInputBorder( @@ -620,9 +620,9 @@ class _LoginRouteState extends State { SizedBox(height: 10), Row(mainAxisAlignment: MainAxisAlignment.end, - children: [Text("Forgot Password?", - style: TextStyle(color: Color(0xFF985400),fontWeight: FontWeight.bold - ),)],), + children: [Text("Forgot Password?", + style: TextStyle(color: Color(0xFF985400),fontWeight: FontWeight.bold + ),)],), SizedBox(height: 20), SizedBox( width: screenwidth, @@ -648,7 +648,7 @@ class _LoginRouteState extends State { ), SizedBox(width: 8), Icon(Icons.arrow_forward_ios, - color: Colors.white, + color: Colors.white, size: 10, ), ], @@ -659,22 +659,22 @@ class _LoginRouteState extends State { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text( - "Don't have an account? ", - style: TextStyle( - fontFamily: context.translate( - 'Roboto', - 'NotoKufi', - ), - color: Color(0xFF898C81), - fontSize: 18, fontWeight: FontWeight.bold), - ), - InkWell( - onTap: (){ - context.go('/registration'); - }, - child: Text( - " Register Now", + Text( + "Don't have an account? ", + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), + color: Color(0xFF898C81), + fontSize: 18, fontWeight: FontWeight.bold), + ), + InkWell( + onTap: (){ + context.go('/registration'); + }, + child: Text( + " Register Now", style: TextStyle( fontFamily: context.translate( 'Roboto', @@ -682,9 +682,9 @@ class _LoginRouteState extends State { ), color: Color(0xFF985400), fontSize: 18, fontWeight: FontWeight.bold), - ), ), - ],), + ), + ],), SizedBox( height: screenheight/20, @@ -714,7 +714,7 @@ class _LoginRouteState extends State { ), SizedBox(width: 8), Icon(Icons.arrow_forward_ios, - color: Colors.white,size: 10,), + color: Colors.white,size: 10,), ], ), ), @@ -740,206 +740,204 @@ class _LoginRouteState extends State { ), ), ); -// <<<<<<< HEAD -// // ======= -// final form = Form( -// key: formKey, -// child: Column( -// children: [ -// ThemedFormField( -// hintText: context.translate( -// 'Email', -// 'بريد إلكتروني', -// ), -// validator: FieldValidator.email(), -// imgPath: MiscIconAssetPath.person, -// controller: emailCtl, -// ), -// 15.verticalSpace, -// ThemedFormField( -// validator: (text) { -// if (text!.length < 8) { -// return 'The password must be at least 8 characters'; -// } -// return FieldValidator.password(minLength: 8)(text); -// }, -// hintText: context.translate( -// 'Password', -// 'كلمة المرور', -// ), -// imgPath: MiscIconAssetPath.lock, -// controller: pwCtl, -// isObscurable: true, -// ), -// // 6.verticalSpace, -// Align( -// alignment: AlignmentDirectional.topEnd, -// child: forgotPwBtn, -// ), -// 10.verticalSpace, -// loginBtn, -// ], -// ), -// ); -// final helloAndPleaseLoginTexts = Column( -// children: [ -// Text( -// context.translate( -// 'Hello Again!', -// 'مرحبا مجددا!', -// ), -// style: TextStyle( -// fontFamily: context.translate( -// 'Roboto', -// 'NotoKufi', -// ), -// fontSize: 40, -// fontWeight: FontWeight.w300, -// ), -// ), -// 10.verticalSpace, -// Text( -// context.translate( -// 'Please login to access UAE’s key official statistics', -// 'يرجى تسجيل الدخول للوصول إلى الإحصاءات الرسمية الرئيسية لدولة الإمارات العربية المتحدة', -// ), -// textAlign: TextAlign.center, -// style: TextStyle( -// fontFamily: context.translate( -// 'Roboto', -// 'NotoKufi', -// ), -// fontSize: 18, -// color: const Color(0xff898C81), -// fontWeight: FontWeight.w700, -// ), -// ), -// ], -// ); -// final dontHaveAnAccountRegisterBtn = TextButton( -// onPressed: () => { -// Navigator.push( -// context, -// MaterialPageRoute(builder: (context) => RegisterScreen()), -// ), -// }, -// child: Text.rich( -// textAlign: TextAlign.center, -// TextSpan( -// style: TextStyle( -// fontFamily: context.translate( -// 'Roboto', -// 'NotoKufi', -// ), -// fontSize: 18, -// fontWeight: FontWeight.bold, -// ), -// children: [ -// TextSpan( -// text: context.translate( -// 'Don\'t have an account? ', -// 'ليس لديك حساب؟', -// ), -// style: const TextStyle( -// color: Color(0xff898C81), -// ), -// ), -// const TextSpan( -// text: ' ', -// ), -// TextSpan( -// text: context.translate( -// 'Register Now', -// 'سجل الان', -// ), -// style: TextStyle( -// color: MyTheme.topicColor(IndicatorTopic.economy).shade600, -// ), -// ), -// ], -// ), -// ), -// ); -// final continueAsGuestBtn = SizedBox( -// width: double.infinity, -// child: ElevatedButton( -// onPressed: () => context -// .go('/${context.language}/${BottomNavBarItem.home.routePath}'), -// style: ButtonStyle( -// shape: WidgetStatePropertyAll( -// RoundedRectangleBorder( -// borderRadius: BorderRadius.circular(10), -// ), -// ), -// padding: const WidgetStatePropertyAll( -// EdgeInsets.symmetric(vertical: 10.5), -// ), -// textStyle: WidgetStatePropertyAll( -// TextStyle( -// fontFamily: context.translate( -// 'Roboto', -// 'NotoKufi', -// ), -// fontSize: 16, -// fontWeight: FontWeight.w600, -// ), -// ), -// backgroundColor: WidgetStatePropertyAll( -// MyTheme.topicColor(IndicatorTopic.environment), -// ), -// foregroundColor: const WidgetStatePropertyAll( -// Colors.white, -// ), -// ), -// child: Row( -// mainAxisAlignment: MainAxisAlignment.center, -// children: [ -// Text( -// context.translate( -// 'Continue as Guest', -// 'استمر كضيف', -// ), -// ), -// 6.horizontalSpace, -// const Icon(Icons.chevron_right_outlined), -// ], -// ), -// ), -// ); -// final fcscBanner = Image.asset( -// BannerAssetPath.fcsc, -// height: 56, -// ); -// final screenWidth = MediaQuery.of(context).size.width; -// final listViewHorizontalPadding = -// screenWidth < 700 ? 30 : 30 + (screenWidth - 700) / 2; -// final scaffoldBody = ListView( -// padding: EdgeInsets.symmetric( -// horizontal: listViewHorizontalPadding.toDouble(), -// ), -// children: [ -// 36.verticalSpace, -// const Align( -// alignment: AlignmentDirectional.topEnd, -// child: LangToggle(), -// ), -// 16.verticalSpace, -// helloAndPleaseLoginTexts, -// 42.verticalSpace, -// form, -// 20.verticalSpace, -// dontHaveAnAccountRegisterBtn, -// 36.verticalSpace, -// continueAsGuestBtn, -// 72.verticalSpace, -// fcscBanner, -// ], -// ); -// final bgScaffold = Scaffold( -// backgroundColor: Colors.white, -// body: SafeArea(child: scaffoldBody), -// ); -// return bgScaffold; -// >>>>>>> b0c5ebce3deb7da2aa24b0ea5ffe684df7dfb7bf + + // final form = Form( + // key: formKey, + // child: Column( + // children: [ + // ThemedFormField( + // hintText: context.translate( + // 'Email', + // 'بريد إلكتروني', + // ), + // validator: FieldValidator.email(), + // imgPath: MiscIconAssetPath.person, + // controller: emailCtl, + // ), + // 15.verticalSpace, + // ThemedFormField( + // validator: (text) { + // if (text!.length < 8) { + // return 'The password must be at least 8 characters'; + // } + // return FieldValidator.password(minLength: 8)(text); + // }, + // hintText: context.translate( + // 'Password', + // 'كلمة المرور', + // ), + // imgPath: MiscIconAssetPath.lock, + // controller: pwCtl, + // isObscurable: true, + // ), + // // 6.verticalSpace, + // Align( + // alignment: AlignmentDirectional.topEnd, + // child: forgotPwBtn, + // ), + // 10.verticalSpace, + // loginBtn, + // ], + // ), + // ); + // final helloAndPleaseLoginTexts = Column( + // children: [ + // Text( + // context.translate( + // 'Hello Again!', + // 'مرحبا مجددا!', + // ), + // style: TextStyle( + // fontFamily: context.translate( + // 'Roboto', + // 'NotoKufi', + // ), + // fontSize: 40, + // fontWeight: FontWeight.w300, + // ), + // ), + // 10.verticalSpace, + // Text( + // context.translate( + // 'Please login to access UAE’s key official statistics', + // 'يرجى تسجيل الدخول للوصول إلى الإحصاءات الرسمية الرئيسية لدولة الإمارات العربية المتحدة', + // ), + // textAlign: TextAlign.center, + // style: TextStyle( + // fontFamily: context.translate( + // 'Roboto', + // 'NotoKufi', + // ), + // fontSize: 18, + // color: const Color(0xff898C81), + // fontWeight: FontWeight.w700, + // ), + // ), + // ], + // ); + // final dontHaveAnAccountRegisterBtn = TextButton( + // onPressed: () => { + // Navigator.push( + // context, + // MaterialPageRoute(builder: (context) => RegisterScreen()), + // ), + // }, + // child: Text.rich( + // textAlign: TextAlign.center, + // TextSpan( + // style: TextStyle( + // fontFamily: context.translate( + // 'Roboto', + // 'NotoKufi', + // ), + // fontSize: 18, + // fontWeight: FontWeight.bold, + // ), + // children: [ + // TextSpan( + // text: context.translate( + // 'Don\'t have an account? ', + // 'ليس لديك حساب؟', + // ), + // style: const TextStyle( + // color: Color(0xff898C81), + // ), + // ), + // const TextSpan( + // text: ' ', + // ), + // TextSpan( + // text: context.translate( + // 'Register Now', + // 'سجل الان', + // ), + // style: TextStyle( + // color: MyTheme.topicColor(IndicatorTopic.economy).shade600, + // ), + // ), + // ], + // ), + // ), + // ); + // final continueAsGuestBtn = SizedBox( + // width: double.infinity, + // child: ElevatedButton( + // onPressed: () => context + // .go('/${context.language}/${BottomNavBarItem.home.routePath}'), + // style: ButtonStyle( + // shape: WidgetStatePropertyAll( + // RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(10), + // ), + // ), + // padding: const WidgetStatePropertyAll( + // EdgeInsets.symmetric(vertical: 10.5), + // ), + // textStyle: WidgetStatePropertyAll( + // TextStyle( + // fontFamily: context.translate( + // 'Roboto', + // 'NotoKufi', + // ), + // fontSize: 16, + // fontWeight: FontWeight.w600, + // ), + // ), + // backgroundColor: WidgetStatePropertyAll( + // MyTheme.topicColor(IndicatorTopic.environment), + // ), + // foregroundColor: const WidgetStatePropertyAll( + // Colors.white, + // ), + // ), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Text( + // context.translate( + // 'Continue as Guest', + // 'استمر كضيف', + // ), + // ), + // 6.horizontalSpace, + // const Icon(Icons.chevron_right_outlined), + // ], + // ), + // ), + // ); + // final fcscBanner = Image.asset( + // BannerAssetPath.fcsc, + // height: 56, + // ); + // final screenWidth = MediaQuery.of(context).size.width; + // final listViewHorizontalPadding = + // screenWidth < 700 ? 30 : 30 + (screenWidth - 700) / 2; + // final scaffoldBody = ListView( + // padding: EdgeInsets.symmetric( + // horizontal: listViewHorizontalPadding.toDouble(), + // ), + // children: [ + // 36.verticalSpace, + // const Align( + // alignment: AlignmentDirectional.topEnd, + // child: LangToggle(), + // ), + // 16.verticalSpace, + // helloAndPleaseLoginTexts, + // 42.verticalSpace, + // form, + // 20.verticalSpace, + // dontHaveAnAccountRegisterBtn, + // 36.verticalSpace, + // continueAsGuestBtn, + // 72.verticalSpace, + // fcscBanner, + // ], + // ); + // final bgScaffold = Scaffold( + // backgroundColor: Colors.white, + // body: SafeArea(child: scaffoldBody), + // ); + // return bgScaffold; } } diff --git a/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart b/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart index 1c2fe332..cc4702c4 100644 --- a/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart +++ b/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart @@ -161,6 +161,7 @@ // } // } import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import '../../drawer_routes/custom_drawer_routes.dart'; class MyHomePage extends StatefulWidget { @@ -176,16 +177,16 @@ class _MyHomePageState extends State { double myheight = MediaQuery.of(context).size.height; double mywidth = MediaQuery.of(context).size.width; return BaseScaffold( - title: Center(child: SizedBox(height : myheight/5, width : mywidth/3,child: Image(image: AssetImage('assets/logos/uae_stat.png')))), + title: Center( + child: SizedBox( + height: myheight / 5, + width: mywidth / 3, + child: Image(image: AssetImage('assets/logos/uae_stat.png')))), body: EconomyStats(), ); } } - - - - class EconomyStats extends StatelessWidget { const EconomyStats({Key? key}) : super(key: key); @@ -193,24 +194,26 @@ class EconomyStats extends StatelessWidget { Widget build(BuildContext context) { return SingleChildScrollView( child: Padding( - padding: EdgeInsets.only(left: 10,right: 10), + padding: EdgeInsets.only(left: 10, right: 10), child: Column( children: [ // Header Section - RoundedCornerContainer( - text: 'ECONOMY', - backgroundColor: Color(0xFF7DAFBC), - textStyle: const TextStyle( - fontSize: 24, - fontWeight: FontWeight.bold, - color: Colors.white, - ), - ), + RoundedCornerContainer( + text: 'ECONOMY', + backgroundColor: Color(0xFF7DAFBC), + textStyle: const TextStyle( + fontSize: 24, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), // Grid Section // ECONOMY DETAILS Padding( - padding: const EdgeInsets.only(top: 10,), + padding: const EdgeInsets.only( + top: 10, + ), child: Column( children: [ // First Row @@ -224,11 +227,12 @@ class EconomyStats extends StatelessWidget { bordercolor: Color(0xFF7DAFBC), textcolor: Color(0xFF7DAFBC), ), - InfoCard( + InfoCard( title: 'Inflation Rate', subtitle: '(2022)', value: '4.82%', - bordercolor: Color(0xFF7DAFBC), textcolor: Color(0xFF7DAFBC), + bordercolor: Color(0xFF7DAFBC), + textcolor: Color(0xFF7DAFBC), ), ], ), @@ -236,18 +240,20 @@ class EconomyStats extends StatelessWidget { // Second Row Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ + children: [ InfoCard( title: 'Trade Value', subtitle: '(Jan - Jan 2024) - AED', value: '215.4B', - bordercolor: Color(0xFF7DAFBC), textcolor: Color(0xFF7DAFBC), + bordercolor: Color(0xFF7DAFBC), + textcolor: Color(0xFF7DAFBC), ), InfoCard( title: 'Hotel Guests', subtitle: '(2022)', value: '25.21M', - bordercolor: Color(0xFF7DAFBC), textcolor: Color(0xFF7DAFBC), + bordercolor: Color(0xFF7DAFBC), + textcolor: Color(0xFF7DAFBC), ), ], ), @@ -264,7 +270,9 @@ class EconomyStats extends StatelessWidget { // SOCIAL DETAILS Padding( - padding: const EdgeInsets.only(top: 10,), + padding: const EdgeInsets.only( + top: 10, + ), child: Column( children: [ // First Row @@ -291,7 +299,7 @@ class EconomyStats extends StatelessWidget { // Second Row Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ + children: [ InfoCard( title: 'Hospitals (Gov )', subtitle: '(Jan - Jan 2024) - AED', @@ -321,12 +329,15 @@ class EconomyStats extends StatelessWidget { // ENVIRONMENT DETAILS Padding( - padding: const EdgeInsets.only(top: 10,), + padding: const EdgeInsets.only( + top: 10, + ), child: Column( children: [ // First Row Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, + mainAxisAlignment: + MainAxisAlignment.spaceEvenly, children: [ InfoCard( title: 'Electricity', @@ -347,8 +358,9 @@ class EconomyStats extends StatelessWidget { const SizedBox(height: 10), // Second Row Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ + mainAxisAlignment: + MainAxisAlignment.spaceEvenly, + children: [ InfoCard( title: 'Export of oil', subtitle: '(Jan - Jan 2024) - AED', @@ -386,13 +398,11 @@ class RoundedCornerContainer extends StatelessWidget { final Color backgroundColor; final TextStyle? textStyle; - const RoundedCornerContainer({ Key? key, required this.text, this.backgroundColor = Colors.blue, this.textStyle, - }) : super(key: key); @override @@ -417,7 +427,6 @@ class RoundedCornerContainer extends StatelessWidget { } } - class InfoCard extends StatelessWidget { final String title; final String subtitle; @@ -425,60 +434,66 @@ class InfoCard extends StatelessWidget { final Color bordercolor; final Color? textcolor; - const InfoCard({ + const InfoCard({ Key? key, required this.title, required this.subtitle, - required this.value, required this.bordercolor,this.textcolor, + required this.value, + required this.bordercolor, + this.textcolor, }) : super(key: key); @override Widget build(BuildContext context) { double myheight = MediaQuery.of(context).size.height; double mywidth = MediaQuery.of(context).size.width; + return Expanded( - child: - Container( - height: myheight/9, - width: mywidth/4, - margin: const EdgeInsets.symmetric(horizontal: 8), - decoration: BoxDecoration( - border: Border.all(color: bordercolor), - borderRadius: BorderRadius.circular(8), - ), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Expanded( - child: Text( - title, - //textAlign: TextAlign.center, - style: const TextStyle( - fontSize: 16, - fontWeight: FontWeight.bold, - color: Colors.black, + child: GestureDetector( + onTap: () { + context.go('/DemoHome'); + }, + child: Container( + height: myheight / 9, + width: mywidth / 4, + margin: const EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration( + border: Border.all(color: bordercolor), + borderRadius: BorderRadius.circular(8), + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Expanded( + child: Text( + title, + style: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + color: Colors.black, + ), ), ), - ), - const SizedBox(height: 2), - Text( - subtitle, - textAlign: TextAlign.center, - style: const TextStyle( - fontSize: 12, - color: Colors.grey, + const SizedBox(height: 2), + Text( + subtitle, + textAlign: TextAlign.center, + style: const TextStyle( + fontSize: 12, + color: Colors.grey, + ), ), - ), - const SizedBox(height: 2), - Text( - value, - style: TextStyle( - fontSize: 24, - fontWeight: FontWeight.bold, - color: textcolor ?? Colors.black + const SizedBox(height: 2), + Text( + value, + style: TextStyle( + fontSize: 24, + fontWeight: FontWeight.bold, + color: textcolor ?? Colors.black, + ), ), - ), - ], + ], + ), ), ), ); diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/edit_profile.dart b/lib/presentation/routes/drawer_routes/Drawer Items/edit_profile.dart index 00d0c486..8c513234 100644 --- a/lib/presentation/routes/drawer_routes/Drawer Items/edit_profile.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/edit_profile.dart @@ -194,17 +194,39 @@ class _EditProfileState extends State { } } + // void _pickImage() async { + // final XFile? pickedFile = + // await _picker.pickImage(source: ImageSource.gallery); + // if (pickedFile != null) { + // setState(() { + // _profileImage = File(pickedFile.path); + // }); + // } + // } + + // Function to open the date picker + void _pickImage() async { final XFile? pickedFile = await _picker.pickImage(source: ImageSource.gallery); if (pickedFile != null) { - setState(() { - _profileImage = File(pickedFile.path); - }); + final String fileExtension = + pickedFile.path.split('.').last.toLowerCase(); + if (fileExtension == 'jpg' || + fileExtension == 'jpeg' || + fileExtension == 'png' || + fileExtension == "heic") { + setState(() { + _profileImage = File(pickedFile.path); + }); + } else { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar(content: Text('Please select a JPG, JPEG, or PNG file.')), + ); + } } } - // Function to open the date picker Future _pickDate() async { final DateTime today = DateTime.now(); final DateTime initialDate = _selectedDate ?? @@ -398,7 +420,9 @@ class _EditProfileState extends State { Text( "User Name", style: TextStyle( - fontSize: 16, fontWeight: FontWeight.w500), + fontSize: 16, + fontWeight: FontWeight.w500, + color: Colors.grey), ), ], ), @@ -407,7 +431,7 @@ class _EditProfileState extends State { controller: _usernameController, focusNode: _focusNodes[0], decoration: InputDecoration( - hintText: _showHints[0] ? 'Mohammad Hassan' : null, + // hintText: _showHints[0] ? 'Mohammad Hassan' : null, hintStyle: TextStyle(color: Colors.grey), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), @@ -420,9 +444,11 @@ class _EditProfileState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Text( - "E-mail", + "Email ID", style: TextStyle( - fontSize: 16, fontWeight: FontWeight.w500), + fontSize: 16, + fontWeight: FontWeight.w500, + color: Colors.grey), ), ], ), @@ -431,10 +457,7 @@ class _EditProfileState extends State { controller: _emailController, focusNode: _focusNodes[1], decoration: InputDecoration( - hintText: _showHints[1] - ? 'mohammad.hassan@fcsc.gov.ae' - : null, - hintStyle: TextStyle(color: Colors.grey), + // hintText: _showHints[1]? 'mohammad.hassan@fcsc.gov.ae': null, border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), ), @@ -446,9 +469,11 @@ class _EditProfileState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Text( - "Full Name", + "Full Name*", style: TextStyle( - fontSize: 16, fontWeight: FontWeight.w500), + fontSize: 16, + fontWeight: FontWeight.w500, + color: Colors.grey), ), ], ), @@ -471,7 +496,7 @@ class _EditProfileState extends State { controller: _fullNameController, focusNode: _focusNodes[2], decoration: InputDecoration( - hintText: _showHints[2] ? 'Mohammad' : null, + // hintText: _showHints[2] ? 'Mohammad' : null, hintStyle: TextStyle(color: Colors.grey), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), @@ -490,7 +515,9 @@ class _EditProfileState extends State { Text( "Date of Birth*", style: TextStyle( - fontSize: 16, fontWeight: FontWeight.w500), + fontSize: 16, + fontWeight: FontWeight.w500, + color: Colors.grey), ), ], ), @@ -502,10 +529,8 @@ class _EditProfileState extends State { border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), ), - hintText: _showHints[3] - ? 'Select your Date of Birth' - : null, - //hintText: 'Select your Date of Birth', + // hintText: _showHints[3] ? 'Select your Date of Birth' : null, + hintStyle: TextStyle(color: Colors.grey), suffixIcon: const Icon(Icons.arrow_drop_down_sharp), enabled: !_isProfileCompleted, ), diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/manage_users.dart b/lib/presentation/routes/drawer_routes/Drawer Items/manage_users.dart index deab917f..8652db61 100644 --- a/lib/presentation/routes/drawer_routes/Drawer Items/manage_users.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/manage_users.dart @@ -43,7 +43,9 @@ class _ManageUserRouterState extends State { try { await _pb.admins .authWithPassword('pb@venbainfotech.com', 'pb@venbainfotech.com'); - final result = await _pb.collection('users').getFullList(); + final result = await _pb.collection('users').getFullList( + filter: 'role="user"', + ); setState(() { userData = result.map((record) { diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/faq_page.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/faq_page.dart index 8b6d602a..ad39293c 100644 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/faq_page.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/faq_page.dart @@ -26,7 +26,6 @@ class _FAQPageState extends State { Container( padding: const EdgeInsets.all(16.0), width: MediaQuery.of(context).size.width, - // color: Colors.white, // Background color// Optional padding around the text child: Text( 'HERE ARE SOME COMMON QUESTIONS ABOUT THE FEDERAL COMPETITIVENESS AND STATISTICS CENTRE (FCSC) MOBILE APPLICATION:', style: TextStyle( diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/features.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/features.dart index f1f511da..b4c0315c 100644 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/features.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/features.dart @@ -1,23 +1,21 @@ import 'package:flutter/material.dart'; - -import 'package:uae_stat/presentation/routes/drawer_routes/Drawer%20Items/user_guide/custom_text.dart'; import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart'; +import 'custom_text.dart'; class UsingFeatures extends StatelessWidget { - final List> contentList = [ { - 'text': '1.Comprehensive Statistics', - 'fontSize': 16.0, - 'color': Color(0xFF414042), + "text": "1.Data-Driven Insights:", + "fontSize": 16.0, + "color": Color(0xFF414042), "fontWeight": FontWeight.bold, "isBulletPoint": false, }, { - 'text': 'Gain insights into vital statistics across categories like Economy, Environment, Social, and more.Explore detailed data, smart metrics, and interactive graphical representations.', + "text": "1.Access detailed datasets across categories such as Economy, Environment, Social, and more.Explore statistics presented as smart metrics, graphs, and charts for better understanding.", "fontSize": 13.0, "color": Color(0xFF898C81), "fontWeight": FontWeight.normal, @@ -38,7 +36,7 @@ class UsingFeatures extends StatelessWidget { "isBulletPoint": false, }, { - "text": "3.Personalized Experience:", + "text": "3.Interactive Visualizations:", "fontSize": 14.0, "color": Color(0xFF414042), "fontWeight": FontWeight.bold, @@ -46,24 +44,33 @@ class UsingFeatures extends StatelessWidget { }, { - "text": "Bookmark important metrics for quick access.", + "text": "View trends and relationships with interactive graphs and charts, including bar graphs, line charts, and more.", "fontSize": 14.0, - "height":0.1, "color": Color(0xFF898C81), "fontWeight": FontWeight.normal, "isBulletPoint": true, }, { - "text": "Edit your profile to keep your information updated.", + "text": "Secure User Access:", "fontSize": 14.0, "height":1.0, "color": Color(0xFF898C81), - "fontWeight": FontWeight.normal, + "fontWeight": FontWeight.bold, "isBulletPoint": true, }, { - "text": "4.Interactive Graphs and Metrics:", + "text": "4.Available only to registered users whose accounts have been approved by an admin.Login ensures secure access to sensitive statistical information.", + "fontSize": 14.0, + "color": Color(0xFF414042), + "fontWeight": FontWeight.normal, + "isBulletPoint": false, + }, + + + + { + "text": "5.Profile Customization:", "fontSize": 14.0, "color": Color(0xFF414042), "fontWeight": FontWeight.bold, @@ -71,7 +78,7 @@ class UsingFeatures extends StatelessWidget { }, { - "text": "Visualize trends and insights with well-designed, interactive charts and graphs that make data easy to understand.", + "text": "Update your profile details, such as name, password, and region, to personalize your experience.", "fontSize": 14.0, "color": Color(0xFF898C81), "fontWeight": FontWeight.normal, @@ -79,7 +86,7 @@ class UsingFeatures extends StatelessWidget { }, { - "text": "5.Log-in Access Mode:", + "text": "6.Bookmark:", "fontSize": 14.0, "color": Color(0xFF414042), "fontWeight": FontWeight.bold, @@ -87,7 +94,7 @@ class UsingFeatures extends StatelessWidget { }, { - "text": "Access advanced features like bookmarks and profile customization.", + "text": "Save frequently accessed metrics and datasets for quick reference via the Bookmarks section.", "fontSize": 14.0, "color": Color(0xFF898C81), "fontWeight": FontWeight.normal, @@ -95,7 +102,7 @@ class UsingFeatures extends StatelessWidget { }, { - "text": "6.Dual Language Support:", + "text": "7.Bilingual Support:", "fontSize": 14.0, "color": Color(0xFF414042), "fontWeight": FontWeight.bold, @@ -103,7 +110,7 @@ class UsingFeatures extends StatelessWidget { }, { - "text": "Toggle between English and Arabic for a seamless bilingual experience.", + "text": "Toggle between English and Arabic for ease of use.", "fontSize": 14.0, "color": Color(0xFF898C81), "fontWeight": FontWeight.normal, @@ -551,8 +558,8 @@ class UsingFeatures extends StatelessWidget { "text": "Select Confirm to save the changes or Cancel to go back", "fontSize": 14.0, "color": Color(0xFF898C81), - 'fontWeight': FontWeight.normal, - 'isBulletPoint': true, + "fontWeight": FontWeight.normal, + "isBulletPoint": true, }, @@ -561,8 +568,7 @@ class UsingFeatures extends StatelessWidget { @override Widget build(BuildContext context) { - return BaseScaffold( - title:Text ('Key Features'), + return BaseScaffold( title: Text('Key Features'), body: Scrollbar( thumbVisibility: true, thickness: 6, @@ -575,13 +581,12 @@ class UsingFeatures extends StatelessWidget { Container( padding: const EdgeInsets.all(16.0), width: MediaQuery.of(context).size.width, - // color: Colors.white, child: Text( - 'FEATURES', + "FEATURES", style: TextStyle( color: Color(0xFF265E84), // Text color fontSize: 18, - fontWeight: FontWeight.w600, + fontWeight: FontWeight.w600 ), ), ), @@ -595,19 +600,18 @@ class UsingFeatures extends StatelessWidget { itemBuilder: (context, index) { final item = contentList[index]; return CustomContainer( - text: item['text'], - fontSize: item['fontSize'], - color: item['color'], - fontWeight: item['fontWeight'], - height:item['height'], - isBulletPoint: item['isBulletPoint'] ?? false, - textDecoration: item['textDecoration'] ?? TextDecoration.none, - decorationColor: item['decorationColor'], + text: item["text"], + fontSize: item["fontSize"], + color: item["color"], + fontWeight: item["fontWeight"], + height:item["height"], + isBulletPoint: item["isBulletPoint"] ?? false, + textDecoration: item["textDecoration"] ?? TextDecoration.none, + decorationColor: item["decorationColor"], ); }, ), - ), - + ) ], ), ), diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/getting_started.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/getting_started.dart index 86d00ca1..cd911638 100644 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/getting_started.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/getting_started.dart @@ -15,53 +15,53 @@ class GettingStarted extends StatelessWidget { final List> 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': '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': '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': '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': '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': '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': '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, + '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, }, ]; @@ -99,14 +99,14 @@ class GettingStarted extends StatelessWidget { 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"], + 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'], ); }, ), @@ -146,7 +146,7 @@ class GettingStarted extends StatelessWidget { padding: const EdgeInsets.all(16.0), width: MediaQuery.of(context).size.width, child: Center( child: fcscBanner,), - ) + ), ], ), ), diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/textRich.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/textRich.dart deleted file mode 100644 index aefcc5d2..00000000 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/textRich.dart +++ /dev/null @@ -1,110 +0,0 @@ -import 'package:flutter/material.dart'; - -class ExpandableRichText extends StatefulWidget { - final List textSpans; - final int maxLines; - final TextStyle? defaultStyle; - - ExpandableRichText({ - required this.textSpans, - this.maxLines = 0, - this.defaultStyle, - }); - - @override - _ExpandableRichTextState createState() => _ExpandableRichTextState(); -} - -class _ExpandableRichTextState extends State { - bool isExpanded = false; - - @override - Widget build(BuildContext context) { - return LayoutBuilder( - builder: (context, constraints) { - final span = TextSpan( - children: widget.textSpans, - style: widget.defaultStyle, - ); - - final textPainter = TextPainter( - text: span, - maxLines: widget.maxLines, - textDirection: TextDirection.ltr, - ); - - textPainter.layout(maxWidth: constraints.maxWidth); - - final isOverflowing = textPainter.didExceedMaxLines; - - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text.rich( - span, - maxLines: isExpanded ? null : widget.maxLines, - overflow: isExpanded ? null : TextOverflow.ellipsis, - ), - if (isOverflowing) - GestureDetector( - onTap: () { - setState(() { - isExpanded = !isExpanded; - }); - }, - child: Text( - isExpanded ? 'View less' : 'View more', - style: TextStyle( - - color: Color(0xFF265E84), - decoration: TextDecoration.underline, - decorationColor: Color(0xFF265E84), - - ), - ), - ), - ], - ); - }, - ); - } -} - -/// Helper method to build `Text.rich` -Widget buildRichText(List textSpans) { - return Text.rich( - TextSpan(children: textSpans), - textAlign: TextAlign.left, - ); -} - -/// Helper method to create custom `TextSpan` -TextSpan createTextSpan( - String text, { - double? fontSize, - Color color = const Color(0xFF898C81), - FontWeight fontWeight = FontWeight.w500, - double? height, - double defaultFontSize = 14, - TextDecoration textDecoration = TextDecoration.none, - Color? decorationColor, - double spacingTop = 0.0, // Custom top spacing - double spacingBottom = 0.0, - }) { - String spacedText = '${'\n' * spacingTop.toInt()}$text${'\n' * spacingBottom.toInt()}'; - - return TextSpan( - text: spacedText, - style: TextStyle( - fontSize: fontSize ?? defaultFontSize, - color: color, - fontWeight: fontWeight, - height: height, - decoration: textDecoration, - decorationColor: decorationColor ?? color, - ), - ); - -} - - diff --git a/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart b/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart index b0b43163..52fc756b 100644 --- a/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart +++ b/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart @@ -25,7 +25,7 @@ class BaseScaffold extends StatelessWidget { return Scaffold( appBar: AppBar(title: title, actions: [ IconButton(onPressed: () {}, icon: Icon(Icons.toggle_off_outlined)), - ],), + ]), drawer: Drawer( child: ListView( children: [ @@ -37,21 +37,21 @@ class BaseScaffold extends StatelessWidget { Row( children: [ SizedBox( - width: mywidth / 8, - child: Image( - image: AssetImage('assets/logos/fcsc.png'),),), + width: mywidth / 8, + child: Image( + image: AssetImage('assets/logos/fcsc.png'))), ], ), Divider(), InkWell( - onTap: () => context.go('/Profile'), + onTap: () => context.go('/editProfile'), child: Row( children: [ SizedBox( - width: mywidth / 8, - child: Image( - image: AssetImage( - 'assets/edit_profile/profile.png',),),), + width: mywidth / 8, + child: Image( + image: AssetImage( + 'assets/edit_profile/profile.png'))), SizedBox( width: mywidth / 20, ), @@ -59,33 +59,24 @@ class BaseScaffold extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text('Mohammad'), - Text('Mohammad@fcsc.com'), + Text('Mohammad@fcsc.com') ], - ), + ) ], ), - ), + ) ], ), ), ListTile( leading: SizedBox( - height: myheight / 15, - width: mywidth / 15, - child: Image( - image: AssetImage('assets/icons/drawer/message.png'),),), + height: myheight / 15, + width: mywidth / 15, + child: Image( + image: AssetImage('assets/icons/drawer/message.png'))), title: Text('Feedback'), onTap: () => context.go('/feedback'), ), - ListTile( - leading: SizedBox( - height: myheight / 15, - width: mywidth / 15, - child: Image( - image: AssetImage('assets/icons/drawer/book.png'),),), - title: Text('User Guide'), - onTap: () => context.go('/user-guide'), - ), ListTile( leading: SizedBox( height: myheight / 15, @@ -95,6 +86,16 @@ class BaseScaffold extends StatelessWidget { title: Text('Manage User'), onTap: () => context.go('/manageuser'), ), + + ListTile( + leading: SizedBox( + height: myheight / 15, + width: mywidth / 15, + child: Image( + image: AssetImage('assets/icons/drawer/book.png'))), + title: Text('User Guide'), + onTap: () => context.go('/user-guide'), + ), ], ), ), @@ -125,7 +126,7 @@ class BaseScaffold extends StatelessWidget { width: mywidth / 15, child: Image( image: - AssetImage('assets/icons/bottom_bar/ranking.png'))), + AssetImage('assets/icons/bottom_bar/ranking.png'))), label: 'Competitiveness'), BottomNavigationBarItem( icon: SizedBox( diff --git a/pubspec.lock b/pubspec.lock index 67247bd5..3996cee4 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -130,10 +130,10 @@ packages: dependency: transitive description: name: built_value - sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + sha256: "28a712df2576b63c6c005c465989a348604960c0958d28be5303ba9baa841ac2" url: "https://pub.dev" source: hosted - version: "8.9.2" + version: "8.9.3" characters: dependency: transitive description: @@ -443,10 +443,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "9b78450b89f059e96c9ebb355fa6b3df1d6b330436e0b885fb49594c41721398" + sha256: "615a505aef59b151b46bbeef55b36ce2b6ed299d160c51d84281946f0aa0ce0e" url: "https://pub.dev" source: hosted - version: "2.0.23" + version: "2.0.24" flutter_rating_bar: dependency: "direct main" description: @@ -525,10 +525,10 @@ packages: dependency: "direct main" description: name: fluttertoast - sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" + sha256: "24467dc20bbe49fd63e57d8e190798c4d22cbbdac30e54209d153a15273721d1" url: "https://pub.dev" source: hosted - version: "8.2.8" + version: "8.2.10" freezed: dependency: "direct dev" description: @@ -557,10 +557,10 @@ packages: dependency: "direct main" description: name: get_it - sha256: c49895c1ecb0ee2a0ec568d39de882e2c299ba26355aa6744ab1001f98cebd15 + sha256: f126a3e286b7f5b578bf436d5592968706c4c1de28a228b870ce375d9f743103 url: "https://pub.dev" source: hosted - version: "8.0.2" + version: "8.0.3" glob: dependency: transitive description: @@ -621,10 +621,10 @@ packages: dependency: transitive description: name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.2" http_parser: dependency: transitive description: @@ -653,10 +653,10 @@ packages: dependency: transitive description: name: image_picker_android - sha256: fa8141602fde3f7e2f81dbf043613eb44dfa325fa0bcf93c0f142c9f7a2c193e + sha256: aa6f1280b670861ac45220cc95adc59bb6ae130259d36f980ccb62220dc5e59f url: "https://pub.dev" source: hosted - version: "0.8.12+18" + version: "0.8.12+19" image_picker_for_web: dependency: transitive description: @@ -841,6 +841,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.12.16+1" + material_charts: + dependency: "direct main" + description: + name: material_charts + sha256: ada5af96e9cdd9888c1931eaf307e6693408584ca0de1b1c795f9862590f9fcf + url: "https://pub.dev" + source: hosted + version: "0.0.25" material_color_utilities: dependency: transitive description: @@ -997,10 +1005,10 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + sha256: "81876843eb50dc2e1e5b151792c9a985c5ed2536914115ed04e9c8528f6647b0" url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" recase: dependency: transitive description: @@ -1076,42 +1084,42 @@ packages: dependency: "direct main" description: name: share_plus - sha256: "9c9bafd4060728d7cdb2464c341743adbd79d327cb067ec7afb64583540b47c8" + sha256: "6327c3f233729374d0abaafd61f6846115b2a481b4feddd8534211dc10659400" url: "https://pub.dev" source: hosted - version: "10.1.2" + version: "10.1.3" share_plus_platform_interface: dependency: transitive description: name: share_plus_platform_interface - sha256: c57c0bbfec7142e3a0f55633be504b796af72e60e3c791b44d5a017b985f7a48 + sha256: cc012a23fc2d479854e6c80150696c4a5f5bb62cb89af4de1c505cf78d0a5d0b url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "5.0.2" shared_preferences: dependency: "direct main" description: name: shared_preferences - sha256: "95f9997ca1fb9799d494d0cb2a780fd7be075818d59f00c43832ed112b158a82" + sha256: "3c7e73920c694a436afaf65ab60ce3453d91f84208d761fbd83fc21182134d93" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.3.4" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: "7f172d1b06de5da47b6264c2692ee2ead20bbbc246690427cdb4fc301cd0c549" + sha256: "02a7d8a9ef346c9af715811b01fbd8e27845ad2c41148eefd31321471b41863d" url: "https://pub.dev" source: hosted - version: "2.3.4" + version: "2.4.0" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: "07e050c7cd39bad516f8d64c455f04508d09df104be326d8c02551590a0d513d" + sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03" url: "https://pub.dev" source: hosted - version: "2.5.3" + version: "2.5.4" shared_preferences_linux: dependency: transitive description: @@ -1184,10 +1192,10 @@ packages: dependency: transitive description: name: source_helper - sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" + sha256: "86d247119aedce8e63f4751bd9626fc9613255935558447569ad42f9f5b48b3c" url: "https://pub.dev" source: hosted - version: "1.3.4" + version: "1.3.5" source_span: dependency: transitive description: @@ -1232,10 +1240,10 @@ packages: dependency: transitive description: name: stream_transform - sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: @@ -1408,10 +1416,10 @@ packages: dependency: transitive description: name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" web: dependency: transitive description: @@ -1448,10 +1456,10 @@ packages: dependency: transitive description: name: webview_flutter_android - sha256: "285cedfd9441267f6cca8843458620b5fda1af75b04f5818d0441acda5d7df19" + sha256: "3d535126f7244871542b2f0b0fcf94629c9a14883250461f9abe1a6644c1c379" url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.2.0" webview_flutter_platform_interface: dependency: transitive description: @@ -1496,10 +1504,10 @@ packages: dependency: transitive description: name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" sdks: - dart: ">=3.5.0 <4.0.0" + dart: ">=3.5.2 <4.0.0" flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index 3fac9859..a223630d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -54,7 +54,8 @@ dependencies: provider: ^6.1.2 mailer: ^6.2.0 image_picker: ^1.1.2 - syncfusion_flutter_charts: ^28.1.33 + syncfusion_flutter_charts: 28.1.33 + material_charts: ^0.0.23 dependency_overrides: fading_edge_scrollview: ^4.1.1