bug fix search
This commit is contained in:
parent
809d3adc08
commit
72d29d2f30
@ -2,27 +2,27 @@ C/C++ Structured Logc
|
|||||||
a
|
a
|
||||||
_C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\additional_project_files.txtC
|
_C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\additional_project_files.txtC
|
||||||
A
|
A
|
||||||
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint ׈“ãç2 瘝èã2`
|
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint þÇð¯è2 瘝èã2`
|
||||||
^
|
^
|
||||||
\C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\android_gradle_build.json ׈“ãç2º ««¤èã2e
|
\C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\android_gradle_build.json ÿÇð¯è2º ««¤èã2e
|
||||||
c
|
c
|
||||||
aC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\android_gradle_build_mini.json ׈“ãç2<18> Ø«¤èã2R
|
aC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\android_gradle_build_mini.json ÿÇð¯è2<18> Ø«¤èã2R
|
||||||
P
|
P
|
||||||
NC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\build.ninja ׈“ãç2÷Û Ì¨¤èã2V
|
NC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\build.ninja ÿÇð¯è2÷Û Ì¨¤èã2V
|
||||||
T
|
T
|
||||||
RC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\build.ninja.txt ؈“ãç2[
|
RC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\build.ninja.txt ÿÇð¯è2[
|
||||||
Y
|
Y
|
||||||
WC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\build_file_index.txt ؈“ãç2
S 諤èã2\
|
WC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\build_file_index.txt ÿÇð¯è2
S 諤èã2\
|
||||||
Z
|
Z
|
||||||
XC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\compile_commands.json ؈“ãç2`
|
XC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\compile_commands.json ÿÇð¯è2`
|
||||||
^
|
^
|
||||||
\C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\compile_commands.json.bin ؈“ãç2 f
|
\C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\compile_commands.json.bin ÿÇð¯è2 f
|
||||||
d
|
d
|
||||||
bC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\metadata_generation_command.txt ؈“ãç2
|
bC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\metadata_generation_command.txt ÿÇð¯è2
|
||||||
Ä Þ«¤èã2Y
|
Ä Þ«¤èã2Y
|
||||||
W
|
W
|
||||||
UC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\prefab_config.json ؈“ãç2
( 櫤èã2^
|
UC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\prefab_config.json ÿÇð¯è2
( 櫤èã2^
|
||||||
\
|
\
|
||||||
ZC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\symbol_folder_index.txt ؈“ãç2
Q 諤èã2W
|
ZC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\arm64-v8a\symbol_folder_index.txt ÿÇð¯è2
Q 諤èã2W
|
||||||
U
|
U
|
||||||
SC:\flutter\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt ؈“ãç2
§ ÑÜÐßÓ2
|
SC:\flutter\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt ÿÇð¯è2
§ ÑÜÐßÓ2
|
||||||
@ -2,27 +2,27 @@ C/C++ Structured Loge
|
|||||||
c
|
c
|
||||||
aC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\additional_project_files.txtC
|
aC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\additional_project_files.txtC
|
||||||
A
|
A
|
||||||
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint –‰“ãç2 ²ÿ¥èã2b
|
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint ëÈð¯è2 ²ÿ¥èã2b
|
||||||
`
|
`
|
||||||
^C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\android_gradle_build.json –‰“ãç2¾ µÿ¥èã2g
|
^C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\android_gradle_build.json ëÈð¯è2¾ µÿ¥èã2g
|
||||||
e
|
e
|
||||||
cC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\android_gradle_build_mini.json —‰“ãç2‘ âÿ¥èã2T
|
cC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\android_gradle_build_mini.json ëÈð¯è2‘ âÿ¥èã2T
|
||||||
R
|
R
|
||||||
PC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\build.ninja —‰“ãç2<18>Ü °õ¥èã2X
|
PC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\build.ninja ëÈð¯è2<18>Ü °õ¥èã2X
|
||||||
V
|
V
|
||||||
TC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\build.ninja.txt —‰“ãç2]
|
TC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\build.ninja.txt ëÈð¯è2]
|
||||||
[
|
[
|
||||||
YC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\build_file_index.txt —‰“ãç2
S “€¦èã2^
|
YC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\build_file_index.txt ëÈð¯è2
S “€¦èã2^
|
||||||
\
|
\
|
||||||
ZC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\compile_commands.json —‰“ãç2b
|
ZC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\compile_commands.json ëÈð¯è2b
|
||||||
`
|
`
|
||||||
^C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\compile_commands.json.bin —‰“ãç2 h
|
^C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\compile_commands.json.bin ëÈð¯è2 h
|
||||||
f
|
f
|
||||||
dC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\metadata_generation_command.txt —‰“ãç2
|
dC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\metadata_generation_command.txt ëÈð¯è2
|
||||||
Î ‰€¦èã2[
|
Î ‰€¦èã2[
|
||||||
Y
|
Y
|
||||||
WC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\prefab_config.json —‰“ãç2
( ’€¦èã2`
|
WC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\prefab_config.json ëÈð¯è2
( ’€¦èã2`
|
||||||
^
|
^
|
||||||
\C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\symbol_folder_index.txt —‰“ãç2
S “€¦èã2W
|
\C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\armeabi-v7a\symbol_folder_index.txt ëÈð¯è2
S “€¦èã2W
|
||||||
U
|
U
|
||||||
SC:\flutter\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt —‰“ãç2
§ ÑÜÐßÓ2
|
SC:\flutter\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt ëÈð¯è2
§ ÑÜÐßÓ2
|
||||||
@ -2,27 +2,27 @@ C/C++ Structured Log]
|
|||||||
[
|
[
|
||||||
YC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\additional_project_files.txtC
|
YC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\additional_project_files.txtC
|
||||||
A
|
A
|
||||||
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint щ“ãç2 †½¦èã2Z
|
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint «Éð¯è2 †½¦èã2Z
|
||||||
X
|
X
|
||||||
VC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\android_gradle_build.json щ“ãç2® ˜½¦èã2_
|
VC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\android_gradle_build.json «Éð¯è2® ˜½¦èã2_
|
||||||
]
|
]
|
||||||
[C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\android_gradle_build_mini.json щ“ãç2<18> ©½¦èã2L
|
[C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\android_gradle_build_mini.json «Éð¯è2<18> ©½¦èã2L
|
||||||
J
|
J
|
||||||
HC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\build.ninja щ“ãç2ÙÛ µ»¦èã2P
|
HC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\build.ninja «Éð¯è2ÙÛ µ»¦èã2P
|
||||||
N
|
N
|
||||||
LC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\build.ninja.txt щ“ãç2U
|
LC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\build.ninja.txt «Éð¯è2U
|
||||||
S
|
S
|
||||||
QC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\build_file_index.txt щ“ãç2
S »½¦èã2V
|
QC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\build_file_index.txt «Éð¯è2
S »½¦èã2V
|
||||||
T
|
T
|
||||||
RC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\compile_commands.json щ“ãç2Z
|
RC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\compile_commands.json «Éð¯è2Z
|
||||||
X
|
X
|
||||||
VC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\compile_commands.json.bin щ“ãç2 `
|
VC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\compile_commands.json.bin «Éð¯è2 `
|
||||||
^
|
^
|
||||||
\C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\metadata_generation_command.txt щ“ãç2
|
\C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\metadata_generation_command.txt «Éð¯è2
|
||||||
¦ ¬½¦èã2S
|
¦ ¬½¦èã2S
|
||||||
Q
|
Q
|
||||||
OC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\prefab_config.json щ“ãç2
( ±½¦èã2X
|
OC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\prefab_config.json «Éð¯è2
( ±½¦èã2X
|
||||||
V
|
V
|
||||||
TC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\symbol_folder_index.txt Ò‰“ãç2
K ¶½¦èã2W
|
TC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86\symbol_folder_index.txt «Éð¯è2
K ¶½¦èã2W
|
||||||
U
|
U
|
||||||
SC:\flutter\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt Ó‰“ãç2
§ ÑÜÐßÓ2
|
SC:\flutter\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt «Éð¯è2
§ ÑÜÐßÓ2
|
||||||
@ -2,27 +2,27 @@ C/C++ Structured Log`
|
|||||||
^
|
^
|
||||||
\C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\additional_project_files.txtC
|
\C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\additional_project_files.txtC
|
||||||
A
|
A
|
||||||
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint ÿ‰“ãç2 üצèã2]
|
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint öÊð¯è2 üצèã2]
|
||||||
[
|
[
|
||||||
YC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\android_gradle_build.json ÿ‰“ãç2´ ‚ئèã2b
|
YC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\android_gradle_build.json öÊð¯è2´ ‚ئèã2b
|
||||||
`
|
`
|
||||||
^C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\android_gradle_build_mini.json ÿ‰“ãç2‡ …ئèã2O
|
^C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\android_gradle_build_mini.json öÊð¯è2‡ …ئèã2O
|
||||||
M
|
M
|
||||||
KC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\build.ninja ÿ‰“ãç2èÛ ¥Ö¦èã2S
|
KC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\build.ninja öÊð¯è2èÛ ¥Ö¦èã2S
|
||||||
Q
|
Q
|
||||||
OC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\build.ninja.txt ÿ‰“ãç2X
|
OC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\build.ninja.txt öÊð¯è2X
|
||||||
V
|
V
|
||||||
TC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\build_file_index.txt ÿ‰“ãç2
S ˆØ¦èã2Y
|
TC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\build_file_index.txt öÊð¯è2
S ˆØ¦èã2Y
|
||||||
W
|
W
|
||||||
UC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\compile_commands.json ÿ‰“ãç2]
|
UC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\compile_commands.json öÊð¯è2]
|
||||||
[
|
[
|
||||||
YC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\compile_commands.json.bin ÿ‰“ãç2 c
|
YC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\compile_commands.json.bin ÷Êð¯è2 c
|
||||||
a
|
a
|
||||||
_C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\metadata_generation_command.txt ÿ‰“ãç2
|
_C:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\metadata_generation_command.txt ÷Êð¯è2
|
||||||
µ †Ø¦èã2V
|
µ †Ø¦èã2V
|
||||||
T
|
T
|
||||||
RC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\prefab_config.json €Š“ãç2
( ‡Ø¦èã2[
|
RC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\prefab_config.json ÷Êð¯è2
( ‡Ø¦èã2[
|
||||||
Y
|
Y
|
||||||
WC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\symbol_folder_index.txt €Š“ãç2
N ˆØ¦èã2W
|
WC:\flutter code\new\FCSC\android\app\.cxx\Debug\2d1206wq\x86_64\symbol_folder_index.txt ÷Êð¯è2
N ˆØ¦èã2W
|
||||||
U
|
U
|
||||||
SC:\flutter\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt €Š“ãç2
§ ÑÜÐßÓ2
|
SC:\flutter\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt ÷Êð¯è2
§ ÑÜÐßÓ2
|
||||||
@ -1,6 +1,6 @@
|
|||||||
enum IndicatorTopic {
|
enum IndicatorTopic {
|
||||||
economy(nameAR: 'الاقتصاد', nameEN: 'Economy'),
|
economy(nameAR: 'الاقتصاد', nameEN: 'Economy'),
|
||||||
social(nameAR: 'الاجتماعي', nameEN: 'Social'),
|
social(nameAR: 'لاجتماعي', nameEN: 'Social'),
|
||||||
environment(nameAR: 'البيئة', nameEN: 'Environment');
|
environment(nameAR: 'البيئة', nameEN: 'Environment');
|
||||||
|
|
||||||
const IndicatorTopic({
|
const IndicatorTopic({
|
||||||
|
|||||||
@ -71,7 +71,6 @@ class uaenumberWidget extends ConsumerStatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
|
class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
|
||||||
@override
|
|
||||||
TextEditingController _searchController = TextEditingController();
|
TextEditingController _searchController = TextEditingController();
|
||||||
List<dynamic> homePageData = [];
|
List<dynamic> homePageData = [];
|
||||||
List<dynamic> filteredData = [];
|
List<dynamic> filteredData = [];
|
||||||
@ -100,7 +99,6 @@ class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> fetchData(locale) async {
|
Future<void> fetchData(locale) async {
|
||||||
// const baseUrl = 'https://pb.venbait.in/api/getHomePageData';
|
|
||||||
const baseUrl = '$apiUrl/api/getUAENumbersData';
|
const baseUrl = '$apiUrl/api/getUAENumbersData';
|
||||||
try {
|
try {
|
||||||
final response = await http.get(Uri.parse(baseUrl + '?language=$locale'));
|
final response = await http.get(Uri.parse(baseUrl + '?language=$locale'));
|
||||||
@ -109,11 +107,7 @@ class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
|
|||||||
homePageData = (json.decode(response.body) as List)
|
homePageData = (json.decode(response.body) as List)
|
||||||
.map((e) => Map<String, dynamic>.from(e))
|
.map((e) => Map<String, dynamic>.from(e))
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
filteredData = List.from(homePageData);
|
filteredData = List.from(homePageData);
|
||||||
// Show all initially
|
|
||||||
|
|
||||||
// print("HomeDAta $homePageData");
|
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -130,7 +124,7 @@ class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
|
|||||||
void filterData(String query) {
|
void filterData(String query) {
|
||||||
if (query.isEmpty) {
|
if (query.isEmpty) {
|
||||||
setState(() {
|
setState(() {
|
||||||
filteredData = List.from(homePageData); // Reset if empty
|
filteredData = List.from(homePageData);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -180,14 +174,13 @@ class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
|
|||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
filteredData = tempList;
|
filteredData = tempList;
|
||||||
print(filteredData); // Debugging: Check filtered output in console
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final isConnected = ref.watch(connectivityProvider);
|
final isConnected = ref.watch(connectivityProvider);
|
||||||
|
|
||||||
// If no internet, redirect to InternetCheckScreen
|
|
||||||
ref.listen<AsyncValue<bool>>(connectivityProvider, (previous, hasInternet) {
|
ref.listen<AsyncValue<bool>>(connectivityProvider, (previous, hasInternet) {
|
||||||
if (hasInternet.value == false) {
|
if (hasInternet.value == false) {
|
||||||
context.push('/internetcheck');
|
context.push('/internetcheck');
|
||||||
@ -195,7 +188,7 @@ class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
ref.listen<Locale?>(localeProvider, (previous, next) async {
|
ref.listen<Locale?>(localeProvider, (previous, next) async {
|
||||||
final localeCode = next?.languageCode ?? 'en'; // Default to 'en' if null
|
final localeCode = next?.languageCode ?? 'en';
|
||||||
setState(() {
|
setState(() {
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
});
|
});
|
||||||
@ -208,31 +201,26 @@ class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
|
|||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return Container(
|
return Container(
|
||||||
color: Color(0x98FFFCE5), // Semi-transparent background
|
color: Color(0x98FFFCE5),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
margin:
|
margin: EdgeInsets.symmetric(horizontal: 40),
|
||||||
EdgeInsets.symmetric(horizontal: 40), // Left & Right space
|
|
||||||
child: LinearProgressIndicator(
|
child: LinearProgressIndicator(
|
||||||
minHeight: 5, // Adjust thickness
|
minHeight: 5,
|
||||||
backgroundColor: Colors.grey[100], // Optional: Background color
|
backgroundColor: Colors.grey[100],
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(
|
valueColor: AlwaysStoppedAnimation<Color>(Color(0xFFAA8E83)),
|
||||||
Color(0xFFAA8E83)), // Loader color
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else if (filteredData.isEmpty) {
|
|
||||||
return Center(child: Text("No data available"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding:
|
padding: const EdgeInsets.only(left: 16.0, right: 16.0, top: 5.0, bottom: 5.0),
|
||||||
const EdgeInsets.only(left: 16.0, right: 16.0, top: 5.0, bottom: 5.0),
|
child: Column(
|
||||||
child: ListView(
|
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
height: 40,
|
height: 40,
|
||||||
@ -246,17 +234,15 @@ class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
|
|||||||
child: TextField(
|
child: TextField(
|
||||||
controller: _searchController,
|
controller: _searchController,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
filterData(
|
filterData(value);
|
||||||
value); // Call filter function directly on input change
|
},
|
||||||
}, // Ensures vertical alignment
|
|
||||||
// Centers text horizontally
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: AppLocalizations.of(context)!.search,
|
hintText: AppLocalizations.of(context)!.search,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
color: Color(0xFFAA8E83),
|
color: Color(0xFFAA8E83),
|
||||||
fontFamily: context.translate('Roboto', 'NotoKufi'),
|
fontFamily: context.translate('Roboto', 'NotoKufi'),
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
height: 2.5, // This helps align it with the icon
|
height: 2.0,
|
||||||
),
|
),
|
||||||
prefixIconConstraints: BoxConstraints(
|
prefixIconConstraints: BoxConstraints(
|
||||||
maxWidth: 42,
|
maxWidth: 42,
|
||||||
@ -264,7 +250,7 @@ class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
|
|||||||
),
|
),
|
||||||
prefixIcon: Container(
|
prefixIcon: Container(
|
||||||
padding: EdgeInsets.only(right: 5, left: 5),
|
padding: EdgeInsets.only(right: 5, left: 5),
|
||||||
alignment: Alignment.center, // Ensures the SVG is centered
|
alignment: Alignment.center,
|
||||||
child: SvgPicture.asset(
|
child: SvgPicture.asset(
|
||||||
MiscIconAssetPath.Search,
|
MiscIconAssetPath.Search,
|
||||||
semanticsLabel: 'Search',
|
semanticsLabel: 'Search',
|
||||||
@ -273,72 +259,88 @@ class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
|
|||||||
width: 18,
|
width: 18,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
suffixIcon: _searchController.text.isNotEmpty
|
||||||
|
? IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
Icons.clear,
|
||||||
|
color: Color(0xFFAA8E83),
|
||||||
|
size: 18,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
_searchController.clear();
|
||||||
|
filterData('');
|
||||||
|
},
|
||||||
|
)
|
||||||
|
: null,
|
||||||
contentPadding: EdgeInsets.symmetric(vertical: 9, horizontal: 18.0),
|
contentPadding: EdgeInsets.symmetric(vertical: 9, horizontal: 18.0),
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(height: myheight / 40),
|
||||||
height: myheight / 40,
|
Expanded(
|
||||||
),
|
child: filteredData.isEmpty
|
||||||
...filteredData.map<Widget>((mainTopic) {
|
? Center(child: Text("No data available"))
|
||||||
String colorPattern = mainTopic['color_pattern'];
|
: ListView(
|
||||||
print('colorPattern $colorPattern');
|
children: [
|
||||||
Color backgroundColor = Color(int.parse(colorPattern));
|
...filteredData.map<Widget>((mainTopic) {
|
||||||
print('backgroundColor $backgroundColor');
|
String colorPattern = mainTopic['color_pattern'];
|
||||||
Color borderColor = backgroundColor;
|
Color backgroundColor = Color(int.parse(colorPattern));
|
||||||
int index = filteredData.indexOf(mainTopic);
|
Color borderColor = backgroundColor;
|
||||||
bool isFirstTile = index == 0;
|
int index = filteredData.indexOf(mainTopic);
|
||||||
|
|
||||||
return CustomExpandableTile(
|
return CustomExpandableTile(
|
||||||
index: index,
|
index: index,
|
||||||
isExpanded: expandedIndex == index, // Compare with expandedIndex
|
isExpanded: expandedIndex == index,
|
||||||
onTap: (index) {
|
onTap: (index) {
|
||||||
setState(() {
|
setState(() {
|
||||||
expandedIndex = (expandedIndex == index) ? null : index;
|
expandedIndex = (expandedIndex == index) ? null : index;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
title: mainTopic['main_topic'],
|
title: mainTopic['main_topic'],
|
||||||
titleBackgroundColor: backgroundColor,
|
titleBackgroundColor: backgroundColor,
|
||||||
children: _buildSubTopics(mainTopic['sub_topics'] ?? [], mywidth,
|
children: _buildSubTopics(
|
||||||
myheight, borderColor, colorPattern, mainTopic['main_topic']),
|
mainTopic['sub_topics'] ?? [],
|
||||||
);
|
mywidth,
|
||||||
}),
|
myheight,
|
||||||
|
borderColor,
|
||||||
|
colorPattern,
|
||||||
|
mainTopic['main_topic']),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _buildSubTopics(List<dynamic> subTopics, double myWidth,
|
List<Widget> _buildSubTopics(List<dynamic> subTopics, double myWidth, myheight,
|
||||||
myheight, Color borderColor, String colorPattern, mainTopic) {
|
Color borderColor, String colorPattern, mainTopic) {
|
||||||
print('colorPattern123 $borderColor');
|
subTopics.sort((a, b) =>
|
||||||
// Sort sub-topics based on `sub_topic_list_order`
|
(a['sub_topic_list_order'] ?? 0).compareTo(b['sub_topic_list_order'] ?? 0));
|
||||||
subTopics.sort((a, b) => (a['sub_topic_list_order'] ?? 0)
|
|
||||||
.compareTo(b['sub_topic_list_order'] ?? 0));
|
|
||||||
|
|
||||||
return subTopics
|
return subTopics
|
||||||
.map<Widget>((subTopic) => Column(
|
.map<Widget>((subTopic) => Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
buildCategoryTitle(subTopic['sub_topic'], borderColor),
|
buildCategoryTitle(subTopic['sub_topic'], borderColor),
|
||||||
..._buildDataSetCards(subTopic['tile_data'] ?? [], myWidth,
|
..._buildDataSetCards(subTopic['tile_data'] ?? [], myWidth,
|
||||||
borderColor, colorPattern, mainTopic),
|
borderColor, colorPattern, mainTopic),
|
||||||
],
|
],
|
||||||
))
|
))
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _buildDataSetCards(List<dynamic> tileData, double myWidth,
|
List<Widget> _buildDataSetCards(List<dynamic> tileData, double myWidth,
|
||||||
Color borderColor, colorPattern, mainTopic) {
|
Color borderColor, colorPattern, mainTopic) {
|
||||||
// Sort datasets based on `data_set_list_order`
|
tileData.sort((a, b) =>
|
||||||
tileData.sort((a, b) => (a['data_set_list_order'] ?? 0)
|
(a['data_set_list_order'] ?? 0).compareTo(b['data_set_list_order'] ?? 0));
|
||||||
.compareTo(b['data_set_list_order'] ?? 0));
|
|
||||||
|
|
||||||
List<Widget> rows = [];
|
List<Widget> rows = [];
|
||||||
for (int i = 0; i < tileData.length; i += 2) {
|
for (int i = 0; i < tileData.length; i += 2) {
|
||||||
// Take 1 or 2 items for the row
|
|
||||||
final rowItems = tileData.sublist(
|
final rowItems = tileData.sublist(
|
||||||
i,
|
i,
|
||||||
i + 2 > tileData.length ? tileData.length : i + 2,
|
i + 2 > tileData.length ? tileData.length : i + 2,
|
||||||
@ -348,15 +350,13 @@ class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: rowItems.map<Widget>((data) {
|
children: rowItems.map<Widget>((data) {
|
||||||
// Calculate width: full width for one item, half for two items
|
|
||||||
final cardWidth = rowItems.length == 1
|
final cardWidth = rowItems.length == 1
|
||||||
? myWidth
|
? myWidth
|
||||||
: (myWidth - 16) / 2.6; // Subtract spacing for padding
|
: (myWidth - 16) / 2.6;
|
||||||
|
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsets.symmetric(horizontal: 5.0),
|
||||||
const EdgeInsets.symmetric(horizontal: 5.0), // Add spacing
|
|
||||||
child: buildCard(
|
child: buildCard(
|
||||||
context,
|
context,
|
||||||
data['data_set_tile_heading'] ?? '',
|
data['data_set_tile_heading'] ?? '',
|
||||||
@ -367,8 +367,7 @@ class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
|
|||||||
borderColor,
|
borderColor,
|
||||||
colorPattern,
|
colorPattern,
|
||||||
cardWidth,
|
cardWidth,
|
||||||
mainTopic // Pass the calculated width
|
mainTopic),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}).toList(),
|
}).toList(),
|
||||||
@ -380,22 +379,22 @@ class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
|
|||||||
|
|
||||||
Widget buildCategoryTitle(String title, Color color) {
|
Widget buildCategoryTitle(String title, Color color) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.only(top: 1.2, bottom: 1.2),
|
padding: const EdgeInsets.only(top: 1.2, bottom: 1.2),
|
||||||
// padding: const EdgeInsets.symmetric(vertical: 8.0),
|
child: Center(
|
||||||
child: Center(
|
child: Text(
|
||||||
child: Text(
|
title,
|
||||||
title,
|
style: TextStyle(
|
||||||
style: TextStyle(
|
fontFamily: context.translate(
|
||||||
fontFamily: context.translate(
|
'Roboto',
|
||||||
'Roboto',
|
'NotoKufi',
|
||||||
'NotoKufi',
|
|
||||||
),
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
color: color,
|
|
||||||
),
|
),
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: color,
|
||||||
),
|
),
|
||||||
));
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget buildCardRow(List<Widget> cards) {
|
Widget buildCardRow(List<Widget> cards) {
|
||||||
@ -423,11 +422,7 @@ class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
|
|||||||
colorPattern,
|
colorPattern,
|
||||||
double mywidth,
|
double mywidth,
|
||||||
String mainTopic) {
|
String mainTopic) {
|
||||||
print('UAE Numbers $value , $title');
|
|
||||||
// Check if title is "Population Growth"
|
|
||||||
bool isPopulationGrowth = title == "Population Growth";
|
bool isPopulationGrowth = title == "Population Growth";
|
||||||
|
|
||||||
// Convert value to double for checking positive or negative (only for Population Growth)
|
|
||||||
double parsedValue = isPopulationGrowth
|
double parsedValue = isPopulationGrowth
|
||||||
? double.tryParse(value.replaceAll('%', '')) ?? 0.0
|
? double.tryParse(value.replaceAll('%', '')) ?? 0.0
|
||||||
: 0.0;
|
: 0.0;
|
||||||
@ -435,31 +430,23 @@ class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
|
|||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// print('checking data');
|
|
||||||
// print(mainTopic);
|
|
||||||
// print(title);
|
|
||||||
// print(subtitle);
|
|
||||||
// print(data_set);
|
|
||||||
final encodedMainTopic = Uri.encodeComponent(mainTopic);
|
final encodedMainTopic = Uri.encodeComponent(mainTopic);
|
||||||
final encodedTitle = Uri.encodeComponent(title);
|
final encodedTitle = Uri.encodeComponent(title);
|
||||||
final encodedKey = Uri.encodeQueryComponent('uaenumbers');
|
final encodedKey = Uri.encodeQueryComponent('uaenumbers');
|
||||||
// Pass mainTopic and title as query parameters
|
|
||||||
context.push(
|
context.push(
|
||||||
'/chartScreen/$data_set?bgColor=$colorPattern&mainTopic=$encodedMainTopic&title=$encodedTitle&key=$encodedKey');
|
'/chartScreen/$data_set?bgColor=$colorPattern&mainTopic=$encodedMainTopic&title=$encodedTitle&key=$encodedKey');
|
||||||
// context.go('/chartScreen/$data_set');
|
|
||||||
},
|
},
|
||||||
child: Card(
|
child: Card(
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: mywidth,
|
width: mywidth,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white, // Background color
|
color: Colors.white,
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: bordercolor, // Border color
|
color: bordercolor,
|
||||||
width: 1, // Border width
|
width: 1,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12),
|
||||||
BorderRadius.circular(12), // Optional: Rounded corners
|
|
||||||
),
|
),
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
top: 3.0, bottom: 3.0, left: 5.0, right: 5.0),
|
top: 3.0, bottom: 3.0, left: 5.0, right: 5.0),
|
||||||
|
|||||||
@ -89,9 +89,9 @@ class ChartWidget extends StatelessWidget {
|
|||||||
// Function to get colors for both English & Arabic keys
|
// Function to get colors for both English & Arabic keys
|
||||||
List<Color> get uniqueColors {
|
List<Color> get uniqueColors {
|
||||||
final Map<String, String> translations = {
|
final Map<String, String> translations = {
|
||||||
'اقتصاد': 'ECONOMY',
|
'الاقتصاد': 'ECONOMY',
|
||||||
'اجتماعي': 'SOCIAL',
|
'الاجتماعي': 'SOCIAL',
|
||||||
'بيئة': 'ENVIRONMENT',
|
'البيئة': 'ENVIRONMENT',
|
||||||
};
|
};
|
||||||
|
|
||||||
String key = translations[chartHeader] ?? chartHeader;
|
String key = translations[chartHeader] ?? chartHeader;
|
||||||
@ -100,9 +100,9 @@ class ChartWidget extends StatelessWidget {
|
|||||||
|
|
||||||
List<Color> get uniqueColorsForTwo {
|
List<Color> get uniqueColorsForTwo {
|
||||||
final Map<String, String> translations = {
|
final Map<String, String> translations = {
|
||||||
'اقتصاد': 'ECONOMY',
|
'الاقتصاد': 'ECONOMY',
|
||||||
'اجتماعي': 'SOCIAL',
|
'الاجتماعي': 'SOCIAL',
|
||||||
'بيئة': 'ENVIRONMENT',
|
'البيئة': 'ENVIRONMENT',
|
||||||
};
|
};
|
||||||
|
|
||||||
String key = translations[chartHeader] ?? chartHeader;
|
String key = translations[chartHeader] ?? chartHeader;
|
||||||
@ -111,9 +111,9 @@ class ChartWidget extends StatelessWidget {
|
|||||||
|
|
||||||
List<Color> get uniqueColorsForThree {
|
List<Color> get uniqueColorsForThree {
|
||||||
final Map<String, String> translations = {
|
final Map<String, String> translations = {
|
||||||
'اقتصاد': 'ECONOMY',
|
'الاقتصاد': 'ECONOMY',
|
||||||
'اجتماعي': 'SOCIAL',
|
'الاجتماعي': 'SOCIAL',
|
||||||
'بيئة': 'ENVIRONMENT',
|
'البيئة': 'ENVIRONMENT',
|
||||||
};
|
};
|
||||||
|
|
||||||
String key = translations[chartHeader] ?? chartHeader;
|
String key = translations[chartHeader] ?? chartHeader;
|
||||||
|
|||||||
@ -108,9 +108,9 @@ class _BookMarkState extends ConsumerState<BookMark> {
|
|||||||
List<Map<String, dynamic>> fetchedData) {
|
List<Map<String, dynamic>> fetchedData) {
|
||||||
// Define the required order
|
// Define the required order
|
||||||
List<String> order = [
|
List<String> order = [
|
||||||
context.translate('ECONOMY', 'اقتصاد'),
|
context.translate('ECONOMY', 'الاقتصاد'),
|
||||||
context.translate('SOCIAL', 'اجتماعي'),
|
context.translate('SOCIAL', 'الاجتماعي'),
|
||||||
context.translate('ENVIRONMENT', 'بيئة')
|
context.translate('ENVIRONMENT', 'البيئة')
|
||||||
];
|
];
|
||||||
|
|
||||||
// Create a list to store sorted data
|
// Create a list to store sorted data
|
||||||
@ -118,9 +118,9 @@ class _BookMarkState extends ConsumerState<BookMark> {
|
|||||||
|
|
||||||
// Group data based on categories
|
// Group data based on categories
|
||||||
Map<String, List<Map<String, dynamic>>> groupedData = {
|
Map<String, List<Map<String, dynamic>>> groupedData = {
|
||||||
context.translate('ECONOMY', 'اقتصاد'): [],
|
context.translate('ECONOMY', 'الاقتصاد'): [],
|
||||||
context.translate('SOCIAL', 'اجتماعي'): [],
|
context.translate('SOCIAL', 'الاجتماعي'): [],
|
||||||
context.translate('ENVIRONMENT', 'بيئة'): []
|
context.translate('ENVIRONMENT', 'البيئة'): []
|
||||||
};
|
};
|
||||||
|
|
||||||
// Categorize data
|
// Categorize data
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user