charts changes
This commit is contained in:
parent
e9074e4c93
commit
3b64a5e970
@ -20,12 +20,12 @@ if (project.hasProperty('google-services.json')) {
|
|||||||
|
|
||||||
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
|
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
|
||||||
if (flutterVersionCode == null) {
|
if (flutterVersionCode == null) {
|
||||||
flutterVersionCode = "32"
|
flutterVersionCode = "33"
|
||||||
}
|
}
|
||||||
|
|
||||||
def flutterVersionName = localProperties.getProperty("flutter.versionName")
|
def flutterVersionName = localProperties.getProperty("flutter.versionName")
|
||||||
if (flutterVersionName == null) {
|
if (flutterVersionName == null) {
|
||||||
flutterVersionName = "1.0.31"
|
flutterVersionName = "1.0.32"
|
||||||
}
|
}
|
||||||
|
|
||||||
def keystorePropertiesFile = rootProject.file("key.properties")
|
def keystorePropertiesFile = rootProject.file("key.properties")
|
||||||
|
|||||||
@ -571,7 +571,7 @@ class ChartWidget extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 45),
|
SizedBox(height: 55),
|
||||||
Expanded(
|
Expanded(
|
||||||
// child: SingleChildScrollView(
|
// child: SingleChildScrollView(
|
||||||
// scrollDirection: Axis.horizontal,
|
// scrollDirection: Axis.horizontal,
|
||||||
@ -1037,19 +1037,14 @@ class ChartWidget extends StatelessWidget {
|
|||||||
final List<Color> uniqueColorsLine_trend_2 = [
|
final List<Color> uniqueColorsLine_trend_2 = [
|
||||||
Color(0xFF6097CD),
|
Color(0xFF6097CD),
|
||||||
Color(0xFFD086A7),
|
Color(0xFFD086A7),
|
||||||
Color(0xFF98BCE5),
|
|
||||||
Color(0xFFA7B5C5),
|
|
||||||
Color(0xFFBED3EC),
|
|
||||||
Color(0xFFD4E3F4),
|
|
||||||
];
|
];
|
||||||
Set<int> selectedYears = {1970, 1980, 1990, 2000, 2010, 2020};
|
Set<int> selectedYears = {1970, 1980, 1990, 2000, 2010, 2020};
|
||||||
Map<String, Color> groupColorMap = {};
|
Map<String, Color> groupColorMap = {};
|
||||||
int colorIndex = 0;
|
int colorIndex = 0;
|
||||||
// for (String group in groupByValues) {
|
// for (String group in groupByValues) {
|
||||||
// // groupColorMap[group] = adjustColorlineTrend(bodyColor, colorIndex);
|
// // groupColorMap[group] = uniqueColors[colorIndex % uniqueColors.length];
|
||||||
// groupColorMap[group] = uniqueColors[colorIndex % uniqueColors.length];
|
// groupColorMap[group] = uniqueColorsLine_trend_2[
|
||||||
// // groupColorMap[group] = uniqueColorsLine_trend_2[
|
// colorIndex % uniqueColorsLine_trend_2.length];
|
||||||
// // colorIndex % uniqueColorsLine_trend_2.length];
|
|
||||||
// colorIndex++;
|
// colorIndex++;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@ -1089,22 +1084,35 @@ class ChartWidget extends StatelessWidget {
|
|||||||
|
|
||||||
var chartBarColors = chartData['chart_bar_color'] ?? {};
|
var chartBarColors = chartData['chart_bar_color'] ?? {};
|
||||||
Map<String, String> barColorsMap = {};
|
Map<String, String> barColorsMap = {};
|
||||||
|
|
||||||
chartBarColors.forEach((key, value) {
|
chartBarColors.forEach((key, value) {
|
||||||
barColorsMap[key] = value.toString(); // Ensure values are strings
|
barColorsMap[key] = value.toString(); // Ensure values are strings
|
||||||
});
|
});
|
||||||
bool hasBarColors = barColorsMap.isNotEmpty;
|
bool hasBarColors = barColorsMap.isNotEmpty;
|
||||||
|
// var chartBarColorsRaw = chartData['chart_bar_color'] ?? {};
|
||||||
|
// // Convert LinkedMap<dynamic, dynamic> to Map<String, String>
|
||||||
|
// Map<String, String> chartBarColrs =
|
||||||
|
// Map<String, String>.from(chartBarColorsRaw);
|
||||||
|
// // Now map to Color
|
||||||
|
// Map<String, Color> parsedChartBarColors =
|
||||||
|
// chartBarColrs.map((key, value) {
|
||||||
|
// return MapEntry(key, _hexToColor(value));
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
|
||||||
var chartBarColorsRaw = chartData['chart_bar_color'] ?? {};
|
List<dynamic> keys = chartBarColors['key'] ?? [];
|
||||||
|
List<dynamic> colors = chartBarColors['color'] ?? [];
|
||||||
|
|
||||||
// Convert LinkedMap<dynamic, dynamic> to Map<String, String>
|
print('RT1keys - $keys');
|
||||||
Map<String, String> chartBarColrs =
|
print('RT1colors - $colors');
|
||||||
Map<String, String>.from(chartBarColorsRaw);
|
|
||||||
|
|
||||||
// Now map to Color
|
// Convert to a map for easy lookup
|
||||||
Map<String, Color> parsedChartBarColors =
|
Map<String, Color> parsedChartBarColors = {};
|
||||||
chartBarColrs.map((key, value) {
|
for (int i = 0; i < keys.length; i++) {
|
||||||
return MapEntry(key, _hexToColor(value));
|
parsedChartBarColors[keys[i].toString()] =
|
||||||
});
|
_hexToColor(colors[i].toString());
|
||||||
|
}
|
||||||
|
print('RTLinr1 - $parsedChartBarColors');
|
||||||
|
|
||||||
for (String group in groupByValues) {
|
for (String group in groupByValues) {
|
||||||
if (parsedChartBarColors.containsKey(group)) {
|
if (parsedChartBarColors.containsKey(group)) {
|
||||||
@ -1718,7 +1726,7 @@ class ChartWidget extends StatelessWidget {
|
|||||||
fitInsideHorizontally: true,
|
fitInsideHorizontally: true,
|
||||||
fitInsideVertically: true,
|
fitInsideVertically: true,
|
||||||
tooltipPadding: const EdgeInsets.all(5),
|
tooltipPadding: const EdgeInsets.all(5),
|
||||||
tooltipMargin: 5,
|
tooltipMargin: 12,
|
||||||
getTooltipColor: (group) => Colors.transparent,
|
getTooltipColor: (group) => Colors.transparent,
|
||||||
getTooltipItem: (group, groupIndex, rod, rodIndex) {
|
getTooltipItem: (group, groupIndex, rod, rodIndex) {
|
||||||
if (rod.toY == 0) return null;
|
if (rod.toY == 0) return null;
|
||||||
@ -2151,28 +2159,44 @@ class ChartWidget extends StatelessWidget {
|
|||||||
double maxHeight = 500.0; // Maximum chart height
|
double maxHeight = 500.0; // Maximum chart height
|
||||||
|
|
||||||
// Calculate total height dynamically
|
// Calculate total height dynamically
|
||||||
double chartHeight =
|
// double chartHeight =
|
||||||
((numberOfBars * barHeight) + ((numberOfBars - 1) * barSpacing))
|
// ((numberOfBars * barHeight) + ((numberOfBars - 1) * barSpacing))
|
||||||
.clamp(minHeight, maxHeight);
|
// .clamp(minHeight, maxHeight);
|
||||||
|
|
||||||
var chartBarColors = chartData['chart_bar_color'] ?? {};
|
var chartBarColors = chartData['chart_bar_color'] ?? {};
|
||||||
Map<String, String> barColorsMap = {};
|
Map<String, String> barColorsMap = {};
|
||||||
chartBarColors.forEach((key, value) {
|
// chartBarColors.forEach((key, value) {
|
||||||
barColorsMap[key] = value.toString(); // Ensure values are strings
|
// barColorsMap[key] = value.toString(); // Ensure values are strings
|
||||||
});
|
// });
|
||||||
bool hasBarColors = barColorsMap.isNotEmpty;
|
// bool hasBarColors = barColorsMap.isNotEmpty;
|
||||||
|
|
||||||
var chartBarColorsRaw = chartData['chart_bar_color'] ?? {};
|
var chartBarColorsRaw = chartData['chart_bar_color'] ?? {};
|
||||||
|
|
||||||
// Convert LinkedMap<dynamic, dynamic> to Map<String, String>
|
// // Convert LinkedMap<dynamic, dynamic> to Map<String, String>
|
||||||
Map<String, String> chartBarColrs =
|
// Map<String, String> chartBarColrs =
|
||||||
Map<String, String>.from(chartBarColorsRaw);
|
// Map<String, String>.from(chartBarColorsRaw);
|
||||||
|
//
|
||||||
|
// // Now map to Color
|
||||||
|
// Map<String, Color> parsedChartBarColors =
|
||||||
|
// chartBarColrs.map((key, value) {
|
||||||
|
// print('HorizontalLegends1 -$key');
|
||||||
|
// return MapEntry(key, _hexToColor(value));
|
||||||
|
// });
|
||||||
|
|
||||||
// Now map to Color
|
List<dynamic> keys = chartBarColors['key'] ?? [];
|
||||||
Map<String, Color> parsedChartBarColors =
|
List<dynamic> colors = chartBarColors['color'] ?? [];
|
||||||
chartBarColrs.map((key, value) {
|
|
||||||
return MapEntry(key, _hexToColor(value));
|
print('RT1keys - $keys');
|
||||||
});
|
print('RT1colors - $colors');
|
||||||
|
|
||||||
|
// Convert to a map for easy lookup
|
||||||
|
Map<String, Color> parsedChartBarColors = {};
|
||||||
|
for (int i = 0; i < keys.length; i++) {
|
||||||
|
parsedChartBarColors[keys[i].toString()] =
|
||||||
|
_hexToColor(colors[i].toString());
|
||||||
|
}
|
||||||
|
print('RT1 - $parsedChartBarColors');
|
||||||
|
bool hasBarColors = parsedChartBarColors.isNotEmpty;
|
||||||
|
|
||||||
return Column(children: [
|
return Column(children: [
|
||||||
Text(
|
Text(
|
||||||
@ -2203,7 +2227,7 @@ class ChartWidget extends StatelessWidget {
|
|||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
// width: 500,
|
// width: 500,
|
||||||
// width: 1000,
|
// width: 1000,
|
||||||
height: chartHeight,
|
// height: chartHeight,
|
||||||
child: Stack(children: [
|
child: Stack(children: [
|
||||||
BarChart(
|
BarChart(
|
||||||
BarChartData(
|
BarChartData(
|
||||||
@ -2216,34 +2240,33 @@ class ChartWidget extends StatelessWidget {
|
|||||||
touchTooltipData: BarTouchTooltipData(
|
touchTooltipData: BarTouchTooltipData(
|
||||||
// getTooltipColor: (group) => Colors.black12,
|
// getTooltipColor: (group) => Colors.black12,
|
||||||
getTooltipColor: (group) => Colors.transparent,
|
getTooltipColor: (group) => Colors.transparent,
|
||||||
tooltipHorizontalAlignment:
|
tooltipHorizontalAlignment: FLHorizontalAlignment.center,
|
||||||
FLHorizontalAlignment.center,
|
|
||||||
tooltipRoundedRadius: 8,
|
tooltipRoundedRadius: 8,
|
||||||
fitInsideHorizontally:
|
fitInsideHorizontally:
|
||||||
true, // Ensure it fits within the screen
|
true, // Ensure it fits within the screen
|
||||||
fitInsideVertically: true,
|
fitInsideVertically: true,
|
||||||
tooltipPadding: EdgeInsets.only(
|
tooltipPadding: EdgeInsets.only(
|
||||||
left: 3, right: 3, top: 0.5, bottom: 1),
|
left: 5, right: 3, top: 0.5, bottom: 1),
|
||||||
tooltipMargin: 16,
|
|
||||||
|
tooltipMargin: 20,
|
||||||
|
|
||||||
// Only show tooltip when touched
|
// Only show tooltip when touched
|
||||||
getTooltipItem: (group, groupIndex, rod, rodIndex) {
|
getTooltipItem: (group, groupIndex, rod, rodIndex) {
|
||||||
// if (rod.toY == 0 || touchedGroupIndex == -1) {
|
// if (rod.toY == 0 || touchedGroupIndex == -1) {
|
||||||
// return null; // Don't show the tooltip if the value is 0 or there's no touch
|
// return null; // Don't show the tooltip if the value is 0 or there's no touch
|
||||||
// }
|
// }
|
||||||
// Hide tooltips for 0 values
|
// Hide tooltips for 0 values
|
||||||
if (rod.toY == 0)
|
if (rod.toY == 0) return null; // Hide for zero values
|
||||||
return null; // Hide for zero values
|
|
||||||
|
|
||||||
// if (groupIndex == touchedGroupIndex) {
|
// if (groupIndex == touchedGroupIndex) {
|
||||||
// print('Group Index: $groupIndex, Group : $group');
|
// print('Group Index: $groupIndex, Group : $group');
|
||||||
|
|
||||||
// Get the group label dynamically
|
// Get the group label dynamically
|
||||||
String groupLabel =
|
String groupLabel = groupByValues.elementAt(groupIndex);
|
||||||
groupByValues.elementAt(groupIndex);
|
|
||||||
|
|
||||||
// Fetch the crop for the current group from groupedCrops
|
// Fetch the crop for the current group from groupedCrops
|
||||||
String cropType =
|
String cropType = groupByValues.elementAt(groupIndex);
|
||||||
groupByValues.elementAt(groupIndex);
|
|
||||||
String crop = groupedCrops[cropType]![rodIndex];
|
String crop = groupedCrops[cropType]![rodIndex];
|
||||||
double value = rod.toY;
|
double value = rod.toY;
|
||||||
|
|
||||||
@ -2375,10 +2398,10 @@ class ChartWidget extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
rightTitles: AxisTitles(
|
rightTitles:
|
||||||
sideTitles: SideTitles(showTitles: false)),
|
AxisTitles(sideTitles: SideTitles(showTitles: false)),
|
||||||
topTitles: AxisTitles(
|
topTitles:
|
||||||
sideTitles: SideTitles(showTitles: false)),
|
AxisTitles(sideTitles: SideTitles(showTitles: false)),
|
||||||
),
|
),
|
||||||
borderData: FlBorderData(
|
borderData: FlBorderData(
|
||||||
show: true,
|
show: true,
|
||||||
@ -2592,6 +2615,7 @@ class ChartWidget extends StatelessWidget {
|
|||||||
// // groupColorMap[group] = adjustColorlineTrend(bodyColor, colorIndex);
|
// // groupColorMap[group] = adjustColorlineTrend(bodyColor, colorIndex);
|
||||||
// colorIndex++;
|
// colorIndex++;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
for (String group in groupByValues) {
|
for (String group in groupByValues) {
|
||||||
if (chartBarColors.isNotEmpty && chartBarColors.containsKey(group)) {
|
if (chartBarColors.isNotEmpty && chartBarColors.containsKey(group)) {
|
||||||
// Use predefined color from chartBarColors
|
// Use predefined color from chartBarColors
|
||||||
@ -3225,8 +3249,8 @@ class ChartWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Apply different buffers based on maxY value
|
// Apply different buffers based on maxY value
|
||||||
return maxY < 500 ? maxY * 3.5 : maxY * 1.5;
|
// return maxY < 500 ? maxY * 3.5 : maxY * 1.5;
|
||||||
// return maxY * 1.5; // Add 10% buffer for better visualization
|
return maxY * 1.5; // Add 10% buffer for better visualization
|
||||||
}
|
}
|
||||||
|
|
||||||
List<BarChartGroupData> _buildHorizontalRotateBarGroups(
|
List<BarChartGroupData> _buildHorizontalRotateBarGroups(
|
||||||
@ -3313,6 +3337,9 @@ class ChartWidget extends StatelessWidget {
|
|||||||
Map<String, Color> chartBarColors) {
|
Map<String, Color> chartBarColors) {
|
||||||
List<dynamic> responseData = chartData['response'];
|
List<dynamic> responseData = chartData['response'];
|
||||||
List<BarChartGroupData> barGroups = [];
|
List<BarChartGroupData> barGroups = [];
|
||||||
|
|
||||||
|
print('chartBarColorsRota- $chartBarColors');
|
||||||
|
|
||||||
// Define two shades for alternating colors
|
// Define two shades for alternating colors
|
||||||
List<Color> uniqueColorsForTwo = [
|
List<Color> uniqueColorsForTwo = [
|
||||||
chartBarColors['default'] ?? Colors.blue, // Original color
|
chartBarColors['default'] ?? Colors.blue, // Original color
|
||||||
@ -3330,6 +3357,21 @@ class ChartWidget extends StatelessWidget {
|
|||||||
return entry['ObsKey'][chartData['group_by']] == groupValue;
|
return entry['ObsKey'][chartData['group_by']] == groupValue;
|
||||||
}).toList();
|
}).toList();
|
||||||
|
|
||||||
|
Map<String, String> genderMapping = {
|
||||||
|
'ذكر': 'Male', // Arabic for Male
|
||||||
|
'أنثى': 'Female' // Arabic for Female
|
||||||
|
};
|
||||||
|
|
||||||
|
// Sort data so "Male" appears first, "Female" second
|
||||||
|
groupData.sort((a, b) {
|
||||||
|
String genderA =
|
||||||
|
genderMapping[a['ObsKey']['GENDER']] ?? a['ObsKey']['GENDER'] ?? "";
|
||||||
|
String genderB =
|
||||||
|
genderMapping[b['ObsKey']['GENDER']] ?? b['ObsKey']['GENDER'] ?? "";
|
||||||
|
|
||||||
|
return (genderA == 'Male' ? 0 : 1).compareTo(genderB == 'Male' ? 0 : 1);
|
||||||
|
});
|
||||||
|
|
||||||
// Create BarChartRodData for each bar in the group
|
// Create BarChartRodData for each bar in the group
|
||||||
List<BarChartRodData> barRods = groupData.map((data) {
|
List<BarChartRodData> barRods = groupData.map((data) {
|
||||||
double value =
|
double value =
|
||||||
@ -3337,8 +3379,11 @@ class ChartWidget extends StatelessWidget {
|
|||||||
|
|
||||||
// Get gender-based color
|
// Get gender-based color
|
||||||
String gender = data['ObsKey']['GENDER'] ?? "";
|
String gender = data['ObsKey']['GENDER'] ?? "";
|
||||||
|
// Convert Arabic gender to English if necessary
|
||||||
|
String normalizedGender = genderMapping[gender] ?? gender;
|
||||||
|
|
||||||
List<BarChartGroupData> barGroups = [];
|
print('horizontalRotateGender - $gender');
|
||||||
|
// Map Arabic gender values to English equivalents
|
||||||
|
|
||||||
// Determine color dynamically
|
// Determine color dynamically
|
||||||
Color barColor;
|
Color barColor;
|
||||||
@ -3347,8 +3392,8 @@ class ChartWidget extends StatelessWidget {
|
|||||||
colorIndex % 2]; // Alternate between two colors
|
colorIndex % 2]; // Alternate between two colors
|
||||||
colorIndex++; // Update index for next bar
|
colorIndex++; // Update index for next bar
|
||||||
} else {
|
} else {
|
||||||
barColor = chartBarColors[gender] ??
|
// barColor = chartBarColors[gender] ?? Colors.grey; // Default gender-based color
|
||||||
Colors.grey; // Default gender-based color
|
barColor = chartBarColors[normalizedGender] ?? Colors.grey;
|
||||||
}
|
}
|
||||||
|
|
||||||
print('GEG- $gender');
|
print('GEG- $gender');
|
||||||
@ -3391,6 +3436,9 @@ Widget _buildChartLegend(
|
|||||||
Set<String> uniqueCropTypes =
|
Set<String> uniqueCropTypes =
|
||||||
groupedCrops.values.expand((list) => list).toSet();
|
groupedCrops.values.expand((list) => list).toSet();
|
||||||
|
|
||||||
|
print('HorizontalLegends2 -$uniqueCropTypes');
|
||||||
|
print('HorizontalLegends -$parsedChartBarColors');
|
||||||
|
|
||||||
return Wrap(
|
return Wrap(
|
||||||
alignment: WrapAlignment.center,
|
alignment: WrapAlignment.center,
|
||||||
spacing: 12,
|
spacing: 12,
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:uae_stat/domain/use_cases/language.dart';
|
import 'package:uae_stat/domain/use_cases/language.dart';
|
||||||
|
|
||||||
import 'package:uae_stat/infrastructure/services/img_asset_paths/icons/enquiry_asset_icon_path.dart';
|
import 'package:uae_stat/infrastructure/services/img_asset_paths/icons/enquiry_asset_icon_path.dart';
|
||||||
|
|
||||||
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:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
|
||||||
class Contact extends StatefulWidget {
|
class Contact extends StatefulWidget {
|
||||||
const Contact({super.key});
|
const Contact({super.key});
|
||||||
|
|
||||||
@ -14,132 +19,212 @@ class _ContactState extends State<Contact> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final double screenWidth = MediaQuery.of(context).size.width;
|
final double screenWidth = MediaQuery.of(context).size.width;
|
||||||
final double screenHeight= MediaQuery.of(context).size.height;
|
|
||||||
|
|
||||||
|
// final double screenHeight = MediaQuery.of(context).size.height;
|
||||||
|
|
||||||
return BaseScaffold(
|
return BaseScaffold(
|
||||||
body: Container(
|
body: Container(
|
||||||
color: Colors.grey[200],
|
color: Colors.grey[200],
|
||||||
width: screenWidth,
|
width: screenWidth,
|
||||||
padding: EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
buildContactCard(
|
||||||
|
context,
|
||||||
|
title: 'DUBAI - EMIRATES TOWER -32ND FLOOR',
|
||||||
|
titleAr: 'دبي - أبراج الإمارات - الطابق 32',
|
||||||
|
details: [
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.building,
|
||||||
|
'text': 'Office : Dubai - Emirates Tower -32nd Floor',
|
||||||
|
'textAr': 'المقر الرئيسي : دبي - أبراج الإمارات - الطابق 32'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.phone,
|
||||||
|
'text': 'Tel : 00971 46080000',
|
||||||
|
'textAr': 'الهاتف : 0097146080000'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.fax,
|
||||||
|
'text': 'Fax : 0097143273535',
|
||||||
|
'textAr': 'فاكس : 0097143273535'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.map,
|
||||||
|
'text': 'P.O.Box : 127000 Dubai',
|
||||||
|
'textAr': 'ص.ب: : 127000 دبي'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.at,
|
||||||
|
'text': 'Email Address : info@fcsc.gov.ae',
|
||||||
|
'textAr': 'البريد الإلكتروني : info@fcsc.gov.ae'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.map,
|
||||||
|
'text': 'Latitude : 25.223926',
|
||||||
|
'textAr': 'خط العرض : 25.223926'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.map,
|
||||||
|
'text': 'Longitude : 55.350526',
|
||||||
|
'textAr': 'خط الطول : 55.350526'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
buildContactCard(
|
||||||
|
context,
|
||||||
|
title: 'MEDIA SECTION',
|
||||||
|
titleAr: 'قسم الاعلام',
|
||||||
|
details: [
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.building,
|
||||||
|
'text': 'Office : Media Section',
|
||||||
|
'textAr': 'المقر الرئيسي : قسم الاعلام'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.phone,
|
||||||
|
'text': 'Tel : 00971 46080000',
|
||||||
|
'textAr': 'الهاتف : 0097146080000'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.fax,
|
||||||
|
'text': 'Fax : 0097143273535',
|
||||||
|
'textAr': 'فاكس : 0097143273535'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.map,
|
||||||
|
'text': 'P.O.Box : 127000 Dubai',
|
||||||
|
'textAr': 'ص.ب: : 127000 دبي'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.at,
|
||||||
|
'text': 'Email Address : GCO@fcsc.gov.ae',
|
||||||
|
'textAr': 'البريد الإلكتروني : GCO@fcsc.gov.ae'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.map,
|
||||||
|
'text': 'Latitude : 25.223926',
|
||||||
|
'textAr': 'خط العرض : 25.223926'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.map,
|
||||||
|
'text': 'Longitude : 55.350526',
|
||||||
|
'textAr': 'خط الطول : 55.350526'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
buildContactCard(
|
||||||
|
context,
|
||||||
|
title: 'SGDS',
|
||||||
|
titleAr: 'أهداف التنمية المستدامة',
|
||||||
|
details: [
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.building,
|
||||||
|
'text': 'Office : SDGs',
|
||||||
|
'textAr': 'المقر الرئيسي : أهداف التنمية المستدامة'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.phone,
|
||||||
|
'text': 'Tel : 00971 46080000',
|
||||||
|
'textAr': 'الهاتف : 0097146080000'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.fax,
|
||||||
|
'text': 'Fax : 0097143273535',
|
||||||
|
'textAr': 'فاكس : 0097143273535'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.map,
|
||||||
|
'text': 'P.O.Box : 127000 Dubai',
|
||||||
|
'textAr': 'ص.ب: : 127000 دبي'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.at,
|
||||||
|
'text': 'Email Address : sdgs@fcsc.gov.ae',
|
||||||
|
'textAr': 'البريد الإلكتروني : sdgs@fcsc.gov.ae'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.map,
|
||||||
|
'text': 'Latitude : 25.223926',
|
||||||
|
'textAr': 'خط العرض : 25.223926'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': EnquiryAssetIconPath.map,
|
||||||
|
'text': 'Longitude : 55.350526',
|
||||||
|
'textAr': 'خط الطول : 55.350526'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
title: Text(context.translate('Contact Us', 'اتصل بنا')),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildContactCard(BuildContext context,
|
||||||
|
{required String title,
|
||||||
|
required String titleAr,
|
||||||
|
required List<Map<String, String>> details}) {
|
||||||
|
return Container(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 12),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.circular(4.0), // Slight curve
|
borderRadius: BorderRadius.circular(6.0),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: Colors.black.withOpacity(0.05),
|
||||||
|
blurRadius: 5,
|
||||||
|
offset: Offset(0, 2),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
padding: EdgeInsets.all(7.0),
|
|
||||||
height: screenHeight*0.35,
|
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(context.translate('DUBAI - EMIRATES TOWER -32ND FLOOR','دبي - أبراج الإمارات - الطابق 32'),
|
Text(
|
||||||
style: TextStyle(
|
context.translate(title, titleAr),
|
||||||
|
style: const TextStyle(
|
||||||
color: Color(0xFF265E84),
|
color: Color(0xFF265E84),
|
||||||
fontSize: 20,
|
fontSize: 18,
|
||||||
fontFamily: 'Roboto',
|
fontWeight: FontWeight.w600,
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
buildTextRow(EnquiryAssetIconPath.building,context.translate('Office : Dubai - Emirates Tower -32nd Floor','المقر الرئيسي : دبي - أبراج الإمارات - الطابق 32')),
|
const SizedBox(height: 8),
|
||||||
buildTextRow(EnquiryAssetIconPath.phone,context.translate('Tel : 00971 46080000','الهاتف : 0097146080000'),),
|
...details.map((item) => buildTextRow(item['icon']!,
|
||||||
buildTextRow(EnquiryAssetIconPath.fax, context.translate('Fax : 0097143273535','فاكس : 0097143273535')),
|
context.translate(item['text']!, item['textAr']!))),
|
||||||
buildTextRow(EnquiryAssetIconPath.map, context.translate('P.O.Box : 127000 Dubai','ص.ب: : 127000 دبي')),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.at, context.translate('Email Address : info@fcsc.gov.ae','البريد الإلكتروني : info@fcsc.gov.ae')),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.map,context.translate( 'Latitude : 25.223926','خط العرض : 25.223926')),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.map, context.translate('Longitude : 55.350526','خط الطول : 55.350526')),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
SizedBox(height: 10,),
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(7.0),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(4.0), // Slight curve
|
|
||||||
),
|
|
||||||
height: screenHeight*0.34,
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(context.translate('MEDIA SECTION','قسم الاعلام'),
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xFF265E84),
|
|
||||||
fontSize: 20,
|
|
||||||
fontFamily: 'Roboto',
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.building,context.translate('Office : Media Section','المقر الرئيسي : قسم الاعلام')),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.phone,context.translate('Tel : 00971 46080000','الهاتف : 0097146080000'),),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.fax, context.translate('Fax : 0097143273535','فاكس : 0097143273535')),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.map, context.translate('P.O.Box : 127000 Dubai','ص.ب: : 127000 دبي')),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.at, context.translate('Email Address : GCO@fcsc.gov.ae','البريد الإلكتروني : GCO@fcsc.gov.ae')),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.map,context.translate( 'Latitude : 25.223926','خط العرض : 25.223926')),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.map, context.translate('Longitude : 55.350526','خط الطول : 55.350526')),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 10,),
|
|
||||||
Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(4.0), // Slight curve
|
|
||||||
),
|
|
||||||
padding: EdgeInsets.all(7.0),
|
|
||||||
height: screenHeight*0.34,
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(context.translate('SGDS','أهداف التنمية المستدامة'),
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xFF265E84),
|
|
||||||
fontSize: 20,
|
|
||||||
fontFamily: 'Roboto',
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.building,context.translate('Office : SDGs','المقر الرئيسي : أهداف التنمية المستدامة')),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.phone,context.translate('Tel : 00971 46080000','الهاتف : 0097146080000'),),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.fax, context.translate('Fax : 0097143273535','فاكس : 0097143273535')),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.map, context.translate('P.O.Box : 127000 Dubai','ص.ب: : 127000 دبي')),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.at, context.translate('Email Address : sdgs@fcsc.gov.ae','البريد الإلكتروني : sdgs@fcsc.gov.ae')),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.map,context.translate( 'Latitude : 25.223926','خط العرض : 25.223926')),
|
|
||||||
buildTextRow(EnquiryAssetIconPath.map, context.translate('Longitude : 55.350526','خط الطول : 55.350526')),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
), title: Text(context.translate('Contact Us','اتصل بنا')),);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget buildTextRow(String iconName, String text) {
|
Widget buildTextRow(String iconName, String text) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.only(top:8.0),
|
padding: const EdgeInsets.symmetric(vertical: 5.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
SvgPicture.asset(
|
SvgPicture.asset(
|
||||||
iconName,
|
iconName,
|
||||||
semanticsLabel: 'Filter',
|
semanticsLabel: 'Icon',
|
||||||
width: 24,
|
width: 20,
|
||||||
height: 24,
|
height: 20,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
text,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: Color(0xFF5F5F5F),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8), // Add spacing if needed
|
|
||||||
Text(
|
|
||||||
text, // Dynamic text
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16,
|
|
||||||
color: Color(0xFF878787),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
name: uae_stat
|
name: uae_stat
|
||||||
description: "View statistics about the UAE from the Federal Center for Statistics and Competitiveness."
|
description: "View statistics about the UAE from the Federal Center for Statistics and Competitiveness."
|
||||||
publish_to: "none"
|
publish_to: "none"
|
||||||
version: 1.0.31+32
|
version: 1.0.32+33
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.2.3 <4.0.0"
|
sdk: ">=3.2.3 <4.0.0"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user