merge commit

This commit is contained in:
Kalonkarthik 2025-02-20 18:09:42 +05:30
commit 349c815f63
4 changed files with 904 additions and 456 deletions

View File

@ -15,12 +15,12 @@ if (localPropertiesFile.exists()) {
def flutterVersionCode = localProperties.getProperty("flutter.versionCode") def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
if (flutterVersionCode == null) { if (flutterVersionCode == null) {
flutterVersionCode = "20" flutterVersionCode = "24"
} }
def flutterVersionName = localProperties.getProperty("flutter.versionName") def flutterVersionName = localProperties.getProperty("flutter.versionName")
if (flutterVersionName == null) { if (flutterVersionName == null) {
flutterVersionName = "1.0.19" flutterVersionName = "1.0.23"
} }
def keystorePropertiesFile = rootProject.file("key.properties") def keystorePropertiesFile = rootProject.file("key.properties")

View File

@ -80,7 +80,7 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
print(' bgColor $bgColor'); print(' bgColor $bgColor');
// fetchChartData(widget.dataSets); // fetchChartData(widget.dataSets);
checkIfBookmarked(); checkIfBookmarked();
locale = ref.read(localeProvider)?? const Locale('en'); locale = ref.read(localeProvider) ?? const Locale('en');
fetchChartData(widget.dataSets, locale?.languageCode ?? 'en').then((_) { fetchChartData(widget.dataSets, locale?.languageCode ?? 'en').then((_) {
if (_tabsData.isNotEmpty) { if (_tabsData.isNotEmpty) {
// Call onTabSelected for the first tab // Call onTabSelected for the first tab
@ -310,6 +310,7 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
), ),
); );
} }
//when the popup need for bookmark //when the popup need for bookmark
// void showAddBookmarkDialog() { // void showAddBookmarkDialog() {
// double myheight = MediaQuery.of(context).size.height; // double myheight = MediaQuery.of(context).size.height;
@ -398,15 +399,15 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
// } // }
void showAddBookmarkDialog() { void showAddBookmarkDialog() {
addBookmark(); addBookmark();
ScaffoldMessenger.of(context).showSnackBar( // ScaffoldMessenger.of(context).showSnackBar(
SnackBar( // SnackBar(
content: Text( // content: Text(
'The bookmark is added successfully', // 'The bookmark is added successfully',
), // ),
backgroundColor: Colors.green, // backgroundColor: Colors.green,
duration: Duration(seconds: 2), // duration: Duration(seconds: 2),
), // ),
); // );
} }
void handleSkip() { void handleSkip() {
@ -539,9 +540,14 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: locale.languageCode=='ar' ? Color(0xFF7DAFBC):null, color: locale.languageCode == 'ar'
? Color(0xFF7DAFBC)
: null,
border: Border.all( border: Border.all(
color:locale.languageCode=='ar' ? Color(0xFF7DAFBC): Colors.white, width: 2.0), color: locale.languageCode == 'ar'
? Color(0xFF7DAFBC)
: Colors.white,
width: 2.0),
), ),
child: IconButton( child: IconButton(
iconSize: 20, iconSize: 20,
@ -551,8 +557,13 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
if (locale.languageCode == 'ar') { if (locale.languageCode == 'ar') {
tutorialCoachMark.next(); tutorialCoachMark.next();
} else { } else {
ref.read(chartsTourProvider.notifier).state = true; ref
ref.read(previousHomeTourProvider.notifier).state = false; .read(chartsTourProvider.notifier)
.state = true;
ref
.read(previousHomeTourProvider
.notifier)
.state = false;
tutorialCoachMark.finish(); tutorialCoachMark.finish();
} }
}, },
@ -562,9 +573,14 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: locale.languageCode=='ar' ? null:Color(0xFF7DAFBC), color: locale.languageCode == 'ar'
? null
: Color(0xFF7DAFBC),
border: Border.all( border: Border.all(
color:locale.languageCode=='ar' ? Colors.white: Color(0xFF7DAFBC), width: 1), color: locale.languageCode == 'ar'
? Colors.white
: Color(0xFF7DAFBC),
width: 1),
), ),
child: IconButton( child: IconButton(
iconSize: 20, iconSize: 20,
@ -572,8 +588,13 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
color: Colors.white), color: Colors.white),
onPressed: () { onPressed: () {
if (locale.languageCode == 'ar') { if (locale.languageCode == 'ar') {
ref.read(chartsTourProvider.notifier).state = true; ref
ref.read(previousHomeTourProvider.notifier).state = false; .read(chartsTourProvider.notifier)
.state = true;
ref
.read(previousHomeTourProvider
.notifier)
.state = false;
tutorialCoachMark.finish(); tutorialCoachMark.finish();
} else { } else {
tutorialCoachMark.next(); tutorialCoachMark.next();
@ -627,7 +648,7 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
text: AppLocalizations.of(context)!.bookMark, text: AppLocalizations.of(context)!.bookMark,
alignment: ContentAlign.bottom, alignment: ContentAlign.bottom,
gap: 53, gap: 53,
space: screenWidth*0.22, space: screenWidth * 0.22,
), ),
TargetContent( TargetContent(
align: ContentAlign.bottom, align: ContentAlign.bottom,
@ -682,18 +703,29 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: locale.languageCode=='ar' ? Color(0xFF7DAFBC):null, color: locale.languageCode == 'ar'
? Color(0xFF7DAFBC)
: null,
border: Border.all( border: Border.all(
color:locale.languageCode=='ar' ? Color(0xFF7DAFBC): Colors.white, width: 2.0), color: locale.languageCode == 'ar'
? Color(0xFF7DAFBC)
: Colors.white,
width: 2.0),
), ),
child: IconButton( child: IconButton(
iconSize: 20, iconSize: 20,
icon: const Icon(Icons.arrow_back, icon: const Icon(
color: Colors.white,), Icons.arrow_back,
color: Colors.white,
),
onPressed: () { onPressed: () {
if (locale.languageCode == 'ar') { if (locale.languageCode == 'ar') {
ref.read(chartsTourProvider.notifier).state = true; ref
ref.read(scaffoldTourProvider.notifier).state = false; .read(chartsTourProvider.notifier)
.state = true;
ref
.read(scaffoldTourProvider.notifier)
.state = false;
tutorialCoachMark.finish(); tutorialCoachMark.finish();
} else { } else {
tutorialCoachMark.previous(); tutorialCoachMark.previous();
@ -705,23 +737,33 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: locale.languageCode=='ar' ? null:Color(0xFF7DAFBC), color: locale.languageCode == 'ar'
? null
: Color(0xFF7DAFBC),
border: Border.all( border: Border.all(
color:locale.languageCode=='ar' ? Colors.white: Color(0xFF7DAFBC), width: 1), color: locale.languageCode == 'ar'
? Colors.white
: Color(0xFF7DAFBC),
width: 1),
), ),
child: IconButton( child: IconButton(
iconSize: 20, iconSize: 20,
icon: const Icon(Icons.arrow_forward, icon: const Icon(
color: Colors.white,), Icons.arrow_forward,
color: Colors.white,
),
onPressed: () { onPressed: () {
if (locale.languageCode == 'ar') { if (locale.languageCode == 'ar') {
tutorialCoachMark.previous(); tutorialCoachMark.previous();
} else { } else {
ref.read(chartsTourProvider.notifier).state = true; ref
ref.read(scaffoldTourProvider.notifier).state = false; .read(chartsTourProvider.notifier)
.state = true;
ref
.read(scaffoldTourProvider.notifier)
.state = false;
tutorialCoachMark.finish(); tutorialCoachMark.finish();
} }
}, },
), ),
), ),
@ -741,7 +783,7 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
align: ContentAlign.right, align: ContentAlign.right,
child: Container( child: Container(
width: screenWidth / 4, width: screenWidth / 4,
height: screenHeight*0.2, height: screenHeight * 0.2,
child: Stack( child: Stack(
children: [ children: [
Image.asset( Image.asset(
@ -770,7 +812,7 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
contents: [ contents: [
createTargetContent( createTargetContent(
text: AppLocalizations.of(context)!.bookMark, text: AppLocalizations.of(context)!.bookMark,
space:screenWidth*0.22, space: screenWidth * 0.22,
alignment: ContentAlign.bottom, alignment: ContentAlign.bottom,
gap: 53, gap: 53,
), ),
@ -827,18 +869,30 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: locale.languageCode=='ar' ? Color(0xFF7DAFBC):null, color: locale.languageCode == 'ar'
? Color(0xFF7DAFBC)
: null,
border: Border.all( border: Border.all(
color:locale.languageCode=='ar' ? Color(0xFF7DAFBC): Colors.white, width: 2.0,), color: locale.languageCode == 'ar'
? Color(0xFF7DAFBC)
: Colors.white,
width: 2.0,
),
), ),
child: IconButton( child: IconButton(
iconSize: 20, iconSize: 20,
icon: const Icon(Icons.arrow_back, icon: const Icon(
color: Colors.white,), Icons.arrow_back,
color: Colors.white,
),
onPressed: () { onPressed: () {
if (locale.languageCode == 'ar') { if (locale.languageCode == 'ar') {
ref.read(chartsTourProvider.notifier).state = true; ref
ref.read(scaffoldTourProvider.notifier).state = false; .read(chartsTourProvider.notifier)
.state = true;
ref
.read(scaffoldTourProvider.notifier)
.state = false;
tutorialCoachMark.finish(); tutorialCoachMark.finish();
} else { } else {
tutorialCoachMark.next(); tutorialCoachMark.next();
@ -850,9 +904,15 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: locale.languageCode=='ar' ? null:Color(0xFF7DAFBC), color: locale.languageCode == 'ar'
? null
: Color(0xFF7DAFBC),
border: Border.all( border: Border.all(
color:locale.languageCode=='ar' ? Colors.white : Color(0xFF7DAFBC), width: 2.0,), color: locale.languageCode == 'ar'
? Colors.white
: Color(0xFF7DAFBC),
width: 2.0,
),
), ),
child: IconButton( child: IconButton(
iconSize: 20, iconSize: 20,
@ -862,8 +922,12 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
if (locale.languageCode == 'ar') { if (locale.languageCode == 'ar') {
tutorialCoachMark.next(); tutorialCoachMark.next();
} else { } else {
ref.read(chartsTourProvider.notifier).state = true; ref
ref.read(scaffoldTourProvider.notifier).state = false; .read(chartsTourProvider.notifier)
.state = true;
ref
.read(scaffoldTourProvider.notifier)
.state = false;
tutorialCoachMark.finish(); tutorialCoachMark.finish();
} }
}, },
@ -885,7 +949,7 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
align: ContentAlign.right, align: ContentAlign.right,
child: SizedBox( child: SizedBox(
width: screenWidth / 4, width: screenWidth / 4,
height:screenHeight*0.2, height: screenHeight * 0.2,
child: Stack( child: Stack(
children: [ children: [
Image.asset( Image.asset(
@ -964,23 +1028,36 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: locale.languageCode=='ar' ? Color(0xFF7DAFBC):null, color: locale.languageCode == 'ar'
? Color(0xFF7DAFBC)
: null,
border: Border.all( border: Border.all(
color:locale.languageCode=='ar' ? Color(0xFF7DAFBC): Colors.white, width: 2.0,), color: locale.languageCode == 'ar'
? Color(0xFF7DAFBC)
: Colors.white,
width: 2.0,
),
), ),
child: IconButton( child: IconButton(
iconSize: 20, iconSize: 20,
icon: const Icon(Icons.arrow_back, icon: const Icon(
color: Colors.white,), Icons.arrow_back,
color: Colors.white,
),
onPressed: () { onPressed: () {
if (locale.languageCode == 'ar') { if (locale.languageCode == 'ar') {
tutorialCoachMark.previous(); tutorialCoachMark.previous();
} else { } else {
ref.read(previousChartsTourProvider.notifier).state = true; ref
ref.read(previousHomeTourProvider.notifier).state = false; .read(previousChartsTourProvider
.notifier)
.state = true;
ref
.read(previousHomeTourProvider
.notifier)
.state = false;
tutorialCoachMark.finish(); tutorialCoachMark.finish();
} }
}, },
), ),
), ),
@ -988,18 +1065,31 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: locale.languageCode=='ar' ? null:Color(0xFF7DAFBC), color: locale.languageCode == 'ar'
? null
: Color(0xFF7DAFBC),
border: Border.all( border: Border.all(
color:locale.languageCode=='ar' ? Colors.white: Color(0xFF7DAFBC), width: 1), color: locale.languageCode == 'ar'
? Colors.white
: Color(0xFF7DAFBC),
width: 1),
), ),
child: IconButton( child: IconButton(
iconSize: 20, iconSize: 20,
icon: const Icon(Icons.arrow_forward, icon: const Icon(
color: Colors.white,), Icons.arrow_forward,
color: Colors.white,
),
onPressed: () { onPressed: () {
if (locale.languageCode == 'ar') { if (locale.languageCode == 'ar') {
ref.read(previousChartsTourProvider.notifier).state = true; ref
ref.read(previousHomeTourProvider.notifier).state = false; .read(previousChartsTourProvider
.notifier)
.state = true;
ref
.read(previousHomeTourProvider
.notifier)
.state = false;
tutorialCoachMark.finish(); tutorialCoachMark.finish();
} else { } else {
tutorialCoachMark.previous(); tutorialCoachMark.previous();
@ -1217,6 +1307,7 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
for (var chart in data) { for (var chart in data) {
final groupBy = chart['group_by']; final groupBy = chart['group_by'];
List response = chart['response'] ?? []; List response = chart['response'] ?? [];
final chartHeading = chart['chart_heading'];
// Filter the response based on selected filters // Filter the response based on selected filters
var chartFilteredData = response.where((responseItem) { var chartFilteredData = response.where((responseItem) {
@ -1243,6 +1334,26 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
}); });
}).toList(); }).toList();
print('chartFilteredData- $chartFilteredData');
// If chartFilteredData is empty, print the message
if (chartFilteredData.isEmpty) {
if (kDebugMode) {
print(
"Selected year: ${selectedFilters.firstWhere((f) => f['filter_key'] == 'TIME_PERIOD', orElse: () => {
'filter_data': ['Unknown']
})['filter_data']} - No data for chart: : $chartHeading");
}
// Add the complete chart data to the filteredData list
filteredData.add({
...chart,
'response': response, // Return full unfiltered response
});
continue;
}
// If any data matches the filter, add the whole chart data object // If any data matches the filter, add the whole chart data object
// Add filtered chart only once // Add filtered chart only once
if (chartFilteredData.isNotEmpty && if (chartFilteredData.isNotEmpty &&
@ -1996,6 +2107,7 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
color: isBookmarked color: isBookmarked
? Colors.black ? Colors.black
: Colors.white, : Colors.white,
size: 23,
), ),
], ],
), ),
@ -2015,7 +2127,7 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
color: Colors.white, color: Colors.white,
), ),
), ),
SizedBox(width: 5), SizedBox(width: 6),
Stack( Stack(
children: [ children: [
// Image.asset( // Image.asset(
@ -2031,7 +2143,6 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
// height: 24, // height: 24,
// ), // ),
SvgPicture.asset( SvgPicture.asset(
UaeNumbersAssetPath.share, UaeNumbersAssetPath.share,
semanticsLabel: 'share', semanticsLabel: 'share',
@ -2056,6 +2167,8 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
color: Colors.white, color: Colors.white,
), ),
), ),
SizedBox(width: 10),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
showRightSideModal( showRightSideModal(
@ -2233,6 +2346,12 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
right: 16.0, right: 16.0,
bottom: 1.0, bottom: 1.0,
top: 1.0), top: 1.0),
decoration: BoxDecoration(
color: Colors
.white, // Move color inside BoxDecoration
borderRadius: BorderRadius.circular(
12), // Ensure border radius is applied
),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
mainAxisAlignment: mainAxisAlignment:
@ -2276,15 +2395,20 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
const SizedBox(height: 5), const SizedBox(height: 5),
Flexible( Flexible(
fit: FlexFit.loose, fit: FlexFit.loose,
child: FittedBox( child: SizedBox(
child: Text( height: 20.0,
'(${response[0]['display_value'] ?? 'NA'})', child: FittedBox(
// '(${data['firstYear'] ?? child: Text(
// 'NA'} - ${data['lastYear'] ?? '(${response[0]['display_value'] ?? 'NA'})',
// 'NA'})', // '(${data['firstYear'] ??
style: const TextStyle( // 'NA'} - ${data['lastYear'] ??
fontSize: 10, // 'NA'})',
color: Colors.grey), style:
const TextStyle(
fontSize: 10,
color: Colors
.grey),
),
), ),
), ),
), ),
@ -2295,20 +2419,60 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
height: 50.0, height: 50.0,
child: FittedBox( child: FittedBox(
fit: BoxFit.contain, fit: BoxFit.contain,
child: Text( child: Row(
response[0] children: [
['value'] ?? Text(
'NA', response[0][
// '${data['roundedAverage'] ?? 'value'] ??
// 'NA'}', 'NA',
style: // '${data['roundedAverage'] ??
const TextStyle( // 'NA'}',
fontSize: 20, style: TextStyle(
fontWeight: fontSize: 20,
FontWeight.w900, fontWeight:
color: Color( FontWeight
0xFF90B0D5), .w900,
), color: response[0]
[
'calculation'] ==
'different'
? _getColorFromHex(
response[0]
[
'font_color'])
: const Color(
0xFF90B0D5),
// color: Color(
// 0xFF90B0D5),
),
),
const SizedBox(
width:
1), // Space between text and icon
if (response[0][
'calculation'] ==
'different') ...[
if (response[0][
'font_color'] ==
'#D83731')
const Icon(
Icons
.arrow_downward,
color: Colors
.red,
size: 22)
else if (response[
0][
'font_color'] ==
'#11AF22')
const Icon(
Icons
.arrow_upward,
color: Colors
.green,
size: 22),
],
],
), ),
), ),
), ),
@ -2344,6 +2508,12 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
child: Container( child: Container(
height: cardHeight, height: cardHeight,
padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
decoration: BoxDecoration(
color: Colors
.white, // Move color inside BoxDecoration
borderRadius: BorderRadius.circular(
12), // Ensure border radius is applied
),
child: Column( child: Column(
mainAxisSize: MainAxisSize mainAxisSize: MainAxisSize
.min, // Adjust card height based on content .min, // Adjust card height based on content
@ -2413,12 +2583,18 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
// data['lastYearValue']), // data['lastYearValue']),
// apiService.formatAmount( // apiService.formatAmount(
// data['lastYearValue']), // data['lastYearValue']),
style: const TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18,
fontWeight: fontWeight:
FontWeight.w900, FontWeight.w900,
color: color: response[0][
Color(0xFF90B0D5), 'calculation'] ==
'different'
? _getColorFromHex(
response[0][
'font_color'])
: const Color(
0xFF90B0D5),
), ),
), ),
), ),
@ -2441,12 +2617,18 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
'NA', 'NA',
// apiService.formatAmount( // apiService.formatAmount(
// data['secondLastYearValue']), // data['secondLastYearValue']),
style: const TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: fontWeight:
FontWeight.w600, FontWeight.w600,
color: color: response[1][
Color(0xFFD83731), 'calculation'] ==
'different'
? _getColorFromHex(
response[0][
'font_color'])
: const Color(
0xFFD83731),
), ),
), ),
), ),
@ -2476,29 +2658,48 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Card( return Card(
margin: const EdgeInsets.all(10), margin: const EdgeInsets.all(10),
child: Padding( child: Container(
padding: const EdgeInsets.all(16.0), decoration: BoxDecoration(
child: Column( border: Border.all(
crossAxisAlignment: color: Color(
CrossAxisAlignment.start, int.parse(
children: [ (chartScreenData[
const SizedBox(height: 10), 'border_color'] ??
ConstrainedBox( '#898C81')
constraints: const BoxConstraints( .replaceFirst('#', '0xff'),
minHeight:
200, // Minimum height
maxHeight:
400, // Maximum height
), ),
// child: buildChart(chartsData[index]), ), // Border color
child: ChartWidget( width: 1, // Border width
chartData: ),
chartsData[index])), color: Colors.white,
], borderRadius: BorderRadius.circular(
), 8), // Optional: Rounded corners
), ),
); child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
// ConstrainedBox
Container(
// constraints: const BoxConstraints(
// minHeight:
// 200, // Minimum height
// maxHeight:
// 400, // Maximum height
// ),
height: 350,
// child: buildChart(chartsData[index]),
child: ChartWidget(
chartData:
chartsData[index]))
],
),
),
));
}, },
), ),
], ],
@ -2568,3 +2769,12 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
); );
} }
} }
// Function to convert hex color string to Color
Color _getColorFromHex(String hexColor) {
hexColor = hexColor.replaceFirst('#', '');
if (hexColor.length == 6) {
hexColor = 'FF$hexColor'; // Add alpha if not provided
}
return Color(int.parse(hexColor, radix: 16));
}

File diff suppressed because it is too large Load Diff

View File

@ -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.19+20 version: 1.0.23+24
environment: environment:
sdk: ">=3.2.3 <4.0.0" sdk: ">=3.2.3 <4.0.0"