disable new wownero wallet unless platform is android

This commit is contained in:
julian-CStack 2023-07-13 16:26:29 -06:00
parent f111587977
commit 3273cf0e23

View file

@ -8,6 +8,8 @@
* *
*/ */
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:stackwallet/pages/add_wallet_views/name_your_wallet_view/name_your_wallet_view.dart'; import 'package:stackwallet/pages/add_wallet_views/name_your_wallet_view/name_your_wallet_view.dart';
import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/stack_colors.dart';
@ -32,35 +34,37 @@ class CreateWalletButtonGroup extends StatelessWidget {
crossAxisAlignment: crossAxisAlignment:
isDesktop ? CrossAxisAlignment.center : CrossAxisAlignment.stretch, isDesktop ? CrossAxisAlignment.center : CrossAxisAlignment.stretch,
children: [ children: [
ConstrainedBox( if (Platform.isAndroid || coin != Coin.wownero)
constraints: BoxConstraints( ConstrainedBox(
minHeight: isDesktop ? 70 : 0, constraints: BoxConstraints(
minWidth: isDesktop ? 480 : 0, minHeight: isDesktop ? 70 : 0,
), minWidth: isDesktop ? 480 : 0,
child: TextButton( ),
style: Theme.of(context) child: TextButton(
.extension<StackColors>()! style: Theme.of(context)
.getPrimaryEnabledButtonStyle(context), .extension<StackColors>()!
onPressed: () { .getPrimaryEnabledButtonStyle(context),
Navigator.of(context).pushNamed( onPressed: () {
NameYourWalletView.routeName, Navigator.of(context).pushNamed(
arguments: Tuple2( NameYourWalletView.routeName,
AddWalletType.New, arguments: Tuple2(
coin, AddWalletType.New,
), coin,
); ),
}, );
child: Text( },
"Create new wallet", child: Text(
style: isDesktop "Create new wallet",
? STextStyles.desktopButtonEnabled(context) style: isDesktop
: STextStyles.button(context), ? STextStyles.desktopButtonEnabled(context)
: STextStyles.button(context),
),
), ),
), ),
), if (Platform.isAndroid || coin != Coin.wownero)
SizedBox( SizedBox(
height: isDesktop ? 16 : 12, height: isDesktop ? 16 : 12,
), ),
ConstrainedBox( ConstrainedBox(
constraints: BoxConstraints( constraints: BoxConstraints(
minHeight: isDesktop ? 70 : 0, minHeight: isDesktop ? 70 : 0,