diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 1063e909..a4b15385 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -30,11 +30,13 @@
+
-
+
diff --git a/assets/competitiveness/multi-frame.jpg b/assets/competitiveness/multi-frame.jpg
new file mode 100644
index 00000000..96a54797
Binary files /dev/null and b/assets/competitiveness/multi-frame.jpg differ
diff --git a/lib/config/my_router.dart b/lib/config/my_router.dart
index c4c31ad6..60f755d3 100644
--- a/lib/config/my_router.dart
+++ b/lib/config/my_router.dart
@@ -372,8 +372,8 @@ final GoRouter router = GoRouter(
routes: [
GoRoute(
path: '/',
- builder: (context, state) => Competitiveness(),
- // builder: (context, state) => SessionCheckScreen(),
+ // builder: (context, state) => Competitiveness(),
+ builder: (context, state) => SessionCheckScreen(),
),
// GoRoute(
// path: '/',
diff --git a/lib/main.dart b/lib/main.dart
index 30c006d4..4908ab6d 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,6 +1,7 @@
import 'dart:io';
// import 'package:firebase_core/firebase_core.dart';
// import 'package:firebase_messaging/firebase_messaging.dart';
+import 'package:appsflyer_sdk/appsflyer_sdk.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/foundation.dart';
@@ -165,11 +166,51 @@ void main() async {
// }
// }
-class MainApp extends ConsumerWidget {
+class MainApp extends ConsumerStatefulWidget {
+
const MainApp({super.key});
@override
- Widget build(BuildContext context, WidgetRef ref) {
+ ConsumerState createState() => _MainAppState();
+}
+
+class _MainAppState extends ConsumerState {
+
+ late AppsflyerSdk appsflyerSdk;
+
+ @override
+ void initState() {
+ super.initState();
+ appsflyerSdk=AppsflyerSdk(
+ AppsFlyerOptions(
+ afDevKey: '7TwqHnPoWcAUuiFGpuCVtF',
+ appId: 'ae.gov.fcsc.frontend',
+ showDebug: true,
+ timeToWaitForATTUserAuthorization: 0,
+ ),
+ );
+
+ appsflyerSdk.initSdk(
+ registerOnDeepLinkingCallback: true,
+ );
+
+ appsflyerSdk.onDeepLinking((DeepLinkResult result){
+ final status=result.status;
+ final deeplinkData =result.deepLink;
+
+ if((status==Status.FOUND) && deeplinkData !=null){
+ final data=deeplinkData.clickEvent;
+ final deepLinkValue = data['deep_link_sub1']as String?;
+
+ }else{
+ print( "Deeplink status is ${status.toShortString()} OR data is null");
+
+ }
+
+ });
+ }
+
+ Widget build(BuildContext context) {
final locale = ref.watch(localeProvider);
final connectivityProvider = Provider((ref) {
diff --git a/lib/presentation/Screens/Bottom Navigation Pages/Competitiveness/Detailedcompetitiveness.dart b/lib/presentation/Screens/Bottom Navigation Pages/Competitiveness/Detailedcompetitiveness.dart
index 2b6001f2..84b0ecb1 100644
--- a/lib/presentation/Screens/Bottom Navigation Pages/Competitiveness/Detailedcompetitiveness.dart
+++ b/lib/presentation/Screens/Bottom Navigation Pages/Competitiveness/Detailedcompetitiveness.dart
@@ -15,10 +15,7 @@ class ReportDetailPage extends StatelessWidget {
'التقارير التنافسيه لدولة الامارات',
),
style: TextStyle(
- fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- )
+ fontFamily: context.translate('Roboto', 'NotoKufi'),
),
),
showBackButton: true,
@@ -27,10 +24,11 @@ class ReportDetailPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
+ // Header
Container(
- padding: EdgeInsets.all(12),
+ padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
- color: Colors.grey[100],
+ color: Colors.grey.shade200,
borderRadius: BorderRadius.circular(12),
),
child: Row(
@@ -40,7 +38,7 @@ class ReportDetailPage extends StatelessWidget {
child: Text(
'Prosperity Index (2023)',
style: TextStyle(
- fontSize: 14,
+ fontSize: 20,
fontWeight: FontWeight.bold,
),
),
@@ -57,7 +55,7 @@ class ReportDetailPage extends StatelessWidget {
const Text(
'The Legatum Prosperity Index is published annually by the Legatum Institute. It is a policy-focused report that measures the current state of prosperity since 2007. Using the Prosperity Index framework, nations around the world can assess their strengths and weaknesses in order to determine the economic and strategic choices that need to be made to further build inclusive societies, open economies, and empowered people to drive greater levels of prosperity.',
- style: TextStyle(fontSize: 13),
+ style: TextStyle(fontSize: 14),
),
const SizedBox(height: 24),
@@ -68,7 +66,7 @@ class ReportDetailPage extends StatelessWidget {
_RankingCard(
title: 'Rank in 2023',
value: '44',
- icon: const Icon(Icons.arrow_downward, color: Colors.red, size: 25,weight: 50),
+ icon: const Icon(Icons.arrow_downward, color: Colors.red, size: 25, weight: 50),
),
_RankingCard(
title: 'vs. Previous Edition',
@@ -80,22 +78,58 @@ class ReportDetailPage extends StatelessWidget {
const SizedBox(height: 24),
// Country ranking section
- _CountryRankingItem(
- title: 'First Globally',
- country: 'DENMARK',
- flagPath: 'assets/country_flags/de.png',
- ),
- const Divider(),
- _CountryRankingItem(
- title: 'First in Oman',
- country: 'Oman',
- flagPath: 'assets/country_flags/fk.png',
- ),
- const Divider(),
- _CountryRankingItem(
- title: 'First in Arab Countries',
- country: 'UNITED ARAB EMIRATES',
- flagPath: 'assets/country_flags/ga.png',
+ Container(
+ decoration: BoxDecoration(
+ color: const Color(0xFFF5F5F5),
+ borderRadius: BorderRadius.circular(12),
+ ),
+ padding: const EdgeInsets.symmetric(vertical: 8),
+ child: Column(
+ children: [
+ _CountryRankingItem(
+ title: 'First Globally',
+ country: 'DENMARK',
+ flagPath: 'assets/country_flags/de.png',
+ ),
+ const Divider(),
+ _CountryRankingItem(
+ title: 'First in GCC',
+ country: 'MULTIPLE COUNTRIES',
+ flagPath: 'assets/competitiveness/multi-frame.jpg',
+ onTap: () => showDialog(
+ context: context,
+ builder: (context) => Dialog(
+ shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
+ child: Container(
+ padding: const EdgeInsets.all(16),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ _CountryItem(name: 'Argentina', flag: 'assets/country_flags/ar.png'),
+ _CountryItem(name: 'Bahrain', flag: 'assets/country_flags/ba.png'),
+ _CountryItem(name: 'Denmark', flag: 'assets/country_flags/de.png'),
+ _CountryItem(name: 'Finland', flag: 'assets/country_flags/fi.png'),
+ _CountryItem(name: 'Oman', flag: 'assets/country_flags/am.png'),
+ _CountryItem(name: 'Singapore', flag: 'assets/country_flags/si.png'),
+ _CountryItem(name: 'Saudi Arabia', flag: 'assets/country_flags/sa.png'),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ const Divider(),
+ _CountryRankingItem(
+ title: 'First in Arab Countries',
+ country: 'UNITED ARAB EMIRATES',
+ flagPath: 'assets/country_flags/ga.png',
+ ),
+ ],
+ ),
),
],
),
@@ -103,6 +137,7 @@ class ReportDetailPage extends StatelessWidget {
);
}
}
+
class _RankingCard extends StatelessWidget {
final String title;
final String value;
@@ -151,57 +186,86 @@ class _RankingCard extends StatelessWidget {
);
}
}
-class _CountryRankingItem extends StatelessWidget {
+class _CountryRankingItem extends StatelessWidget {
final String title;
final String country;
final String flagPath;
+ final VoidCallback? onTap;
const _CountryRankingItem({
required this.title,
required this.country,
required this.flagPath,
+ this.onTap,
});
@override
Widget build(BuildContext context) {
- return Container(
- color: Colors.grey[100],
- padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 8),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- title,
- style: const TextStyle(fontSize: 14, color: Colors.black54),
- ),
- const SizedBox(height: 4),
- Text(
- country,
- style: const TextStyle(
- fontSize: 20,
- fontWeight: FontWeight.bold,
+ return GestureDetector(
+ onTap: onTap,
+ child: Container(
+ color: const Color(0xFFF5F5F5),
+ padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 8),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ title,
+ style: const TextStyle(fontSize: 14, color: Colors.black54),
),
- ),
- ],
- ),
- ),
- const SizedBox(width: 16),
- ClipOval(
- child: Container(
- width: 50,
- height: 50,
- decoration: BoxDecoration(
- shape: BoxShape.circle,
- color: Colors.transparent,
+ const SizedBox(height: 4),
+ Text(
+ country,
+ style: const TextStyle(
+ fontSize: 20,
+ fontWeight: FontWeight.bold,
+ ),
+ ),
+ ],
),
- child: Image.asset(flagPath, width: 50, height: 50, fit: BoxFit.cover),
),
+ const SizedBox(width: 16),
+ ClipOval(
+ child: Container(
+ width: 50,
+ height: 50,
+ decoration: const BoxDecoration(
+ shape: BoxShape.circle,
+ color: Colors.transparent,
+ ),
+ child: Image.asset(flagPath, width: 50, height: 50, fit: BoxFit.cover),
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+class _CountryItem extends StatelessWidget {
+ final String name;
+ final String flag;
+
+ const _CountryItem({required this.name, required this.flag});
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: const EdgeInsets.symmetric(vertical: 8),
+ child: Row(
+ children: [
+ ClipOval(
+ child: Image.asset(flag, width: 40, height: 40, fit: BoxFit.cover,
+ errorBuilder: (context, error, stackTrace) => const Icon(Icons.flag),),
),
+ const SizedBox(width: 12),
+ Text(name),
],
),
);
diff --git a/lib/presentation/Screens/charts/screens/chart_screen.dart b/lib/presentation/Screens/charts/screens/chart_screen.dart
index 379f1e93..73b8a011 100644
--- a/lib/presentation/Screens/charts/screens/chart_screen.dart
+++ b/lib/presentation/Screens/charts/screens/chart_screen.dart
@@ -2234,7 +2234,7 @@ class _ChartScreen1State extends ConsumerState {
try {
final String currentRoute = GoRouterState.of(context).uri.toString();
- final String baseAppLink = 'https://fcsc-a161c.web.app';
+ final String baseAppLink = 'https://fcscapp.onelink.me';
final String shareLink = '$baseAppLink$currentRoute';
final String shareText = 'Check this out!\n\n$shareLink';
print('Generated Share Link: $shareLink');
diff --git a/pubspec.lock b/pubspec.lock
index 94289d50..c230560d 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -89,6 +89,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.1.1"
+ appsflyer_sdk:
+ dependency: "direct main"
+ description:
+ name: appsflyer_sdk
+ sha256: "21de475f77a827dc063cbe2e76d058a4ac49838513ca78753e630cf568eb7254"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.16.2"
archive:
dependency: transitive
description:
diff --git a/pubspec.yaml b/pubspec.yaml
index 49f5bb1a..b75e24f3 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -75,6 +75,7 @@ dependencies:
device_info_plus: ^11.4.0
android_intent_plus: ^5.3.0
app_settings: ^6.1.1
+ appsflyer_sdk: ^6.16.2
dependency_overrides:
fading_edge_scrollview: ^4.1.1