remove unnecessary code

This commit is contained in:
Godwin Asuquo 2023-02-15 22:14:07 +02:00
parent f0c4952809
commit 2496a6574a

View file

@ -6,6 +6,7 @@ import 'package:cake_wallet/typography.dart';
import 'package:flutter/material.dart';
import 'package:cake_wallet/router.dart' as Router;
final _settingsNavigatorKey = GlobalKey<NavigatorState>();
class DesktopSettingsPage extends StatefulWidget {
const DesktopSettingsPage({super.key});
@ -15,8 +16,6 @@ class DesktopSettingsPage extends StatefulWidget {
}
class _DesktopSettingsPageState extends State<DesktopSettingsPage> {
GlobalKey<NavigatorState> _settingsNavigatorKey = GlobalKey<NavigatorState>();
final int itemCount = SettingActions.all.length;
int? currentPage;
@ -59,7 +58,7 @@ class _DesktopSettingsPageState extends State<DesktopSettingsPage> {
onTap: () {
if (currentPage != index) {
final settingContext =
_settingsNavigatorKey.currentState!.context;
_settingsNavigatorKey.currentState?.context ?? context;
item.onTap.call(settingContext);
_onItemChange(index);
}