From 517c775e9934038698bee1b43ba2a42fdae0a465 Mon Sep 17 00:00:00 2001 From: Ahrar Date: Mon, 20 Nov 2023 18:11:56 +0800 Subject: [PATCH] fix: remove appEnv related to deriv ez as deriv ez is removed from production we dont need to include it in this package anymore --- .../layouts/deriv_setting_layout.dart | 33 +++---------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/packages/deriv_auth_ui/lib/src/features/setting_page/layouts/deriv_setting_layout.dart b/packages/deriv_auth_ui/lib/src/features/setting_page/layouts/deriv_setting_layout.dart index 48db782a4..d86b4f955 100644 --- a/packages/deriv_auth_ui/lib/src/features/setting_page/layouts/deriv_setting_layout.dart +++ b/packages/deriv_auth_ui/lib/src/features/setting_page/layouts/deriv_setting_layout.dart @@ -20,8 +20,6 @@ class DerivSettingLayout extends StatefulWidget { this.appId = defaultAppId, this.devApp = 'com.deriv.app.dev', this.stagingApp = 'com.deriv.app.staging', - this.getAppEnv, - this.setAppEnv, Key? key, }) : super(key: key); @@ -46,12 +44,6 @@ class DerivSettingLayout extends StatefulWidget { /// Staging flavor app. final String stagingApp; - /// Gets the value of user default for showing Server Maintenance. - final Future? getAppEnv; - - /// Stores user default for showing the prompt to confirm exit from Deriv EZ. - final Future Function({required bool value})? setAppEnv; - @override _SettingsPageState createState() => _SettingsPageState(); } @@ -117,29 +109,12 @@ class _SettingsPageState extends State { if (snapshot.hasData && (snapshot.data?.packageName == widget.devApp || snapshot.data?.packageName == widget.stagingApp)) { - return Padding( - padding: - const EdgeInsets.symmetric(horizontal: ThemeProvider.margin16), + return const Padding( + padding: EdgeInsets.symmetric(horizontal: ThemeProvider.margin16), child: Row( children: [ - const Text('Production environment'), - const SizedBox(width: ThemeProvider.margin08), - FutureBuilder( - future: widget.getAppEnv, - builder: - (BuildContext context, AsyncSnapshot snapshot) { - if (snapshot.hasData && widget.setAppEnv != null) { - return Switch( - value: snapshot.data ?? false, - onChanged: (bool val) { - setState(() { - widget.setAppEnv!(value: val); - }); - }, - ); - } - return const SizedBox.shrink(); - }) + Text('Production environment'), + SizedBox(width: ThemeProvider.margin08), ], ), );