mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
disable wownero on desktop and xmr on windows
This commit is contained in:
parent
682c55e493
commit
0062294488
2 changed files with 23 additions and 3 deletions
|
@ -1,3 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/add_wallet_view/sub_widgets/add_wallet_text.dart';
|
||||
|
@ -37,11 +39,19 @@ class _AddWalletViewState extends State<AddWalletView> {
|
|||
|
||||
final List<Coin> coins = [...Coin.values];
|
||||
|
||||
final bool isDesktop = Util.isDesktop;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_searchFieldController = TextEditingController();
|
||||
_searchFocusNode = FocusNode();
|
||||
coins.remove(Coin.firoTestNet);
|
||||
if (isDesktop) {
|
||||
coins.remove(Coin.wownero);
|
||||
if (Platform.isWindows) {
|
||||
coins.remove(Coin.monero);
|
||||
}
|
||||
}
|
||||
super.initState();
|
||||
}
|
||||
|
||||
|
@ -56,7 +66,7 @@ class _AddWalletViewState extends State<AddWalletView> {
|
|||
Widget build(BuildContext context) {
|
||||
debugPrint("BUILD: $runtimeType");
|
||||
|
||||
if (Util.isDesktop) {
|
||||
if (isDesktop) {
|
||||
return DesktopScaffold(
|
||||
appBar: const DesktopAppBar(
|
||||
isCompactHeight: false,
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
@ -46,10 +48,18 @@ class _NodesSettings extends ConsumerState<NodesSettings> {
|
|||
.toList();
|
||||
}
|
||||
|
||||
final bool isDesktop = Util.isDesktop;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_coins = _coins.toList();
|
||||
_coins.remove(Coin.firoTestNet);
|
||||
if (isDesktop) {
|
||||
_coins.remove(Coin.wownero);
|
||||
if (Platform.isWindows) {
|
||||
_coins.remove(Coin.monero);
|
||||
}
|
||||
}
|
||||
|
||||
searchNodeController = TextEditingController();
|
||||
searchNodeFocusNode = FocusNode();
|
||||
|
@ -128,8 +138,8 @@ class _NodesSettings extends ConsumerState<NodesSettings> {
|
|||
Constants.size.circularBorderRadius,
|
||||
),
|
||||
child: TextField(
|
||||
autocorrect: Util.isDesktop ? false : true,
|
||||
enableSuggestions: Util.isDesktop ? false : true,
|
||||
autocorrect: !isDesktop,
|
||||
enableSuggestions: !isDesktop,
|
||||
controller: searchNodeController,
|
||||
focusNode: searchNodeFocusNode,
|
||||
onChanged: (newString) {
|
||||
|
|
Loading…
Reference in a new issue