From b8867b4fbdd4b3b79f22993e2c95fc547c115523 Mon Sep 17 00:00:00 2001 From: Rahul Dev Garg <34365102+rahuldevgarg@users.noreply.github.com> Date: Fri, 24 Nov 2023 18:28:17 +0530 Subject: [PATCH] privacy --- frontend/mgramseva/lib/routing.dart | 24 ++++++++++++++---------- frontend/mgramseva/package.json | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/frontend/mgramseva/lib/routing.dart b/frontend/mgramseva/lib/routing.dart index 42e40247a..759901f36 100644 --- a/frontend/mgramseva/lib/routing.dart +++ b/frontend/mgramseva/lib/routing.dart @@ -56,6 +56,18 @@ class Routing { Map? query = uri.queryParameters; String? path = uri.path; if (kIsWeb) { + if (settings.name == Routes.PRIVACY_POLICY || settings.name == Routes.PRIVACY_POLICY_S) { + bool q = settings.arguments==null?false:settings.arguments as bool; + return MaterialPageRoute( + builder: (_) => PrivacyAndTerms(pageType:Routes.PRIVACY_POLICY,showLeading: q), + settings: RouteSettings(name: Routes.PRIVACY_POLICY)); + } + if (settings.name == Routes.TERMS_OF_USE || settings.name == Routes.TERMS_OF_USE_S) { + bool q = settings.arguments==null?false:settings.arguments as bool; + return MaterialPageRoute( + builder: (_) => PrivacyAndTerms(pageType:Routes.TERMS_OF_USE,showLeading: q), + settings: RouteSettings(name: Routes.TERMS_OF_USE)); + } if (Routes.POST_PAYMENT_FEED_BACK == path && settings.arguments == null) { Map localQuery; String routePath; @@ -359,23 +371,15 @@ class Routing { builder: (_) => Reports(), settings: RouteSettings(name: Routes.REPORTS)); case Routes.PRIVACY_POLICY: - bool? args = settings.arguments==null?false:settings.arguments as bool; + bool args = settings.arguments==null?false:settings.arguments as bool; return MaterialPageRoute( builder: (_) => PrivacyAndTerms(pageType:Routes.PRIVACY_POLICY,showLeading: args), settings: RouteSettings(name: Routes.PRIVACY_POLICY)); case Routes.TERMS_OF_USE: - bool? args = settings.arguments==null?false:settings.arguments as bool; + bool args = settings.arguments==null?false:settings.arguments as bool; return MaterialPageRoute( builder: (_) => PrivacyAndTerms(pageType: Routes.TERMS_OF_USE,showLeading: args), settings: RouteSettings(name: Routes.TERMS_OF_USE)); - case Routes.PRIVACY_POLICY_S: - return MaterialPageRoute( - builder: (_) => PrivacyAndTerms(pageType:Routes.PRIVACY_POLICY,showLeading: false), - settings: RouteSettings(name: Routes.PRIVACY_POLICY)); - case Routes.TERMS_OF_USE_S: - return MaterialPageRoute( - builder: (_) => PrivacyAndTerms(pageType: Routes.TERMS_OF_USE,showLeading: false), - settings: RouteSettings(name: Routes.TERMS_OF_USE)); case Routes.SEARCH_CONSUMER_RESULT: if (settings.arguments == null) { diff --git a/frontend/mgramseva/package.json b/frontend/mgramseva/package.json index 8a488cc1a..651dd7a74 100644 --- a/frontend/mgramseva/package.json +++ b/frontend/mgramseva/package.json @@ -1,5 +1,5 @@ { "name": "mgramseva", - "version": "1.2.14", + "version": "1.2.15", "license": "egov" }