mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +00:00
remove unnecessary code
This commit is contained in:
parent
f0c4952809
commit
2496a6574a
1 changed files with 2 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue